Repository navigation
Remap local def ids for deterministic metadata encoding #162809
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
Open
aerooneqq
wants to merge
5
commits into
rust-lang:main
Choose a base branch
from
aerooneqq:def-index-remapping
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+221
−19
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
eb934f8
Remap local def ids for deterministic metadata encoding
aerooneqq 5199056
Fix typos
aerooneqq 69f556b
Review: remove remapping map, use Vec instead
aerooneqq 81fe2b4
Use `first_non_det_index` instead of `last_deterministic_index`
aerooneqq b8c5190
Review: sort ids by their level first, then by stable hash
aerooneqq 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
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
3 changes: 3 additions & 0 deletions
3
tests/run-make/parallel-reproducible-build/async-fns-issue-162202.rs
This file contains hidden or 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,3 @@ | ||
| async fn test1(_: &'_ u8) {} | ||
| async fn test2<'s>(_: &'s u8) {} | ||
| fn main() {} |
This file contains hidden or 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
19 changes: 19 additions & 0 deletions
19
tests/run-make/parallel-reproducible-build/rpit-issue-162202.rs
This file contains hidden or 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,19 @@ | ||
| trait Foo { | ||
| fn test() -> impl IntoIterator<Item = ()> + Send; | ||
| } | ||
|
|
||
| struct A; | ||
| impl Foo for A { | ||
| fn test() -> impl IntoIterator<Item = ()> + Send { | ||
| [] | ||
| } | ||
| } | ||
|
|
||
| struct B; | ||
| impl Foo for B { | ||
| fn test() -> impl IntoIterator<Item = ()> + Send { | ||
| [] | ||
| } | ||
| } | ||
|
|
||
| fn main() {} |
4 changes: 4 additions & 0 deletions
4
tests/run-make/parallel-reproducible-build/static-muts-lib-issue-162203.rs
This file contains hidden or 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,4 @@ | ||
| #![crate_type = "lib"] | ||
| static mut TEST: &'static mut [isize] = &mut [1]; | ||
| static mut TEST_RAW: *mut [isize] = &mut [1isize] as *mut _; | ||
| pub 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.
Document the footgun of forgetting to use this method. We can't use different types (like a
EncodedDefId), because we also encode structures containing def ids that are used both in the type system and in metadata.