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" {
12
12
}
13
13
```
14
14
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:
17
17
18
18
```
19
19
#![feature(ffi_const)]
@@ -23,3 +23,11 @@ extern "C" {
23
23
pub fn square(num: i32) -> i32;
24
24
}
25
25
```
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