about summary refs log tree commit diff
path: root/tests/ui/marker_trait_attr/unsound-overlap.rs
blob: 2ce26b610f65ddd1a63360f0b4e8a149483ca1e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#![feature(marker_trait_attr)]

#[marker]
trait A {}

trait B {}

impl<T: A> B for T {}
impl<T: B> A for T {}
impl A for &str {}
//~^ ERROR type annotations needed: cannot satisfy `&str: A`
impl<T: A + B> A for (T,) {}
trait TraitWithAssoc {
    type Assoc;
}

impl<T: A> TraitWithAssoc for T {
    type Assoc = T;
}

impl TraitWithAssoc for ((&str,),) {
    //~^ ERROR conflicting implementations
    type Assoc = ((&'static str,),);
}

fn main() {}