compiler/rustc_error_codes/src/error_codes/E0755.md MARKDOWN 31 lines View on github.com → Search inside
1#### Note: this error code is no longer emitted by the compiler.23The `ffi_pure` attribute was used on a non-foreign function.45Erroneous code example:67```ignore (no longer emitted)8#![feature(ffi_pure)]910#[unsafe(ffi_pure)] // error!11pub fn foo() {}12# fn main() {}13```1415The `ffi_pure` attribute can only be used on foreign functions which do not have16side effects or infinite loops:1718```19#![feature(ffi_pure)]2021extern "C" {22    #[unsafe(ffi_pure)] // ok!23    pub fn strlen(s: *const i8) -> isize;24}25# fn main() {}26```2728You can find more information about it in the [unstable Rust Book].2930[unstable Rust Book]: https://doc.rust-lang.org/unstable-book/language-features/ffi-pure.html

Findings

✓ No findings reported for this file.

Get this view in your editor

Same data, no extra tab — call code_get_file + code_get_findings over MCP from Claude/Cursor/Copilot.