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.