about summary refs log tree commit diff
path: root/tests/ui/generic-associated-types/issue-71176.rs
blob: 8ecfa93750d4844d8177cc7a03b1e0f34a6c408e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
trait Provider {
    type A<'a>;
}

impl Provider for () {
    type A<'a> = ();
}

struct Holder<B> {
  inner: Box<dyn Provider<A = B>>,
  //~^ ERROR: missing generics for associated type
  //~| ERROR: missing generics for associated type
  //~| ERROR: missing generics for associated type
  //~| ERROR: the trait `Provider` is not dyn compatible
}

fn main() {
    Holder {
        inner: Box::new(()),
        //~^ ERROR: the trait `Provider` is not dyn compatible
    };
}