Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/rustc_feature/src/builtin_attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
),

// ==========================================================================
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/force-inlining/gate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
}
4 changes: 2 additions & 2 deletions tests/ui/force-inlining/gate.stderr
Original file line number Diff line number Diff line change
@@ -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]
Expand All @@ -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"]
Expand Down
Loading