about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChris Midgley <chris.midgley@dunecomputers.co.uk>2021-07-21 14:11:14 +0100
committerChris Midgley <chris.midgley@dunecomputers.co.uk>2021-07-21 14:13:40 +0100
commit3e981e220940c86b57ebab8413d9855af3bbda8c (patch)
treeaedf0dfc36ad1ee7997a22808b6bdf9e482004fc
parent27ffc3725a3e8bf5cac28094099250bc2d664ec7 (diff)
downloadrust-3e981e220940c86b57ebab8413d9855af3bbda8c.tar.gz
rust-3e981e220940c86b57ebab8413d9855af3bbda8c.zip
docs: add additional links for ffi_pure / ffi_const
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0757.md12
1 files changed, 10 insertions, 2 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0757.md b/compiler/rustc_error_codes/src/error_codes/E0757.md
index 03ab4e7699d..ed7ee1c6fa2 100644
--- a/compiler/rustc_error_codes/src/error_codes/E0757.md
+++ b/compiler/rustc_error_codes/src/error_codes/E0757.md
@@ -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