Skip to content

ICE with generic new-type structs #4188

Closed
@brendanzab

Description

@brendanzab
struct Foo<T>(T);

fn main() {
    let _ = Foo(42);
}
$ RUST_LOG=rustc=1,::rt::backtrace rustc --out-dir . src/test.rs
rust: task failed at 'unknown node type in type_use', /usr/local/src/rust/src/librustc/middle/trans/type_use.rs:139
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: task failed at 'explicit failure', /usr/local/src/rust/src/librustc/rustc.rc:483
rust: domain main @0x7fd7fa00bc10 root task failed
rust: task failed at 'killed', /usr/local/src/rust/src/libcore/task/mod.rs:630

Metadata

Metadata

Assignees

Labels

A-codegenArea: Code generationA-type-systemArea: Type systemI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions