mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
20 lines
381 B
Rust
20 lines
381 B
Rust
// can't use build-fail, because this also fails check-fail, but
|
|
// the ICE from #120787 only reproduces on build-fail.
|
|
//@ compile-flags: --emit=mir
|
|
|
|
#![feature(type_alias_impl_trait)]
|
|
|
|
struct Foo {
|
|
field: String,
|
|
}
|
|
|
|
type Tait = impl Sized;
|
|
|
|
fn ice_cold(beverage: Tait) {
|
|
let Foo { field } = beverage;
|
|
_ = field;
|
|
}
|
|
|
|
fn main() {
|
|
Ok(()) //~ ERROR mismatched types
|
|
}
|