about summary refs log tree commit diff
path: root/compiler/rustc_lint
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2024-08-28 00:00:08 +0200
committerest31 <MTest31@outlook.com>2024-10-05 04:29:46 +0200
commit00ed47b8496bacb9da0196127508e07ba5d14bb4 (patch)
tree477b4645e08fa330958ec018e0340b92cd45ebe1 /compiler/rustc_lint
parent4428a051679ec6194a118424f4616d922249a1e6 (diff)
downloadrust-00ed47b8496bacb9da0196127508e07ba5d14bb4.tar.gz
rust-00ed47b8496bacb9da0196127508e07ba5d14bb4.zip
Make deprecated_cfg_attr_crate_type_name a hard error
Diffstat (limited to 'compiler/rustc_lint')
-rw-r--r--compiler/rustc_lint/messages.ftl6
-rw-r--r--compiler/rustc_lint/src/context/diagnostics.rs6
-rw-r--r--compiler/rustc_lint/src/lib.rs5
-rw-r--r--compiler/rustc_lint/src/lints.rs8
4 files changed, 5 insertions, 20 deletions
diff --git a/compiler/rustc_lint/messages.ftl b/compiler/rustc_lint/messages.ftl
index 375cfccbe9f..3b360bdef2f 100644
--- a/compiler/rustc_lint/messages.ftl
+++ b/compiler/rustc_lint/messages.ftl
@@ -203,12 +203,6 @@ lint_confusable_identifier_pair = found both `{$existing_sym}` and `{$sym}` as i
     .current_use = this identifier can be confused with `{$existing_sym}`
     .other_use = other identifier used here
 
-lint_crate_name_in_cfg_attr_deprecated =
-    `crate_name` within an `#![cfg_attr]` attribute is deprecated
-
-lint_crate_type_in_cfg_attr_deprecated =
-    `crate_type` within an `#![cfg_attr]` attribute is deprecated
-
 lint_cstring_ptr = getting the inner pointer of a temporary `CString`
     .as_ptr_label = this pointer will be invalid
     .unwrap_label = this `CString` is deallocated at the end of the statement, bind it to a variable to extend its lifetime
diff --git a/compiler/rustc_lint/src/context/diagnostics.rs b/compiler/rustc_lint/src/context/diagnostics.rs
index 168e3a8e92c..b5ab56912cb 100644
--- a/compiler/rustc_lint/src/context/diagnostics.rs
+++ b/compiler/rustc_lint/src/context/diagnostics.rs
@@ -400,12 +400,6 @@ pub(super) fn decorate_lint(sess: &Session, diagnostic: BuiltinLintDiag, diag: &
         BuiltinLintDiag::CfgAttrNoAttributes => {
             lints::CfgAttrNoAttributes.decorate_lint(diag);
         }
-        BuiltinLintDiag::CrateTypeInCfgAttr => {
-            lints::CrateTypeInCfgAttr.decorate_lint(diag);
-        }
-        BuiltinLintDiag::CrateNameInCfgAttr => {
-            lints::CrateNameInCfgAttr.decorate_lint(diag);
-        }
         BuiltinLintDiag::MissingFragmentSpecifier => {
             lints::MissingFragmentSpecifier.decorate_lint(diag);
         }
diff --git a/compiler/rustc_lint/src/lib.rs b/compiler/rustc_lint/src/lib.rs
index c74cb866f21..38a9fb8abfc 100644
--- a/compiler/rustc_lint/src/lib.rs
+++ b/compiler/rustc_lint/src/lib.rs
@@ -571,6 +571,11 @@ fn register_builtins(store: &mut LintStore) {
          <https://rust-lang.github.io/rfcs/3535-constants-in-patterns.html> for more information",
     );
     store.register_removed(
+        "deprecated_cfg_attr_crate_type_name",
+        "converted into hard error, see issue #91632 \
+         <https://github.com/rust-lang/rust/issues/91632> for more information",
+    );
+    store.register_removed(
         "pointer_structural_match",
         "converted into hard error, see RFC #3535 \
          <https://rust-lang.github.io/rfcs/3535-constants-in-patterns.html> for more information",
diff --git a/compiler/rustc_lint/src/lints.rs b/compiler/rustc_lint/src/lints.rs
index 0045cfcaa56..5187a13bd41 100644
--- a/compiler/rustc_lint/src/lints.rs
+++ b/compiler/rustc_lint/src/lints.rs
@@ -2442,14 +2442,6 @@ pub(crate) struct DuplicateMacroAttribute;
 pub(crate) struct CfgAttrNoAttributes;
 
 #[derive(LintDiagnostic)]
-#[diag(lint_crate_type_in_cfg_attr_deprecated)]
-pub(crate) struct CrateTypeInCfgAttr;
-
-#[derive(LintDiagnostic)]
-#[diag(lint_crate_name_in_cfg_attr_deprecated)]
-pub(crate) struct CrateNameInCfgAttr;
-
-#[derive(LintDiagnostic)]
 #[diag(lint_missing_fragment_specifier)]
 pub(crate) struct MissingFragmentSpecifier;