mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
13 lines
355 B
Rust
13 lines
355 B
Rust
#![feature(type_alias_impl_trait)]
|
|
trait OpaqueTrait {}
|
|
impl<T> OpaqueTrait for T {}
|
|
type OpaqueType = impl OpaqueTrait;
|
|
fn mk_opaque() -> OpaqueType {
|
|
|| 0
|
|
}
|
|
trait AnotherTrait {}
|
|
impl<T: Send> AnotherTrait for T {}
|
|
impl AnotherTrait for OpaqueType {}
|
|
//~^ ERROR conflicting implementations of trait `AnotherTrait` for type `OpaqueType`
|
|
fn main() {}
|