-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #106816 - TimNN:rental-remap, r=oli-obj
Update `rental` hack to work with remapped paths. This PR simply switches to an already-existing helper instead of hard-coding a specific enum variant. The new revision of the test fails without the other changes in this PR. Context: I'm exploring running UI tests with remapped paths by default in #105924 and the rental test was one of the ones that failed. This may also be useful in the context of rust-lang/rfcs#3127 ("New rustc and Cargo options to allow path sanitisation by default").
- Loading branch information
Showing
6 changed files
with
235 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
179 changes: 179 additions & 0 deletions
179
tests/ui/proc-macro/pretty-print-hack-show.remapped.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,179 @@ | ||
error: using an old version of `rental` | ||
--> remapped/proc-macro/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: `#[deny(proc_macro_back_compat)]` on by default | ||
|
||
error: using an old version of `rental` | ||
--> remapped/proc-macro/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 | ||
|
||
error: using an old version of `rental` | ||
--> remapped/proc-macro/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 | ||
|
||
error: using an old version of `rental` | ||
--> remapped/proc-macro/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 | ||
|
||
error: using an old version of `rental` | ||
--> remapped/proc-macro/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 <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 | ||
|
||
error: using an old version of `rental` | ||
--> remapped/proc-macro/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 <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 | ||
|
||
error: using an old version of `rental` | ||
--> remapped/proc-macro/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 <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 | ||
|
||
error: using an old version of `rental` | ||
--> remapped/proc-macro/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 <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 | ||
|
||
error: aborting due to 8 previous errors | ||
|
||
Future incompatibility report: Future breakage diagnostic: | ||
error: using an old version of `rental` | ||
--> remapped/proc-macro/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: `#[deny(proc_macro_back_compat)]` on by default | ||
|
||
Future breakage diagnostic: | ||
error: using an old version of `rental` | ||
--> remapped/proc-macro/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: `#[deny(proc_macro_back_compat)]` on by default | ||
|
||
Future breakage diagnostic: | ||
error: using an old version of `rental` | ||
--> remapped/proc-macro/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: `#[deny(proc_macro_back_compat)]` on by default | ||
|
||
Future breakage diagnostic: | ||
error: using an old version of `rental` | ||
--> remapped/proc-macro/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: `#[deny(proc_macro_back_compat)]` on by default | ||
|
||
Future breakage diagnostic: | ||
error: using an old version of `rental` | ||
--> remapped/proc-macro/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 <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: `#[deny(proc_macro_back_compat)]` on by default | ||
|
||
Future breakage diagnostic: | ||
error: using an old version of `rental` | ||
--> remapped/proc-macro/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 <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: `#[deny(proc_macro_back_compat)]` on by default | ||
|
||
Future breakage diagnostic: | ||
error: using an old version of `rental` | ||
--> remapped/proc-macro/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 <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: `#[deny(proc_macro_back_compat)]` on by default | ||
|
||
Future breakage diagnostic: | ||
error: using an old version of `rental` | ||
--> remapped/proc-macro/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 <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: `#[deny(proc_macro_back_compat)]` on by default | ||
|
44 changes: 44 additions & 0 deletions
44
tests/ui/proc-macro/pretty-print-hack-show.remapped.stdout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
PRINT-DERIVE INPUT (DISPLAY): enum ProceduralMasqueradeDummyType { Input, } | ||
PRINT-DERIVE RE-COLLECTED (DISPLAY): enum ProceduralMasqueradeDummyType { Input } | ||
PRINT-DERIVE INPUT (DEBUG): TokenStream [ | ||
Ident { | ||
ident: "enum", | ||
span: remapped/proc-macro/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs:4:1: 4:5 (#0), | ||
}, | ||
Ident { | ||
ident: "ProceduralMasqueradeDummyType", | ||
span: remapped/proc-macro/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs:4:6: 4:35 (#0), | ||
}, | ||
Group { | ||
delimiter: Brace, | ||
stream: TokenStream [ | ||
Ident { | ||
ident: "Input", | ||
span: remapped/proc-macro/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs:13:5: 13:10 (#0), | ||
}, | ||
], | ||
span: remapped/proc-macro/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 (DEBUG): TokenStream [ | ||
Ident { | ||
ident: "enum", | ||
span: remapped/proc-macro/pretty-print-hack/rental-0.5.5/src/lib.rs:4:1: 4:5 (#0), | ||
}, | ||
Ident { | ||
ident: "ProceduralMasqueradeDummyType", | ||
span: remapped/proc-macro/pretty-print-hack/rental-0.5.5/src/lib.rs:4:6: 4:35 (#0), | ||
}, | ||
Group { | ||
delimiter: Brace, | ||
stream: TokenStream [ | ||
Ident { | ||
ident: "Input", | ||
span: remapped/proc-macro/pretty-print-hack/rental-0.5.5/src/lib.rs:13:5: 13:10 (#0), | ||
}, | ||
], | ||
span: remapped/proc-macro/pretty-print-hack/rental-0.5.5/src/lib.rs:4:36: 14:2 (#0), | ||
}, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters