feature: fix typo in attribute description
The force inlining attribute isn't is never used with `#![..]` attribute syntax, only `#[..]` syntax.
This commit is contained in:
parent
ad27045c31
commit
1ee134f10d
3 changed files with 5 additions and 5 deletions
|
@ -1011,7 +1011,7 @@ pub static BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
|
||||||
),
|
),
|
||||||
rustc_attr!(
|
rustc_attr!(
|
||||||
rustc_force_inline, Normal, template!(Word, NameValueStr: "reason"), WarnFollowing, EncodeCrossCrate::Yes,
|
rustc_force_inline, Normal, template!(Word, NameValueStr: "reason"), WarnFollowing, EncodeCrossCrate::Yes,
|
||||||
"#![rustc_force_inline] forces a free function to be inlined"
|
"#[rustc_force_inline] forces a free function to be inlined"
|
||||||
),
|
),
|
||||||
|
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
#![allow(internal_features)]
|
#![allow(internal_features)]
|
||||||
|
|
||||||
#[rustc_force_inline]
|
#[rustc_force_inline]
|
||||||
//~^ ERROR #![rustc_force_inline] forces a free function to be inlined
|
//~^ ERROR #[rustc_force_inline] forces a free function to be inlined
|
||||||
pub fn bare() {
|
pub fn bare() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustc_force_inline = "the test requires it"]
|
#[rustc_force_inline = "the test requires it"]
|
||||||
//~^ ERROR #![rustc_force_inline] forces a free function to be inlined
|
//~^ ERROR #[rustc_force_inline] forces a free function to be inlined
|
||||||
pub fn justified() {
|
pub fn justified() {
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
error[E0658]: #![rustc_force_inline] forces a free function to be inlined
|
error[E0658]: #[rustc_force_inline] forces a free function to be inlined
|
||||||
--> $DIR/gate.rs:4:1
|
--> $DIR/gate.rs:4:1
|
||||||
|
|
|
|
||||||
LL | #[rustc_force_inline]
|
LL | #[rustc_force_inline]
|
||||||
|
@ -7,7 +7,7 @@ LL | #[rustc_force_inline]
|
||||||
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
|
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
|
||||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||||
|
|
||||||
error[E0658]: #![rustc_force_inline] forces a free function to be inlined
|
error[E0658]: #[rustc_force_inline] forces a free function to be inlined
|
||||||
--> $DIR/gate.rs:9:1
|
--> $DIR/gate.rs:9:1
|
||||||
|
|
|
|
||||||
LL | #[rustc_force_inline = "the test requires it"]
|
LL | #[rustc_force_inline = "the test requires it"]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue