mirror of https://github.com/rust-lang/rust
20 lines
502 B
Rust
20 lines
502 B
Rust
#![feature(type_alias_impl_trait)]
|
|
#![cfg_attr(specialized, feature(specialization))]
|
|
#![allow(incomplete_features)]
|
|
|
|
//@ revisions: stock specialized
|
|
//@ [specialized]check-pass
|
|
|
|
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 {}
|
|
//[stock]~^ conflicting implementations of trait `AnotherTrait` for type `OpaqueType`
|
|
|
|
fn main() {}
|