diff options
| author | David Wood <david.wood2@arm.com> | 2025-02-13 15:10:49 +0000 |
|---|---|---|
| committer | David Wood <david.wood2@arm.com> | 2025-02-24 07:44:38 +0000 |
| commit | 1ee134f10dafe4374ff0de6d50bedcb01fee5296 (patch) | |
| tree | 59a3f84a0386089546c377a2b10175a98c7fab32 | |
| parent | ad27045c31a9f37ad7d44ca2a403de52d1a896d3 (diff) | |
| download | rust-1ee134f10dafe4374ff0de6d50bedcb01fee5296.tar.gz rust-1ee134f10dafe4374ff0de6d50bedcb01fee5296.zip | |
feature: fix typo in attribute description
The force inlining attribute isn't is never used with `#![..]` attribute syntax, only `#[..]` syntax.
| -rw-r--r-- | compiler/rustc_feature/src/builtin_attrs.rs | 2 | ||||
| -rw-r--r-- | tests/ui/force-inlining/gate.rs | 4 | ||||
| -rw-r--r-- | tests/ui/force-inlining/gate.stderr | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_feature/src/builtin_attrs.rs b/compiler/rustc_feature/src/builtin_attrs.rs index 6d16dc00ef4..306535bf764 100644 --- a/compiler/rustc_feature/src/builtin_attrs.rs +++ b/compiler/rustc_feature/src/builtin_attrs.rs @@ -1011,7 +1011,7 @@ pub static BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[ ), rustc_attr!( 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" ), // ========================================================================== diff --git a/tests/ui/force-inlining/gate.rs b/tests/ui/force-inlining/gate.rs index d6a01a74a44..cea094c14f2 100644 --- a/tests/ui/force-inlining/gate.rs +++ b/tests/ui/force-inlining/gate.rs @@ -2,11 +2,11 @@ #![allow(internal_features)] #[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() { } #[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() { } diff --git a/tests/ui/force-inlining/gate.stderr b/tests/ui/force-inlining/gate.stderr index e3973a08c23..964d43fa18f 100644 --- a/tests/ui/force-inlining/gate.stderr +++ b/tests/ui/force-inlining/gate.stderr @@ -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 | LL | #[rustc_force_inline] @@ -7,7 +7,7 @@ LL | #[rustc_force_inline] = 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 -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 | LL | #[rustc_force_inline = "the test requires it"] |
