2024-02-08 11:51:32 -06:00
|
|
|
// can't use build-fail, because this also fails check-fail, but
|
|
|
|
// the ICE from #120787 only reproduces on build-fail.
|
2024-02-16 14:02:50 -06:00
|
|
|
//@ compile-flags: --emit=mir
|
2024-02-08 11:51:32 -06:00
|
|
|
|
|
|
|
#![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
|
|
|
|
}
|