rust/tests/ui/implied-bounds/references-err.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
419 B
Rust
Raw Normal View History

trait Identity {
type Identity;
}
impl<T> Identity for T {
type Identity = T;
}
trait Trait {
type Assoc: Identity;
fn tokenize(&self) -> <Self::Assoc as Identity>::Identity;
}
impl Trait for () {
type Assoc = DoesNotExist;
//~^ ERROR cannot find type `DoesNotExist` in this scope
fn tokenize(&self) -> <Self::Assoc as Identity>::Identity {
unimplemented!()
}
}
fn main() {}