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

ICE: impossible struct constructor #56835

Closed
petertodd opened this issue Dec 14, 2018 · 3 comments
Closed

ICE: impossible struct constructor #56835

petertodd opened this issue Dec 14, 2018 · 3 comments
Assignees
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ regression-from-stable-to-stable Performance or correctness regression from one stable version to another. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@petertodd
Copy link
Contributor

Example:

pub struct Foo {}

impl Foo {
    fn bar(Self(foo): Self) {
    }   
}

fn main() {
}

Backtrace:

$ rustc impossible-struct-constructor.rs 
error: internal compiler error: src/librustc/hir/def.rs:316: impossible struct constructor

thread 'main' panicked at 'Box<Any>', src/librustc_errors/lib.rs:600:9
note: Run with `RUST_BACKTRACE=1` for a backtrace.
error: aborting due to previous error


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.32.0-nightly (f4a421ee3 2018-12-13) running on x86_64-unknown-linux-gnu
@Centril Centril added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Dec 15, 2018
@Centril
Copy link
Contributor

Centril commented Dec 15, 2018

Seems related to #56611; ideally we should beta backport the fix to this as well as #56611.

@alexreg
Copy link
Contributor

alexreg commented Dec 15, 2018

Already fixed in #56225, I'm glad to say. I've gone and added a regression test for this issue however. It's due to be r+'ed soon, with any luck.

@nagisa nagisa added the regression-from-stable-to-stable Performance or correctness regression from one stable version to another. label Dec 15, 2018
alexreg added a commit to alexreg/rust that referenced this issue Dec 15, 2018
alexreg added a commit to alexreg/rust that referenced this issue Dec 15, 2018
alexreg added a commit to alexreg/rust that referenced this issue Dec 15, 2018
alexreg added a commit to alexreg/rust that referenced this issue Dec 15, 2018
@pnkfelix pnkfelix added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Dec 20, 2018
pietroalbini pushed a commit to pietroalbini/rust that referenced this issue Dec 31, 2018
@davidtwco
Copy link
Member

Closing this as #56850 has fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ regression-from-stable-to-stable Performance or correctness regression from one stable version to another. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants