summaryrefslogtreecommitdiffstats
path: root/tests/ui/type-alias-impl-trait/issue-104817.rs
blob: 0d3bace4db1f4baa6414c7d3b85fd5c46704be8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#![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() {}