You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Copy file name to clipboardexpand all lines: compiler/rustc_expand/messages.ftl
+3
Original file line number
Diff line number
Diff line change
@@ -124,6 +124,9 @@ expand_not_a_meta_item =
124
124
expand_only_one_word =
125
125
must only be one word
126
126
127
+
expand_proc_macro_back_compat = using an old version of `{$crate_name}`
128
+
.note = older versions of the `{$crate_name}` crate no longer compile; please update to `{$crate_name}` v{$fixed_version}, or switch to one of the `{$crate_name}` alternatives
Copy file name to clipboardexpand all lines: compiler/rustc_lint/messages.ftl
-3
Original file line number
Diff line number
Diff line change
@@ -629,9 +629,6 @@ lint_pattern_in_foreign = patterns aren't allowed in foreign function declaratio
629
629
lint_private_extern_crate_reexport =
630
630
extern crate `{$ident}` is private, and cannot be re-exported, consider declaring with `pub`
631
631
632
-
lint_proc_macro_back_compat = using an old version of `{$crate_name}`
633
-
.note = older versions of the `{$crate_name}` crate will stop compiling in future versions of Rust; please update to `{$crate_name}` v{$fixed_version}, or switch to one of the `{$crate_name}` alternatives
634
-
635
632
lint_proc_macro_derive_resolution_fallback = cannot find {$ns} `{$ident}` in this scope
636
633
.label = names from parent modules are not accessible without an explicit import
Copy file name to clipboardexpand all lines: compiler/rustc_lint_defs/src/builtin.rs
-48
Original file line number
Diff line number
Diff line change
@@ -77,7 +77,6 @@ declare_lint_pass! {
77
77
POINTER_STRUCTURAL_MATCH,
78
78
PRIVATE_BOUNDS,
79
79
PRIVATE_INTERFACES,
80
-
PROC_MACRO_BACK_COMPAT,
81
80
PROC_MACRO_DERIVE_RESOLUTION_FALLBACK,
82
81
PUB_USE_OF_PRIVATE_EXTERN_CRATE,
83
82
REDUNDANT_LIFETIMES,
@@ -3792,53 +3791,6 @@ declare_lint! {
3792
3791
"detects invalid `#[doc(...)]` attributes",
3793
3792
}
3794
3793
3795
-
declare_lint!{
3796
-
/// The `proc_macro_back_compat` lint detects uses of old versions of certain
3797
-
/// proc-macro crates, which have hardcoded workarounds in the compiler.
3798
-
///
3799
-
/// ### Example
3800
-
///
3801
-
/// ```rust,ignore (needs-dependency)
3802
-
///
3803
-
/// use time_macros_impl::impl_macros;
3804
-
/// struct Foo;
3805
-
/// impl_macros!(Foo);
3806
-
/// ```
3807
-
///
3808
-
/// This will produce:
3809
-
///
3810
-
/// ```text
3811
-
/// warning: using an old version of `time-macros-impl`
3812
-
/// ::: $DIR/group-compat-hack.rs:27:5
3813
-
/// |
3814
-
/// LL | impl_macros!(Foo);
3815
-
/// | ------------------ in this macro invocation
3816
-
/// |
3817
-
/// = note: `#[warn(proc_macro_back_compat)]` on by default
3818
-
/// = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
3819
-
/// = note: for more information, see issue #83125 <https://github.com/rust-lang/rust/issues/83125>
3820
-
/// = note: the `time-macros-impl` crate will stop compiling in futures version of Rust. Please update to the latest version of the `time` crate to avoid breakage
3821
-
/// = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
3822
-
/// ```
3823
-
///
3824
-
/// ### Explanation
3825
-
///
3826
-
/// Eventually, the backwards-compatibility hacks present in the compiler will be removed,
3827
-
/// causing older versions of certain crates to stop compiling.
3828
-
/// This is a [future-incompatible] lint to ease the transition to an error.
0 commit comments