From 7cde6392812e19b57617675b7873c79304b24652 Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Thu, 22 Dec 2022 14:27:16 -0600 Subject: [PATCH 1/2] Remove proc-macro back-compat hack for rental This leaves the hack in place for allsorts-rental - it still relies on this backc-ompat hack to compile, and some crates on crates.io are still using it. We've been emitting future-incompat report warnings for rental for a while now, and fixing a broken build only requires bumping rental to the latest point release. --- compiler/rustc_expand/src/base.rs | 41 +++------ .../pretty-print-hack-show.local.stderr | 90 +------------------ .../pretty-print-hack-show.local.stdout | 3 +- 3 files changed, 16 insertions(+), 118 deletions(-) diff --git a/compiler/rustc_expand/src/base.rs b/compiler/rustc_expand/src/base.rs index 951d59246785d..642202cdb9660 100644 --- a/compiler/rustc_expand/src/base.rs +++ b/compiler/rustc_expand/src/base.rs @@ -1424,38 +1424,25 @@ fn pretty_printing_compatibility_hack(item: &Item, sess: &ParseSess) -> bool { if variant.ident.name == sym::Input { let filename = sess.source_map().span_to_filename(item.ident.span); if let FileName::Real(real) = filename { - if let Some(c) = real + if let real .local_path() .unwrap_or(Path::new("")) .components() .flat_map(|c| c.as_os_str().to_str()) - .find(|c| c.starts_with("rental") || c.starts_with("allsorts-rental")) + .find(|c| c.starts_with("allsorts-rental")) + .is_some() { - let crate_matches = if c.starts_with("allsorts-rental") { - true - } else { - let mut version = c.trim_start_matches("rental-").split('.'); - version.next() == Some("0") - && version.next() == Some("5") - && version - .next() - .and_then(|c| c.parse::().ok()) - .map_or(false, |v| v < 6) - }; - - if crate_matches { - sess.buffer_lint_with_diagnostic( - &PROC_MACRO_BACK_COMPAT, - item.ident.span, - ast::CRATE_NODE_ID, - "using an old version of `rental`", - BuiltinLintDiagnostics::ProcMacroBackCompat( - "older versions of the `rental` crate will stop compiling in future versions of Rust; \ - please update to `rental` v0.5.6, or switch to one of the `rental` alternatives".to_string() - ) - ); - return true; - } + sess.buffer_lint_with_diagnostic( + &PROC_MACRO_BACK_COMPAT, + item.ident.span, + ast::CRATE_NODE_ID, + "using an old version of `rental`", + BuiltinLintDiagnostics::ProcMacroBackCompat( + "older versions of the `rental` crate will stop compiling in future versions of Rust; \ + please update to `rental` v0.5.6, or switch to one of the `rental` alternatives".to_string() + ) + ); + return true; } } } diff --git a/tests/ui/proc-macro/pretty-print-hack-show.local.stderr b/tests/ui/proc-macro/pretty-print-hack-show.local.stderr index 873054927c962..f34e9514329c2 100644 --- a/tests/ui/proc-macro/pretty-print-hack-show.local.stderr +++ b/tests/ui/proc-macro/pretty-print-hack-show.local.stderr @@ -39,47 +39,7 @@ LL | enum ProceduralMasqueradeDummyType { = note: for more information, see issue #83125 = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives -error: using an old version of `rental` - --> $DIR/pretty-print-hack/rental-0.5.5/src/lib.rs:4:6 - | -LL | enum ProceduralMasqueradeDummyType { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #83125 - = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives - -error: using an old version of `rental` - --> $DIR/pretty-print-hack/rental-0.5.5/src/lib.rs:4:6 - | -LL | enum ProceduralMasqueradeDummyType { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #83125 - = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives - -error: using an old version of `rental` - --> $DIR/pretty-print-hack/rental-0.5.5/src/lib.rs:4:6 - | -LL | enum ProceduralMasqueradeDummyType { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #83125 - = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives - -error: using an old version of `rental` - --> $DIR/pretty-print-hack/rental-0.5.5/src/lib.rs:4:6 - | -LL | enum ProceduralMasqueradeDummyType { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #83125 - = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives - -error: aborting due to 8 previous errors +error: aborting due to 4 previous errors Future incompatibility report: Future breakage diagnostic: error: using an old version of `rental` @@ -129,51 +89,3 @@ LL | enum ProceduralMasqueradeDummyType { = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives = note: `#[deny(proc_macro_back_compat)]` on by default -Future breakage diagnostic: -error: using an old version of `rental` - --> $DIR/pretty-print-hack/rental-0.5.5/src/lib.rs:4:6 - | -LL | enum ProceduralMasqueradeDummyType { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #83125 - = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives - = note: `#[deny(proc_macro_back_compat)]` on by default - -Future breakage diagnostic: -error: using an old version of `rental` - --> $DIR/pretty-print-hack/rental-0.5.5/src/lib.rs:4:6 - | -LL | enum ProceduralMasqueradeDummyType { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #83125 - = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives - = note: `#[deny(proc_macro_back_compat)]` on by default - -Future breakage diagnostic: -error: using an old version of `rental` - --> $DIR/pretty-print-hack/rental-0.5.5/src/lib.rs:4:6 - | -LL | enum ProceduralMasqueradeDummyType { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #83125 - = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives - = note: `#[deny(proc_macro_back_compat)]` on by default - -Future breakage diagnostic: -error: using an old version of `rental` - --> $DIR/pretty-print-hack/rental-0.5.5/src/lib.rs:4:6 - | -LL | enum ProceduralMasqueradeDummyType { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #83125 - = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives - = note: `#[deny(proc_macro_back_compat)]` on by default - diff --git a/tests/ui/proc-macro/pretty-print-hack-show.local.stdout b/tests/ui/proc-macro/pretty-print-hack-show.local.stdout index 3d793d2a0145c..17436d275f9bc 100644 --- a/tests/ui/proc-macro/pretty-print-hack-show.local.stdout +++ b/tests/ui/proc-macro/pretty-print-hack-show.local.stdout @@ -20,8 +20,7 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [ span: $DIR/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs:4:36: 14:2 (#0), }, ] -PRINT-DERIVE INPUT (DISPLAY): enum ProceduralMasqueradeDummyType { Input, } -PRINT-DERIVE RE-COLLECTED (DISPLAY): enum ProceduralMasqueradeDummyType { Input } +PRINT-DERIVE INPUT (DISPLAY): enum ProceduralMasqueradeDummyType { Input } PRINT-DERIVE INPUT (DEBUG): TokenStream [ Ident { ident: "enum", From 8dcea8339901eccda49103c9e5f95146067e0a01 Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Fri, 30 Dec 2022 15:17:18 -0600 Subject: [PATCH 2/2] Adjust lint to refer to `allsorts-rental` specifically --- compiler/rustc_expand/src/base.rs | 8 +- .../pretty-print-hack-show.local.stderr | 32 ++--- .../pretty-print-hack-show.remapped.stderr | 122 +++--------------- .../pretty-print-hack-show.remapped.stdout | 3 +- 4 files changed, 38 insertions(+), 127 deletions(-) diff --git a/compiler/rustc_expand/src/base.rs b/compiler/rustc_expand/src/base.rs index 642202cdb9660..52f99bd79ce22 100644 --- a/compiler/rustc_expand/src/base.rs +++ b/compiler/rustc_expand/src/base.rs @@ -1424,7 +1424,7 @@ fn pretty_printing_compatibility_hack(item: &Item, sess: &ParseSess) -> bool { if variant.ident.name == sym::Input { let filename = sess.source_map().span_to_filename(item.ident.span); if let FileName::Real(real) = filename { - if let real + if real .local_path() .unwrap_or(Path::new("")) .components() @@ -1436,10 +1436,10 @@ fn pretty_printing_compatibility_hack(item: &Item, sess: &ParseSess) -> bool { &PROC_MACRO_BACK_COMPAT, item.ident.span, ast::CRATE_NODE_ID, - "using an old version of `rental`", + "using `allsorts-rental`", BuiltinLintDiagnostics::ProcMacroBackCompat( - "older versions of the `rental` crate will stop compiling in future versions of Rust; \ - please update to `rental` v0.5.6, or switch to one of the `rental` alternatives".to_string() + "the `allsorts-rental` crate will stop compiling in future versions of Rust; \ + please switch to `rental` v0.5.6, or switch to one of the `rental` alternatives like `ouroboros`".to_string() ) ); return true; diff --git a/tests/ui/proc-macro/pretty-print-hack-show.local.stderr b/tests/ui/proc-macro/pretty-print-hack-show.local.stderr index f34e9514329c2..692453829651b 100644 --- a/tests/ui/proc-macro/pretty-print-hack-show.local.stderr +++ b/tests/ui/proc-macro/pretty-print-hack-show.local.stderr @@ -1,4 +1,4 @@ -error: using an old version of `rental` +error: using `allsorts-rental` --> $DIR/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs:4:6 | LL | enum ProceduralMasqueradeDummyType { @@ -6,10 +6,10 @@ LL | enum ProceduralMasqueradeDummyType { | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #83125 - = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives + = note: the `allsorts-rental` crate will stop compiling in future versions of Rust; please switch to `rental` v0.5.6, or switch to one of the `rental` alternatives like `ouroboros` = note: `#[deny(proc_macro_back_compat)]` on by default -error: using an old version of `rental` +error: using `allsorts-rental` --> $DIR/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs:4:6 | LL | enum ProceduralMasqueradeDummyType { @@ -17,9 +17,9 @@ LL | enum ProceduralMasqueradeDummyType { | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #83125 - = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives + = note: the `allsorts-rental` crate will stop compiling in future versions of Rust; please switch to `rental` v0.5.6, or switch to one of the `rental` alternatives like `ouroboros` -error: using an old version of `rental` +error: using `allsorts-rental` --> $DIR/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs:4:6 | LL | enum ProceduralMasqueradeDummyType { @@ -27,9 +27,9 @@ LL | enum ProceduralMasqueradeDummyType { | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #83125 - = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives + = note: the `allsorts-rental` crate will stop compiling in future versions of Rust; please switch to `rental` v0.5.6, or switch to one of the `rental` alternatives like `ouroboros` -error: using an old version of `rental` +error: using `allsorts-rental` --> $DIR/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs:4:6 | LL | enum ProceduralMasqueradeDummyType { @@ -37,12 +37,12 @@ LL | enum ProceduralMasqueradeDummyType { | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #83125 - = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives + = note: the `allsorts-rental` crate will stop compiling in future versions of Rust; please switch to `rental` v0.5.6, or switch to one of the `rental` alternatives like `ouroboros` error: aborting due to 4 previous errors Future incompatibility report: Future breakage diagnostic: -error: using an old version of `rental` +error: using `allsorts-rental` --> $DIR/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs:4:6 | LL | enum ProceduralMasqueradeDummyType { @@ -50,11 +50,11 @@ LL | enum ProceduralMasqueradeDummyType { | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #83125 - = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives + = note: the `allsorts-rental` crate will stop compiling in future versions of Rust; please switch to `rental` v0.5.6, or switch to one of the `rental` alternatives like `ouroboros` = note: `#[deny(proc_macro_back_compat)]` on by default Future breakage diagnostic: -error: using an old version of `rental` +error: using `allsorts-rental` --> $DIR/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs:4:6 | LL | enum ProceduralMasqueradeDummyType { @@ -62,11 +62,11 @@ LL | enum ProceduralMasqueradeDummyType { | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #83125 - = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives + = note: the `allsorts-rental` crate will stop compiling in future versions of Rust; please switch to `rental` v0.5.6, or switch to one of the `rental` alternatives like `ouroboros` = note: `#[deny(proc_macro_back_compat)]` on by default Future breakage diagnostic: -error: using an old version of `rental` +error: using `allsorts-rental` --> $DIR/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs:4:6 | LL | enum ProceduralMasqueradeDummyType { @@ -74,11 +74,11 @@ LL | enum ProceduralMasqueradeDummyType { | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #83125 - = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives + = note: the `allsorts-rental` crate will stop compiling in future versions of Rust; please switch to `rental` v0.5.6, or switch to one of the `rental` alternatives like `ouroboros` = note: `#[deny(proc_macro_back_compat)]` on by default Future breakage diagnostic: -error: using an old version of `rental` +error: using `allsorts-rental` --> $DIR/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs:4:6 | LL | enum ProceduralMasqueradeDummyType { @@ -86,6 +86,6 @@ LL | enum ProceduralMasqueradeDummyType { | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #83125 - = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives + = note: the `allsorts-rental` crate will stop compiling in future versions of Rust; please switch to `rental` v0.5.6, or switch to one of the `rental` alternatives like `ouroboros` = note: `#[deny(proc_macro_back_compat)]` on by default diff --git a/tests/ui/proc-macro/pretty-print-hack-show.remapped.stderr b/tests/ui/proc-macro/pretty-print-hack-show.remapped.stderr index 873054927c962..692453829651b 100644 --- a/tests/ui/proc-macro/pretty-print-hack-show.remapped.stderr +++ b/tests/ui/proc-macro/pretty-print-hack-show.remapped.stderr @@ -1,4 +1,4 @@ -error: using an old version of `rental` +error: using `allsorts-rental` --> $DIR/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs:4:6 | LL | enum ProceduralMasqueradeDummyType { @@ -6,10 +6,10 @@ LL | enum ProceduralMasqueradeDummyType { | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #83125 - = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives + = note: the `allsorts-rental` crate will stop compiling in future versions of Rust; please switch to `rental` v0.5.6, or switch to one of the `rental` alternatives like `ouroboros` = note: `#[deny(proc_macro_back_compat)]` on by default -error: using an old version of `rental` +error: using `allsorts-rental` --> $DIR/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs:4:6 | LL | enum ProceduralMasqueradeDummyType { @@ -17,9 +17,9 @@ LL | enum ProceduralMasqueradeDummyType { | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #83125 - = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives + = note: the `allsorts-rental` crate will stop compiling in future versions of Rust; please switch to `rental` v0.5.6, or switch to one of the `rental` alternatives like `ouroboros` -error: using an old version of `rental` +error: using `allsorts-rental` --> $DIR/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs:4:6 | LL | enum ProceduralMasqueradeDummyType { @@ -27,9 +27,9 @@ LL | enum ProceduralMasqueradeDummyType { | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #83125 - = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives + = note: the `allsorts-rental` crate will stop compiling in future versions of Rust; please switch to `rental` v0.5.6, or switch to one of the `rental` alternatives like `ouroboros` -error: using an old version of `rental` +error: using `allsorts-rental` --> $DIR/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs:4:6 | LL | enum ProceduralMasqueradeDummyType { @@ -37,52 +37,12 @@ LL | enum ProceduralMasqueradeDummyType { | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #83125 - = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives + = note: the `allsorts-rental` crate will stop compiling in future versions of Rust; please switch to `rental` v0.5.6, or switch to one of the `rental` alternatives like `ouroboros` -error: using an old version of `rental` - --> $DIR/pretty-print-hack/rental-0.5.5/src/lib.rs:4:6 - | -LL | enum ProceduralMasqueradeDummyType { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #83125 - = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives - -error: using an old version of `rental` - --> $DIR/pretty-print-hack/rental-0.5.5/src/lib.rs:4:6 - | -LL | enum ProceduralMasqueradeDummyType { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #83125 - = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives - -error: using an old version of `rental` - --> $DIR/pretty-print-hack/rental-0.5.5/src/lib.rs:4:6 - | -LL | enum ProceduralMasqueradeDummyType { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #83125 - = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives - -error: using an old version of `rental` - --> $DIR/pretty-print-hack/rental-0.5.5/src/lib.rs:4:6 - | -LL | enum ProceduralMasqueradeDummyType { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #83125 - = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives - -error: aborting due to 8 previous errors +error: aborting due to 4 previous errors Future incompatibility report: Future breakage diagnostic: -error: using an old version of `rental` +error: using `allsorts-rental` --> $DIR/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs:4:6 | LL | enum ProceduralMasqueradeDummyType { @@ -90,11 +50,11 @@ LL | enum ProceduralMasqueradeDummyType { | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #83125 - = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives + = note: the `allsorts-rental` crate will stop compiling in future versions of Rust; please switch to `rental` v0.5.6, or switch to one of the `rental` alternatives like `ouroboros` = note: `#[deny(proc_macro_back_compat)]` on by default Future breakage diagnostic: -error: using an old version of `rental` +error: using `allsorts-rental` --> $DIR/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs:4:6 | LL | enum ProceduralMasqueradeDummyType { @@ -102,11 +62,11 @@ LL | enum ProceduralMasqueradeDummyType { | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #83125 - = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives + = note: the `allsorts-rental` crate will stop compiling in future versions of Rust; please switch to `rental` v0.5.6, or switch to one of the `rental` alternatives like `ouroboros` = note: `#[deny(proc_macro_back_compat)]` on by default Future breakage diagnostic: -error: using an old version of `rental` +error: using `allsorts-rental` --> $DIR/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs:4:6 | LL | enum ProceduralMasqueradeDummyType { @@ -114,11 +74,11 @@ LL | enum ProceduralMasqueradeDummyType { | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #83125 - = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives + = note: the `allsorts-rental` crate will stop compiling in future versions of Rust; please switch to `rental` v0.5.6, or switch to one of the `rental` alternatives like `ouroboros` = note: `#[deny(proc_macro_back_compat)]` on by default Future breakage diagnostic: -error: using an old version of `rental` +error: using `allsorts-rental` --> $DIR/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs:4:6 | LL | enum ProceduralMasqueradeDummyType { @@ -126,54 +86,6 @@ LL | enum ProceduralMasqueradeDummyType { | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #83125 - = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives - = note: `#[deny(proc_macro_back_compat)]` on by default - -Future breakage diagnostic: -error: using an old version of `rental` - --> $DIR/pretty-print-hack/rental-0.5.5/src/lib.rs:4:6 - | -LL | enum ProceduralMasqueradeDummyType { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #83125 - = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives - = note: `#[deny(proc_macro_back_compat)]` on by default - -Future breakage diagnostic: -error: using an old version of `rental` - --> $DIR/pretty-print-hack/rental-0.5.5/src/lib.rs:4:6 - | -LL | enum ProceduralMasqueradeDummyType { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #83125 - = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives - = note: `#[deny(proc_macro_back_compat)]` on by default - -Future breakage diagnostic: -error: using an old version of `rental` - --> $DIR/pretty-print-hack/rental-0.5.5/src/lib.rs:4:6 - | -LL | enum ProceduralMasqueradeDummyType { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #83125 - = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives - = note: `#[deny(proc_macro_back_compat)]` on by default - -Future breakage diagnostic: -error: using an old version of `rental` - --> $DIR/pretty-print-hack/rental-0.5.5/src/lib.rs:4:6 - | -LL | enum ProceduralMasqueradeDummyType { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #83125 - = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives + = note: the `allsorts-rental` crate will stop compiling in future versions of Rust; please switch to `rental` v0.5.6, or switch to one of the `rental` alternatives like `ouroboros` = note: `#[deny(proc_macro_back_compat)]` on by default diff --git a/tests/ui/proc-macro/pretty-print-hack-show.remapped.stdout b/tests/ui/proc-macro/pretty-print-hack-show.remapped.stdout index 3d793d2a0145c..17436d275f9bc 100644 --- a/tests/ui/proc-macro/pretty-print-hack-show.remapped.stdout +++ b/tests/ui/proc-macro/pretty-print-hack-show.remapped.stdout @@ -20,8 +20,7 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [ span: $DIR/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs:4:36: 14:2 (#0), }, ] -PRINT-DERIVE INPUT (DISPLAY): enum ProceduralMasqueradeDummyType { Input, } -PRINT-DERIVE RE-COLLECTED (DISPLAY): enum ProceduralMasqueradeDummyType { Input } +PRINT-DERIVE INPUT (DISPLAY): enum ProceduralMasqueradeDummyType { Input } PRINT-DERIVE INPUT (DEBUG): TokenStream [ Ident { ident: "enum",