rust/tests/ui/associated-types/associated-types-for-unimpl...

17 lines
395 B
Rust

//@ run-rustfix
#![allow(dead_code)]
#![allow(unused_variables)]
trait Get {
type Value;
fn get(&self) -> <Self as Get>::Value;
}
trait Other {
fn uhoh<U: Get>(&self, foo: U, bar: <Self as Get>::Value) where Self: Sized, Self: Get, Self: Get {}
//~^ ERROR the trait bound `Self: Get` is not satisfied
//~| ERROR the trait bound `Self: Get` is not satisfied
}
fn main() {}