summary refs log tree commit diff
path: root/compiler/rustc_expand/src/errors.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-05-27 09:00:48 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2024-05-28 08:15:15 +1000
commitcf0c2c73334eb1c7c6a45e2603244238e4bd3ef7 (patch)
tree0d67667a2df1e0e54a318dc988bd02d8fc7baab7 /compiler/rustc_expand/src/errors.rs
parent3607cee3e7009c91dfdf3d4f8669ac8156a36ac0 (diff)
downloadrust-cf0c2c73334eb1c7c6a45e2603244238e4bd3ef7.tar.gz
rust-cf0c2c73334eb1c7c6a45e2603244238e4bd3ef7.zip
Convert `proc_macro_back_compat` lint to an unconditional error.
We still check for the `rental`/`allsorts-rental` crates. But now if
they are detected we just emit a fatal error, instead of emitting a
warning and providing alternative behaviour.

The original "hack" implementing alternative behaviour was added
in #73345.

The lint was added in #83127.

The tracking issue is #83125.

The direct motivation for the change is that providing the alternative
behaviour is interfering with #125174 and follow-on work.
Diffstat (limited to 'compiler/rustc_expand/src/errors.rs')
-rw-r--r--compiler/rustc_expand/src/errors.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/rustc_expand/src/errors.rs b/compiler/rustc_expand/src/errors.rs
index a5fc9e9d89c..3f8b4661e5f 100644
--- a/compiler/rustc_expand/src/errors.rs
+++ b/compiler/rustc_expand/src/errors.rs
@@ -440,3 +440,13 @@ pub(crate) struct EmptyDelegationList {
     #[primary_span]
     pub span: Span,
 }
+
+// This used to be the `proc_macro_back_compat` lint (#83125). It was later
+// turned into a hard error.
+#[derive(Diagnostic)]
+#[diag(expand_proc_macro_back_compat)]
+#[note]
+pub struct ProcMacroBackCompat {
+    pub crate_name: String,
+    pub fixed_version: String,
+}