1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
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` cannot be made into an object
}
fn main() {
Holder {
inner: Box::new(()),
//~^ ERROR: the trait `Provider` cannot be made into an object
//~| ERROR: the trait `Provider` cannot be made into an object
};
}
|