Skip to content

Commit c2a5ff1

Browse files
mejrsfee1-dead
andcommitted
Apply suggestions from code review
Co-authored-by: beef <ent3rm4n@gmail.com>
1 parent eedbf8b commit c2a5ff1

File tree

7 files changed

+15
-16
lines changed

7 files changed

+15
-16
lines changed

compiler/rustc_feature/src/builtin_attrs.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ macro_rules! rustc_attr {
350350
},
351351
}
352352
};
353-
($attr:ident, $typ:expr, $tpl:expr, $duplicates:expr, $encode_cross_crate:expr, $($note: expr)? $(,)?) => {
353+
($attr:ident, $typ:expr, $tpl:expr, $duplicates:expr, $encode_cross_crate:expr, $($note: expr)? $(,)?) => {
354354
rustc_attr!(
355355
$attr,
356356
$typ,
@@ -650,7 +650,7 @@ pub static BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
650650
),
651651

652652
// Probably temporary component of min_generic_const_args.
653-
// `#[type_const] const ASSOC: usize;`
653+
// `#[type_const]` const ASSOC: usize;`
654654
gated!(
655655
type_const, Normal, template!(Word), ErrorFollowing,
656656
EncodeCrossCrate::Yes, min_generic_const_args, experimental!(type_const),
@@ -705,7 +705,7 @@ pub static BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
705705
rustc_attr!(
706706
rustc_deprecated_safe_2024, Normal, template!(List: r#"audit_that = "...""#),
707707
ErrorFollowing, EncodeCrossCrate::Yes,
708-
"`#[rustc_deprecated_safe_2024] is used to declare functions unsafe across the edition 2024 boundary",
708+
"`#[rustc_deprecated_safe_2024]` is used to declare functions unsafe across the edition 2024 boundary",
709709
),
710710
rustc_attr!(
711711
rustc_pub_transparent, Normal, template!(Word),
@@ -849,7 +849,7 @@ pub static BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
849849
NameValueStr: "message"
850850
),
851851
ErrorFollowing, EncodeCrossCrate::Yes,
852-
"see `#[diagnostic::on_unimplemented] for the stable equivalent of this attribute"
852+
"see `#[diagnostic::on_unimplemented]` for the stable equivalent of this attribute"
853853
),
854854
rustc_attr!(
855855
rustc_confusables, Normal,
@@ -912,8 +912,7 @@ pub static BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
912912
// Do not const-check this function's body. It will always get replaced during CTFE.
913913
rustc_attr!(
914914
rustc_do_not_const_check, Normal, template!(Word), WarnFollowing,
915-
EncodeCrossCrate::Yes, "`#[rustc_do_not_const_check] skips const-check for this function's body.\
916-
It will always get replaced during CTFE",
915+
EncodeCrossCrate::Yes, "`#[rustc_do_not_const_check]` skips const-check for this function's body",
917916
),
918917
rustc_attr!(
919918
rustc_const_panic_str, Normal, template!(Word), WarnFollowing,
@@ -989,7 +988,7 @@ pub static BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
989988
),
990989
rustc_attr!(
991990
rustc_coherence_is_core, AttributeType::CrateLevel, template!(Word), ErrorFollowing, EncodeCrossCrate::No,
992-
"#![rustc_coherence_is_core] allows inherent methods on builtin types, only intended to be used in `core`."
991+
"`#![rustc_coherence_is_core]` allows inherent methods on builtin types, only intended to be used in `core`."
993992
),
994993
rustc_attr!(
995994
rustc_coinductive, AttributeType::Normal, template!(Word), WarnFollowing, EncodeCrossCrate::No,
@@ -1112,7 +1111,7 @@ pub static BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
11121111
),
11131112
rustc_attr!(
11141113
rustc_force_inline, Normal, template!(Word, NameValueStr: "reason"), WarnFollowing, EncodeCrossCrate::Yes,
1115-
"#[rustc_force_inline] forces a free function to be inlined"
1114+
"`#[rustc_force_inline]` forces a free function to be inlined"
11161115
),
11171116

11181117
// ==========================================================================
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#[rustc_do_not_const_check]
22
//~^ ERROR use of an internal attribute [E0658]
33
//~| NOTE the `#[rustc_do_not_const_check]` attribute is an internal implementation detail that will never be stable
4-
//~| NOTE `#[rustc_do_not_const_check] skips const-check for this function's body.It will always get replaced during CTFE
4+
//~| NOTE `#[rustc_do_not_const_check]` skips const-check for this function's body
55
const fn foo() {}
66

77
fn main() {}

tests/ui/consts/gate-do-not-const-check.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | #[rustc_do_not_const_check]
66
|
77
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
88
= note: the `#[rustc_do_not_const_check]` attribute is an internal implementation detail that will never be stable
9-
= note: `#[rustc_do_not_const_check] skips const-check for this function's body.It will always get replaced during CTFE
9+
= note: `#[rustc_do_not_const_check]` skips const-check for this function's body
1010

1111
error: aborting due to 1 previous error
1212

tests/ui/force-inlining/gate.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
#[rustc_force_inline]
55
//~^ ERROR use of an internal attribute [E0658]
66
//~| NOTE the `#[rustc_force_inline]` attribute is an internal implementation detail that will never be stable
7-
//~| NOTE #[rustc_force_inline] forces a free function to be inlined
7+
//~| NOTE `#[rustc_force_inline]` forces a free function to be inlined
88
pub fn bare() {
99
}
1010

1111
#[rustc_force_inline = "the test requires it"]
1212
//~^ ERROR use of an internal attribute [E0658]
1313
//~| NOTE the `#[rustc_force_inline]` attribute is an internal implementation detail that will never be stable
14-
//~| NOTE #[rustc_force_inline] forces a free function to be inlined
14+
//~| NOTE `#[rustc_force_inline]` forces a free function to be inlined
1515
pub fn justified() {
1616
}

tests/ui/force-inlining/gate.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | #[rustc_force_inline]
66
|
77
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
88
= note: the `#[rustc_force_inline]` attribute is an internal implementation detail that will never be stable
9-
= note: #[rustc_force_inline] forces a free function to be inlined
9+
= note: `#[rustc_force_inline]` forces a free function to be inlined
1010

1111
error[E0658]: use of an internal attribute
1212
--> $DIR/gate.rs:11:1
@@ -16,7 +16,7 @@ LL | #[rustc_force_inline = "the test requires it"]
1616
|
1717
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
1818
= note: the `#[rustc_force_inline]` attribute is an internal implementation detail that will never be stable
19-
= note: #[rustc_force_inline] forces a free function to be inlined
19+
= note: `#[rustc_force_inline]` forces a free function to be inlined
2020

2121
error: aborting due to 2 previous errors
2222

tests/ui/on-unimplemented/feature-gate-on-unimplemented.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#[rustc_on_unimplemented = "test error `{Self}` with `{Bar}`"]
44
//~^ ERROR use of an internal attribute [E0658]
55
//~| NOTE the `#[rustc_on_unimplemented]` attribute is an internal implementation detail that will never be stable
6-
//~| NOTE see `#[diagnostic::on_unimplemented] for the stable equivalent of this attribute
6+
//~| NOTE see `#[diagnostic::on_unimplemented]` for the stable equivalent of this attribute
77
trait Foo<Bar> {}
88

99
fn main() {}

tests/ui/on-unimplemented/feature-gate-on-unimplemented.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | #[rustc_on_unimplemented = "test error `{Self}` with `{Bar}`"]
66
|
77
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
88
= note: the `#[rustc_on_unimplemented]` attribute is an internal implementation detail that will never be stable
9-
= note: see `#[diagnostic::on_unimplemented] for the stable equivalent of this attribute
9+
= note: see `#[diagnostic::on_unimplemented]` for the stable equivalent of this attribute
1010

1111
error: aborting due to 1 previous error
1212

0 commit comments

Comments
 (0)