Open
Description
#![feature(type_alias_impl_trait)]
type Tait = impl Sized;
type Tait2 = impl Sized;
fn mk<T>() -> T { todo!() }
fn main() {
let x: Tait = 1u32;
let y: Tait2 = x;
}
the current solver intentionally hard errors when it encounters this situation https://github.com/rust-lang/rust/blob/fd9bf594366e73efb1a26a023e0b4de8eff82b94/compiler/rustc_infer/src/infer/opaque_types.rs#L152-L167
the behavior feels fairly straightforward and how I'd expect it to happen, so this is fine to me
Metadata
Metadata
Assignees
Labels
No labels