Skip to content

Commit 93d9578

Browse files
committed
Fix copy/paste errors in check_attr
1 parent 03b17b1 commit 93d9578

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

compiler/rustc_passes/src/check_attr.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ impl CheckAttrVisitor<'_> {
343343
Target::Fn
344344
| Target::Method(MethodKind::Trait { body: true } | MethodKind::Inherent) => true,
345345
// FIXME(#80564): We permit struct fields, match arms and macro defs to have an
346-
// `#[allow_internal_unstable]` attribute with just a lint, because we previously
346+
// `#[naked]` attribute with just a lint, because we previously
347347
// erroneously allowed it and some crates used it accidentally, to to be compatible
348348
// with crates depending on them, we can't throw an error here.
349349
Target::Field | Target::Arm | Target::MacroDef => {
@@ -1210,8 +1210,8 @@ impl CheckAttrVisitor<'_> {
12101210
self.inline_attr_str_error_with_macro_def(hir_id, attr, "link_name");
12111211
}
12121212
_ => {
1213-
// FIXME: #[cold] was previously allowed on non-functions/statics and some crates
1214-
// used this, so only emit a warning.
1213+
// FIXME: #[link_name] was previously allowed on non-functions/statics and
1214+
// some crates used this, so only emit a warning.
12151215
self.tcx.struct_span_lint_hir(UNUSED_ATTRIBUTES, hir_id, attr.span, |lint| {
12161216
let mut diag =
12171217
lint.build("attribute should be applied to a foreign function or static");
@@ -1796,7 +1796,7 @@ impl CheckAttrVisitor<'_> {
17961796
}
17971797
}
17981798

1799-
/// Outputs an error for `#[allow_internal_unstable]` which can only be applied to macros.
1799+
/// Outputs an error for `#[allow_const_fn_unstable]` which can only be applied to macros.
18001800
/// (Allows proc_macro functions)
18011801
fn check_rustc_allow_const_fn_unstable(
18021802
&self,
@@ -1812,11 +1812,11 @@ impl CheckAttrVisitor<'_> {
18121812
true
18131813
}
18141814
// FIXME(#80564): We permit struct fields and match arms to have an
1815-
// `#[allow_internal_unstable]` attribute with just a lint, because we previously
1815+
// `#[allow_const_fn_unstable]` attribute with just a lint, because we previously
18161816
// erroneously allowed it and some crates used it accidentally, to to be compatible
18171817
// with crates depending on them, we can't throw an error here.
18181818
Target::Field | Target::Arm | Target::MacroDef => {
1819-
self.inline_attr_str_error_with_macro_def(hir_id, attr, "allow_internal_unstable");
1819+
self.inline_attr_str_error_with_macro_def(hir_id, attr, "allow_const_fn_unstable");
18201820
true
18211821
}
18221822
_ => {

0 commit comments

Comments
 (0)