about summary refs log tree commit diff
path: root/tests/ui/type-alias-impl-trait/issue-104817.rs
blob: 01935407e2bb2233c0c6953120f95e50f20e0311 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#![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;
#[define_opaque(OpaqueType)]
fn mk_opaque() -> OpaqueType {
    || 0
}
trait AnotherTrait {}
impl<T: Send> AnotherTrait for T {}
impl AnotherTrait for OpaqueType {}
//[stock]~^ ERROR conflicting implementations of trait `AnotherTrait`

fn main() {}