about summary refs log tree commit diff
path: root/tests/ui/trait-bounds/maybe-bound-with-assoc.rs
blob: e123f18474d1c1efab0c5127622451e342b71460 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
trait HasAssoc {
    type Assoc;
}
fn hasassoc<T: ?HasAssoc<Assoc = ()>>() {}
//~^ ERROR bound modifier `?` can only be applied to `Sized`

trait NoAssoc {}
fn noassoc<T: ?NoAssoc<Missing = ()>>() {}
//~^ ERROR bound modifier `?` can only be applied to `Sized`
//~| ERROR associated type `Missing` not found for `NoAssoc`

fn main() {}