-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Compiler crashes on syntax error when trying to call a function from a dependency #96738
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Labels
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
regression-from-stable-to-nightly
Performance or correctness regression from stable to nightly.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
Minimal example (using fn main() {
Some.nonexistent_method();
} Errors without ICE on stable and beta:
This probably regressed in #92569, which added the @rustbot label regression-from-stable-to-nightly |
Closed
JohnTitor
added a commit
to JohnTitor/rust
that referenced
this issue
May 5, 2022
This was referenced May 5, 2022
Merged
compiler-errors
added a commit
to compiler-errors/rust
that referenced
this issue
May 5, 2022
…, r=compiler-errors Add `track_caller` to `DefId::expect_local()` Suggested in rust-lang#96738 (comment). `DefId::expect_local()` often causes ICEs (panics) and should be a good candidate to add `track_caller`.
compiler-errors
added a commit
to compiler-errors/rust
that referenced
this issue
May 6, 2022
…, r=compiler-errors Add `track_caller` to `DefId::expect_local()` Suggested in rust-lang#96738 (comment). `DefId::expect_local()` often causes ICEs (panics) and should be a good candidate to add `track_caller`.
compiler-errors
added a commit
to compiler-errors/rust
that referenced
this issue
May 6, 2022
…, r=compiler-errors Add `track_caller` to `DefId::expect_local()` Suggested in rust-lang#96738 (comment). `DefId::expect_local()` often causes ICEs (panics) and should be a good candidate to add `track_caller`.
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this issue
May 6, 2022
Fix an ICE on rust-lang#96738 In the block we don't know if the method actually exists thus `expect_local` panics. Fixes rust-lang#96738
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
May 7, 2022
…piler-errors Rollup of 8 pull requests Successful merges: - rust-lang#96660 ([bootstrap] Give a better error when trying to run a path with no registered step) - rust-lang#96701 (update `jemallocator` example to use 2018 edition import syntax) - rust-lang#96746 (Fix an ICE on rust-lang#96738) - rust-lang#96758 (bootstrap: bsd platform flags for split debuginfo) - rust-lang#96778 (Remove closures on `expect_local` to apply `#[track_caller]`) - rust-lang#96781 (Fix an incorrect link in The Unstable Book) - rust-lang#96783 (Link to correct issue in issue-95034 known-bug) - rust-lang#96801 (Add regression test for rust-lang#96319) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Closed
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
May 9, 2022
…er-errors Actually fix ICE from rust-lang#96583 PR rust-lang#96746 fixed a very similar bug, so the same logic is used in a different place. I originally concluded that the two issues (rust-lang#96583 and rust-lang#96738) were identical by comparing the backtrace, but I didn't look close enough.
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
regression-from-stable-to-nightly
Performance or correctness regression from stable to nightly.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Hi,
I am running rustc 1.62.0-nightly (4c60a0e 2022-05-04) on x86_64-pc-windows-msvc
(via rust-toolchain.toml)
Code
I have a binary and a library. The binary depends on the library. The directory structure looks like this:
binary
lib
The lib.rs has this one line.
The main.rs consumes this in the following way.
Error output
Setting RUST_BACKTRACE=1 did not make a difference.
I was not sure how to distinguish error output from the stacktrace. Thus, I left it in one piece.
Please let me know, if you need more information or if the report is malformed. It is my first time reporting a bug here.
Thanks for your awesome work!
The text was updated successfully, but these errors were encountered: