1
Fork 0
rust/tests/ui/trait-bounds/maybe-bound-with-assoc.rs

12 lines
286 B
Rust

trait HasAssoc {
type Assoc;
}
fn hasassoc<T: ?HasAssoc<Assoc = ()>>() {}
//~^ ERROR relaxing a default bound
trait NoAssoc {}
fn noassoc<T: ?NoAssoc<Missing = ()>>() {}
//~^ ERROR relaxing a default bound
//~| ERROR associated type `Missing` not found for `NoAssoc`
fn main() {}