This repository was archived by the owner on May 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit e57194e
committed
ices/79422.rs: fixed with errors
=== stdout ===
=== stderr ===
error[E0107]: missing generics for associated type `MapLike::VRefCont`
--> /home/runner/work/glacier/glacier/ices/79422.rs:21:10
|
21 | type VRefCont<'a>: RefCont<'a, V>;
| ^^^^^^^^ expected 1 lifetime argument
|
note: associated type defined here, with 1 lifetime parameter: `'a`
--> /home/runner/work/glacier/glacier/ices/79422.rs:21:10
|
21 | type VRefCont<'a>: RefCont<'a, V>;
| ^^^^^^^^ --
help: use angle brackets to add missing lifetime argument
|
21 | type VRefCont<'a><'a>: RefCont<'a, V>;
| ^^^^
error[E0038]: the trait `MapLike` cannot be made into an object
--> /home/runner/work/glacier/glacier/ices/79422.rs:43:12
|
43 | as Box<dyn MapLike<u8, u8, VRefCont = dyn RefCont<'_, u8>>>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `MapLike` cannot be made into an object
|
= help: consider moving `get` to another trait
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
--> /home/runner/work/glacier/glacier/ices/79422.rs:22:38
|
20 | trait MapLike<K, V> {
| ------- this trait cannot be made into an object...
21 | type VRefCont<'a>: RefCont<'a, V>;
22 | fn get<'a>(&'a self, key: &K) -> Option<Self::VRefCont<'a>>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ ...because method `get` references the `Self` type in its return type
error[E0038]: the trait `MapLike` cannot be made into an object
--> /home/runner/work/glacier/glacier/ices/79422.rs:42:13
|
42 | let m = Box::new(std::collections::BTreeMap::<u8, u8>::new())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `MapLike` cannot be made into an object
|
= help: consider moving `get` to another trait
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
--> /home/runner/work/glacier/glacier/ices/79422.rs:22:38
|
20 | trait MapLike<K, V> {
| ------- this trait cannot be made into an object...
21 | type VRefCont<'a>: RefCont<'a, V>;
22 | fn get<'a>(&'a self, key: &K) -> Option<Self::VRefCont<'a>>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ ...because method `get` references the `Self` type in its return type
= note: required because of the requirements on the impl of `CoerceUnsized<Box<dyn MapLike<u8, u8, VRefCont = (dyn RefCont<'_, u8> + 'static)>>>` for `Box<BTreeMap<u8, u8>>`
= note: required by cast to type `Box<dyn MapLike<u8, u8, VRefCont = (dyn RefCont<'_, u8> + 'static)>>`
error: aborting due to 3 previous errors
Some errors have detailed explanations: E0038, E0107.
For more information about an error, try `rustc --explain E0038`.
==============1 parent 12bb105 commit e57194eCopy full SHA for e57194e
1 file changed
+0
-0
lines changedices/79422.rs renamed to fixed/79422.rs
Copy file name to clipboardFile renamed without changes.
0 commit comments