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
Rollup merge of rust-lang#125596 - nnethercote:rental-hard-error, r=estebank
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 rust-lang#73345.
The lint was added in rust-lang#83127.
The tracking issue is rust-lang#83125.
The direct motivation for the change is that providing the alternative behaviour is interfering with rust-lang#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
@@ -635,9 +635,6 @@ lint_pattern_in_foreign = patterns aren't allowed in foreign function declaratio
635
635
lint_private_extern_crate_reexport =
636
636
extern crate `{$ident}` is private, and cannot be re-exported, consider declaring with `pub`
637
637
638
-
lint_proc_macro_back_compat = using an old version of `{$crate_name}`
639
-
.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
640
-
641
638
lint_proc_macro_derive_resolution_fallback = cannot find {$ns} `{$ident}` in this scope
642
639
.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
@@ -76,7 +76,6 @@ declare_lint_pass! {
76
76
PATTERNS_IN_FNS_WITHOUT_BODY,
77
77
PRIVATE_BOUNDS,
78
78
PRIVATE_INTERFACES,
79
-
PROC_MACRO_BACK_COMPAT,
80
79
PROC_MACRO_DERIVE_RESOLUTION_FALLBACK,
81
80
PUB_USE_OF_PRIVATE_EXTERN_CRATE,
82
81
REDUNDANT_LIFETIMES,
@@ -3664,53 +3663,6 @@ declare_lint! {
3664
3663
"detects invalid `#[doc(...)]` attributes",
3665
3664
}
3666
3665
3667
-
declare_lint!{
3668
-
/// The `proc_macro_back_compat` lint detects uses of old versions of certain
3669
-
/// proc-macro crates, which have hardcoded workarounds in the compiler.
3670
-
///
3671
-
/// ### Example
3672
-
///
3673
-
/// ```rust,ignore (needs-dependency)
3674
-
///
3675
-
/// use time_macros_impl::impl_macros;
3676
-
/// struct Foo;
3677
-
/// impl_macros!(Foo);
3678
-
/// ```
3679
-
///
3680
-
/// This will produce:
3681
-
///
3682
-
/// ```text
3683
-
/// warning: using an old version of `time-macros-impl`
3684
-
/// ::: $DIR/group-compat-hack.rs:27:5
3685
-
/// |
3686
-
/// LL | impl_macros!(Foo);
3687
-
/// | ------------------ in this macro invocation
3688
-
/// |
3689
-
/// = note: `#[warn(proc_macro_back_compat)]` on by default
3690
-
/// = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
3691
-
/// = note: for more information, see issue #83125 <https://github.com/rust-lang/rust/issues/83125>
3692
-
/// = 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
3693
-
/// = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
3694
-
/// ```
3695
-
///
3696
-
/// ### Explanation
3697
-
///
3698
-
/// Eventually, the backwards-compatibility hacks present in the compiler will be removed,
3699
-
/// causing older versions of certain crates to stop compiling.
3700
-
/// This is a [future-incompatible] lint to ease the transition to an error.
0 commit comments