Skip to content

Commit 9fda3e6

Browse files
authoredFeb 25, 2025
Rollup merge of rust-lang#137602 - davidtwco:force-inline-description, r=fmease
feature: fix typo in attribute description The force inlining attribute isn't is never used with `#![..]` attribute syntax, only `#[..]` syntax.
2 parents 65152e7 + 1ee134f commit 9fda3e6

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed
 

‎compiler/rustc_feature/src/builtin_attrs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,7 @@ pub static BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
10111011
),
10121012
rustc_attr!(
10131013
rustc_force_inline, Normal, template!(Word, NameValueStr: "reason"), WarnFollowing, EncodeCrossCrate::Yes,
1014-
"#![rustc_force_inline] forces a free function to be inlined"
1014+
"#[rustc_force_inline] forces a free function to be inlined"
10151015
),
10161016

10171017
// ==========================================================================

‎tests/ui/force-inlining/gate.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
#![allow(internal_features)]
33

44
#[rustc_force_inline]
5-
//~^ ERROR #![rustc_force_inline] forces a free function to be inlined
5+
//~^ ERROR #[rustc_force_inline] forces a free function to be inlined
66
pub fn bare() {
77
}
88

99
#[rustc_force_inline = "the test requires it"]
10-
//~^ ERROR #![rustc_force_inline] forces a free function to be inlined
10+
//~^ ERROR #[rustc_force_inline] forces a free function to be inlined
1111
pub fn justified() {
1212
}

‎tests/ui/force-inlining/gate.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0658]: #![rustc_force_inline] forces a free function to be inlined
1+
error[E0658]: #[rustc_force_inline] forces a free function to be inlined
22
--> $DIR/gate.rs:4:1
33
|
44
LL | #[rustc_force_inline]
@@ -7,7 +7,7 @@ LL | #[rustc_force_inline]
77
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
88
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
99

10-
error[E0658]: #![rustc_force_inline] forces a free function to be inlined
10+
error[E0658]: #[rustc_force_inline] forces a free function to be inlined
1111
--> $DIR/gate.rs:9:1
1212
|
1313
LL | #[rustc_force_inline = "the test requires it"]

0 commit comments

Comments
 (0)
Please sign in to comment.