mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
docs: add additional links for ffi_pure / ffi_const
This commit is contained in:
parent
27ffc3725a
commit
3e981e2209
@ -12,8 +12,8 @@ extern "C" {
|
||||
}
|
||||
```
|
||||
|
||||
As `const` has a stricter set of requirements than `pure`, remove the `ffi_pure`
|
||||
attribute:
|
||||
As `ffi_const` has a stricter set of requirements than `ffi_pure`, remove the
|
||||
`ffi_pure` attribute:
|
||||
|
||||
```
|
||||
#![feature(ffi_const)]
|
||||
@ -23,3 +23,11 @@ extern "C" {
|
||||
pub fn square(num: i32) -> i32;
|
||||
}
|
||||
```
|
||||
|
||||
You can get more information about `const` and `pure` in the [GCC documentation
|
||||
on Common Function Attributes]. The unstable Rust Book has more information
|
||||
about [`ffi_const`] and [`ffi_pure`].
|
||||
|
||||
[GCC documentation on Common Function Attributes]: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html
|
||||
[`ffi_const`]: https://doc.rust-lang.org/nightly/unstable-book/language-features/ffi-const.html
|
||||
[`ffi_pure`]: https://doc.rust-lang.org/nightly/unstable-book/language-features/ffi-pure.html
|
||||
|
Loading…
Reference in New Issue
Block a user