2021-08-18 09:27:25 -05:00
|
|
|
#![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 {}
|
2023-10-06 15:27:30 -05:00
|
|
|
//~^ ERROR type annotations needed: cannot satisfy `&str: A`
|
2021-08-18 09:27:25 -05:00
|
|
|
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() {}
|