File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
compiler/rustc_error_codes/src/error_codes Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments