2023-06-18 22:10:07 +00:00
|
|
|
#![feature(type_alias_impl_trait)]
|
|
|
|
|
|
|
|
|
|
type T = impl Sized;
|
|
|
|
|
|
|
|
|
|
struct Foo;
|
|
|
|
|
|
|
|
|
|
impl Into<T> for Foo {
|
2024-07-26 10:04:02 +00:00
|
|
|
//~^ ERROR conflicting implementations of trait `Into<_>` for type `Foo`
|
|
|
|
|
#[define_opaque(T)]
|
2023-06-18 22:10:07 +00:00
|
|
|
fn into(self) -> T {
|
|
|
|
|
Foo
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
let _: T = Foo.into();
|
|
|
|
|
}
|