1 error[E0107]: missing generics for associated type `MapLike::VRefCont`
2 --> $DIR/issue-79422.rs:47:36
4 LL | as Box<dyn MapLike<u8, u8, VRefCont = dyn RefCont<'_, u8>>>;
5 | ^^^^^^^^ expected 1 lifetime argument
7 note: associated type defined here, with 1 lifetime parameter: `'a`
8 --> $DIR/issue-79422.rs:23:10
10 LL | type VRefCont<'a>: RefCont<'a, V> where Self: 'a;
12 help: add missing lifetime argument
14 LL | as Box<dyn MapLike<u8, u8, VRefCont<'a> = dyn RefCont<'_, u8>>>;
17 error[E0271]: type mismatch resolving `<BTreeMap<u8, u8> as MapLike<u8, u8>>::VRefCont<'_> == (dyn RefCont<'_, u8> + 'static)`
18 --> $DIR/issue-79422.rs:44:13
20 LL | let m = Box::new(std::collections::BTreeMap::<u8, u8>::new())
21 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type mismatch resolving `<BTreeMap<u8, u8> as MapLike<u8, u8>>::VRefCont<'_> == (dyn RefCont<'_, u8> + 'static)`
23 note: expected this to be `(dyn RefCont<'_, u8> + 'static)`
24 --> $DIR/issue-79422.rs:28:25
26 LL | type VRefCont<'a> = &'a V where Self: 'a;
28 = note: expected trait object `(dyn RefCont<'_, u8> + 'static)`
30 = note: required for the cast from `BTreeMap<u8, u8>` to the object type `dyn MapLike<u8, u8, VRefCont = (dyn RefCont<'_, u8> + 'static)>`
32 error: aborting due to 2 previous errors
34 Some errors have detailed explanations: E0107, E0271.
35 For more information about an error, try `rustc --explain E0107`.