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
Auto merge of #125596 - nnethercote:rental-hard-error, r=<try>
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.
r? `@estebank`
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
@@ -75,7 +75,6 @@ declare_lint_pass! {
75
75
PATTERNS_IN_FNS_WITHOUT_BODY,
76
76
PRIVATE_BOUNDS,
77
77
PRIVATE_INTERFACES,
78
-
PROC_MACRO_BACK_COMPAT,
79
78
PROC_MACRO_DERIVE_RESOLUTION_FALLBACK,
80
79
PUB_USE_OF_PRIVATE_EXTERN_CRATE,
81
80
REDUNDANT_LIFETIMES,
@@ -3705,53 +3704,6 @@ declare_lint! {
3705
3704
"detects invalid `#[doc(...)]` attributes",
3706
3705
}
3707
3706
3708
-
declare_lint!{
3709
-
/// The `proc_macro_back_compat` lint detects uses of old versions of certain
3710
-
/// proc-macro crates, which have hardcoded workarounds in the compiler.
3711
-
///
3712
-
/// ### Example
3713
-
///
3714
-
/// ```rust,ignore (needs-dependency)
3715
-
///
3716
-
/// use time_macros_impl::impl_macros;
3717
-
/// struct Foo;
3718
-
/// impl_macros!(Foo);
3719
-
/// ```
3720
-
///
3721
-
/// This will produce:
3722
-
///
3723
-
/// ```text
3724
-
/// warning: using an old version of `time-macros-impl`
3725
-
/// ::: $DIR/group-compat-hack.rs:27:5
3726
-
/// |
3727
-
/// LL | impl_macros!(Foo);
3728
-
/// | ------------------ in this macro invocation
3729
-
/// |
3730
-
/// = note: `#[warn(proc_macro_back_compat)]` on by default
3731
-
/// = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
3732
-
/// = note: for more information, see issue #83125 <https://github.com/rust-lang/rust/issues/83125>
3733
-
/// = 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
3734
-
/// = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
3735
-
/// ```
3736
-
///
3737
-
/// ### Explanation
3738
-
///
3739
-
/// Eventually, the backwards-compatibility hacks present in the compiler will be removed,
3740
-
/// causing older versions of certain crates to stop compiling.
3741
-
/// This is a [future-incompatible] lint to ease the transition to an error.
0 commit comments