Skip to content

ICE: impossible struct constructor #56835

Closed
@petertodd

Description

@petertodd

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

Metadata

Metadata

Assignees

Labels

I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions