-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only apply ProceduralMasquerade
hack to older versions of rental
#94063
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
91 changes: 0 additions & 91 deletions
91
src/test/ui/proc-macro/issue-73933-procedural-masquerade.stderr
This file was deleted.
Oops, something went wrong.
11 changes: 5 additions & 6 deletions
11
src/test/ui/proc-macro/issue-73933-procedural-masquerade.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 |
---|---|---|
@@ -1,22 +1,21 @@ | ||
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", | ||
span: #0 bytes(86..90), | ||
span: #0 bytes(100..104), | ||
}, | ||
Ident { | ||
ident: "ProceduralMasqueradeDummyType", | ||
span: #0 bytes(91..120), | ||
span: #0 bytes(105..134), | ||
}, | ||
Group { | ||
delimiter: Brace, | ||
stream: TokenStream [ | ||
Ident { | ||
ident: "Input", | ||
span: #0 bytes(315..320), | ||
span: #0 bytes(141..146), | ||
}, | ||
], | ||
span: #0 bytes(121..322), | ||
span: #0 bytes(135..148), | ||
}, | ||
] |
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,12 @@ | ||
// aux-build:test-macros.rs | ||
// compile-flags: -Z span-debug | ||
// check-pass | ||
|
||
#![no_std] // Don't load unnecessary hygiene information from std | ||
extern crate std; | ||
|
||
#[macro_use] extern crate test_macros; | ||
|
||
include!("pretty-print-hack/rental-0.5.6/src/lib.rs"); | ||
|
||
fn main() {} |
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,21 @@ | ||
PRINT-DERIVE INPUT (DISPLAY): enum ProceduralMasqueradeDummyType { Input } | ||
PRINT-DERIVE INPUT (DEBUG): TokenStream [ | ||
Ident { | ||
ident: "enum", | ||
span: $DIR/pretty-print-hack/rental-0.5.6/src/lib.rs:4:1: 4:5 (#0), | ||
}, | ||
Ident { | ||
ident: "ProceduralMasqueradeDummyType", | ||
span: $DIR/pretty-print-hack/rental-0.5.6/src/lib.rs:4:6: 4:35 (#0), | ||
}, | ||
Group { | ||
delimiter: Brace, | ||
stream: TokenStream [ | ||
Ident { | ||
ident: "Input", | ||
span: $DIR/pretty-print-hack/rental-0.5.6/src/lib.rs:13:5: 13:10 (#0), | ||
}, | ||
], | ||
span: $DIR/pretty-print-hack/rental-0.5.6/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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// aux-build:test-macros.rs | ||
// compile-flags: -Z span-debug | ||
|
||
#![no_std] // Don't load unnecessary hygiene information from std | ||
extern crate std; | ||
|
||
#[macro_use] extern crate test_macros; | ||
|
||
mod first { | ||
include!("pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs"); | ||
} | ||
|
||
mod second { | ||
include!("pretty-print-hack/rental-0.5.5/src/lib.rs"); | ||
} | ||
|
||
fn main() {} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't this only lint if
ProceduralMasqueradeDummyType::Input
is used in therental
crate, instead of - what i would expect - being from therental
crate but used in any other crate.apart from this this change seems good to me, even though I am not too knowledgeable about this backcompat issue ^^ with this nit resolved, r=me after a compiler fcp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's correct - this type is an implementation detail of
rental
, and only gets used from a macro: https://github.com/jpernst/rental/blob/61188eb97f5d99b10fc1fdd469b259c4ab4bf940/src/lib.rs#L90-L98Since it's in a macro, the file path will always be pointing to rental.