Skip to content

Commit 3e981e2

Browse files
committed
docs: add additional links for ffi_pure / ffi_const
1 parent 27ffc37 commit 3e981e2

File tree

1 file changed

+10
-2
lines changed
  • compiler/rustc_error_codes/src/error_codes

1 file changed

+10
-2
lines changed

compiler/rustc_error_codes/src/error_codes/E0757.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ extern "C" {
1212
}
1313
```
1414

15-
As `const` has a stricter set of requirements than `pure`, remove the `ffi_pure`
16-
attribute:
15+
As `ffi_const` has a stricter set of requirements than `ffi_pure`, remove the
16+
`ffi_pure` attribute:
1717

1818
```
1919
#![feature(ffi_const)]
@@ -23,3 +23,11 @@ extern "C" {
2323
pub fn square(num: i32) -> i32;
2424
}
2525
```
26+
27+
You can get more information about `const` and `pure` in the [GCC documentation
28+
on Common Function Attributes]. The unstable Rust Book has more information
29+
about [`ffi_const`] and [`ffi_pure`].
30+
31+
[GCC documentation on Common Function Attributes]: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html
32+
[`ffi_const`]: https://doc.rust-lang.org/nightly/unstable-book/language-features/ffi-const.html
33+
[`ffi_pure`]: https://doc.rust-lang.org/nightly/unstable-book/language-features/ffi-pure.html

0 commit comments

Comments
 (0)