Closed
Description
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