Skip to content

Commit

Permalink
Adjust lint to refer to allsorts-rental specifically
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron1011 committed Jan 21, 2023
1 parent 7cde639 commit 8dcea83
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 127 deletions.
8 changes: 4 additions & 4 deletions compiler/rustc_expand/src/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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;
Expand Down
32 changes: 16 additions & 16 deletions tests/ui/proc-macro/pretty-print-hack-show.local.stderr
Original file line number Diff line number Diff line change
@@ -1,91 +1,91 @@
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 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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 <https://github.com/rust-lang/rust/issues/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 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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 <https://github.com/rust-lang/rust/issues/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 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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 <https://github.com/rust-lang/rust/issues/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 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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 <https://github.com/rust-lang/rust/issues/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 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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 <https://github.com/rust-lang/rust/issues/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 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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 <https://github.com/rust-lang/rust/issues/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 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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 <https://github.com/rust-lang/rust/issues/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 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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 <https://github.com/rust-lang/rust/issues/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

Loading

0 comments on commit 8dcea83

Please sign in to comment.