Skip to content
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

internal compiler error: expected NodeId to be lowered already for res Local... #69401

Closed
dwrensha opened this issue Feb 23, 2020 · 5 comments · Fixed by #69539 or #102161
Closed

internal compiler error: expected NodeId to be lowered already for res Local... #69401

dwrensha opened this issue Feb 23, 2020 · 5 comments · Fixed by #69539 or #102161
Assignees
Labels
A-hir Area: The high-level intermediate representation (HIR) C-bug Category: This is a bug. glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-high High priority 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

@dwrensha
Copy link
Contributor

I'm seeing an internal compiler error on the following input (found by fuzz-rustc):

struct Inv<'a> {
    x: &'a u8
}
pub trait Foo {
    fn no_bound(b: Inv<(b)>);
}
$ rustc main.rs
error[E0573]: expected type, found local variable `b`
 --> main.rs:5:25
  |
5 |     fn no_bound(b: Inv<(b)>);
  |                         ^ not a type

thread 'rustc' panicked at 'expected `NodeId` to be lowered already for res Local(
    NodeId(21),
)', src/librustc_ast_lowering/lib.rs:662:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.43.0-nightly (5d04ce67f 2020-02-13) running on x86_64-unknown-linux-gnu

error: aborting due to previous error

For more information about this error, try `rustc --explain E0573`.

@dwrensha
Copy link
Contributor Author

Report from cargo-bisect-rustc:

searched nightlies: from nightly-2020-01-01 to nightly-2020-02-16
regressed nightly: nightly-2020-02-07
searched commits: from 58b8343 to 442ae7f
regressed commit: 442ae7f

@jonas-schievink jonas-schievink added A-hir Area: The high-level intermediate representation (HIR) C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ I-nominated T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 23, 2020
@dwrensha
Copy link
Contributor Author

It looks like #68788 caused the regression. (The error happens at 9a4eac3 but not at c9290dc.)
cc @Centril

@dwrensha
Copy link
Contributor Author

The specific commit where the error starts happening is b2c6eeb.

@pnkfelix pnkfelix added the regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. label Feb 27, 2020
@pnkfelix
Copy link
Member

triage: P-high. Removing nomination. Added regression stable-to-nightly tag.

@pnkfelix pnkfelix added P-high High priority and removed I-nominated labels Feb 27, 2020
@rust-lang-glacier-bot rust-lang-glacier-bot added the glacier ICE tracked in rust-lang/glacier. label Feb 28, 2020
@Centril Centril self-assigned this Feb 28, 2020
@Centril
Copy link
Contributor

Centril commented Feb 28, 2020

Fixed by #69539.

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Feb 28, 2020
late resolve, visit_fn: bail early if there's no body.

Fixes rust-lang#69401 which was injected by rust-lang@b2c6eeb in rust-lang#68788.

r? @petrochenkov
@bors bors closed this as completed in b95945c Feb 28, 2020
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Sep 24, 2022
…andry

Resolve async fn signature even without body (e.g., in trait)

Fixes rust-lang#102138

This "bail if no body" behavior was introduced in rust-lang#69539 to fix rust-lang#69401, but that ICE does not reproduce any more. The error message changes a bit, but that's all, and I don't think it's a particularly diagnostic bad regression.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Sep 25, 2022
…andry

Resolve async fn signature even without body (e.g., in trait)

Fixes rust-lang#102138

This "bail if no body" behavior was introduced in rust-lang#69539 to fix rust-lang#69401, but that ICE does not reproduce any more. The error message changes a bit, but that's all, and I don't think it's a particularly diagnostic bad regression.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-hir Area: The high-level intermediate representation (HIR) C-bug Category: This is a bug. glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-high High priority 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.
Projects
None yet
5 participants