-
Notifications
You must be signed in to change notification settings - Fork 14k
Fix ICE caused by invalid spans for shrink_file #148735
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
chenyukang
wants to merge
3
commits into
rust-lang:master
Choose a base branch
from
chenyukang:yukang-fix-ice-148732
base: master
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.
+85
−3
Open
Changes from all commits
Commits
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 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| reuse a as b { | ||
| //~^ ERROR cannot find function `a` in this scope | ||
| //~| ERROR functions delegation is not yet fully implemented | ||
| dbg!(b); | ||
| //~^ ERROR missing lifetime specifier | ||
| } | ||
|
|
||
| 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| WARN rustc_errors::emitter Invalid span $SRC_DIR/std/src/macros.rs:LL:COL (#4), error=SourceNotAvailable { filename: Real(Remapped { local_path: None, virtual_name: "$SRC_DIR/std/src/macros.rs" }) } | ||
| WARN rustc_errors::emitter Invalid span $SRC_DIR/std/src/macros.rs:LL:COL (#4), error=SourceNotAvailable { filename: Real(Remapped { local_path: None, virtual_name: "$SRC_DIR/std/src/macros.rs" }) } | ||
| WARN rustc_errors::emitter Invalid span $SRC_DIR/std/src/macros.rs:LL:COL (#4), error=SourceNotAvailable { filename: Real(Remapped { local_path: None, virtual_name: "$SRC_DIR/std/src/macros.rs" }) } | ||
|
Comment on lines
+1
to
+3
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have worries that this will not pass aarch64-msvc-1 the same way it was in my PR
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah, it do have the same issue. |
||
| error[E0106]: missing lifetime specifier | ||
| --> $DIR/ice-line-bounds-issue-148732.rs:4:5 | ||
| | | ||
| LL | dbg!(b); | ||
| | ^^^^^^^ expected named lifetime parameter | ||
| | | ||
| = note: this error originates in the macro `dbg` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
| | | ||
|
|
||
| error[E0425]: cannot find function `a` in this scope | ||
| --> $DIR/ice-line-bounds-issue-148732.rs:1:7 | ||
| | | ||
| LL | reuse a as b { | ||
| | ^ not found in this scope | ||
|
|
||
| error[E0658]: functions delegation is not yet fully implemented | ||
| --> $DIR/ice-line-bounds-issue-148732.rs:1:1 | ||
| | | ||
| LL | / reuse a as b { | ||
| LL | | | ||
| LL | | | ||
| LL | | dbg!(b); | ||
| LL | | | ||
| LL | | } | ||
| | |_^ | ||
| | | ||
| = note: see issue #118212 <https://github.com/rust-lang/rust/issues/118212> for more information | ||
| = help: add `#![feature(fn_delegation)]` to the crate attributes to enable | ||
| = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date | ||
|
|
||
| error: aborting due to 3 previous errors | ||
|
|
||
| Some errors have detailed explanations: E0106, E0425, E0658. | ||
| For more information about an error, try `rustc --explain E0106`. | ||
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,9 @@ | ||
| struct A { | ||
| b: Vec<u8>, | ||
| c: usize, | ||
| } | ||
|
|
||
| fn main() { | ||
| A(2, vec![]) | ||
| //~^ ERROR expected function, tuple struct or tuple variant, found struct `A` | ||
| } |
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,22 @@ | ||
| WARN rustc_errors::emitter Invalid span $SRC_DIR/alloc/src/macros.rs:LL:COL (#4), error=SourceNotAvailable { filename: Real(Remapped { local_path: None, virtual_name: "$SRC_DIR/alloc/src/macros.rs" }) } | ||
| WARN rustc_errors::emitter Invalid span $SRC_DIR/alloc/src/macros.rs:LL:COL (#4), error=SourceNotAvailable { filename: Real(Remapped { local_path: None, virtual_name: "$SRC_DIR/alloc/src/macros.rs" }) } | ||
| WARN rustc_errors::emitter Invalid span $SRC_DIR/alloc/src/macros.rs:LL:COL (#4), error=SourceNotAvailable { filename: Real(Remapped { local_path: None, virtual_name: "$SRC_DIR/alloc/src/macros.rs" }) } | ||
| WARN rustc_errors::emitter Invalid span $SRC_DIR/alloc/src/macros.rs:LL:COL (#4), error=SourceNotAvailable { filename: Real(Remapped { local_path: None, virtual_name: "$SRC_DIR/alloc/src/macros.rs" }) } | ||
| WARN rustc_errors::emitter Invalid span $SRC_DIR/alloc/src/macros.rs:LL:COL (#4), error=SourceNotAvailable { filename: Real(Remapped { local_path: None, virtual_name: "$SRC_DIR/alloc/src/macros.rs" }) } | ||
| WARN rustc_errors::emitter Invalid span $SRC_DIR/alloc/src/macros.rs:LL:COL (#4), error=SourceNotAvailable { filename: Real(Remapped { local_path: None, virtual_name: "$SRC_DIR/alloc/src/macros.rs" }) } | ||
| error[E0423]: expected function, tuple struct or tuple variant, found struct `A` | ||
| --> $DIR/ice-line-bounds-issue-148684.rs:7:5 | ||
| | | ||
| LL | / struct A { | ||
| LL | | b: Vec<u8>, | ||
| LL | | c: usize, | ||
| LL | | } | ||
| | |_- `A` defined here | ||
| ... | ||
| LL | A(2, vec![]) | ||
| | ^^^^^^^^^^^^ | ||
| | | ||
|
|
||
| error: aborting due to 1 previous error | ||
|
|
||
| For more information about this error, try `rustc --explain E0423`. |
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
Using the
stable_idavoids issues with file name collisions when multiple versions of the same crate are present in the dependency graph. In theory,collect_annotationsshould be ensuring that thestable_ids match but it would be better to have it checked in both places.