NV
Size: a a a
NV
H
NV
H
АГ
EG
error[E0308]: mismatched types
--> src/list.rs:94:13
|
94 | let () = clone;
| ^^ expected struct `list::List`, found `()`
|
= note: expected struct `list::List<T>`
found unit type `()`
error[E0308]: mismatched types
--> src/list.rs:95:18
|
95 | IntoIter(clone)
| ^^^^^ expected struct `list::List`, found `&list::List<T>`
|
= note: expected struct `list::List<T>`
found reference `&list::List<T>`
let () = clone
и он мне говорит, что тип clone
— это list::List<T>
IntoIter(clone)
и ВНЕЗАПНО тип clone
— это &list::List<T>
EG
clone
получен методом, собственно, клонирования и откуда взялся референс я не понимаюEG
error[E0308]: mismatched types
--> src/list.rs:94:23
|
94 | let _: Self = self.clone();
| ---- ^^^^^^^^^^^^ expected struct `list::List`, found `&list::List<T>`
| |
| expected due to this
|
= note: expected struct `list::List<T>`
found reference `&list::List<T>`
#[derive(Clone)]
что-то пошло не такEG
EG
T
не клонируемый (и where T: Clone
действительно чинит ситуацию), но Rc<T>
не помогает:ИЛ
EG
EG
Clone
, да.EG
thread panicked while panicking
И SIGILL в safe-кодеMB
MB
EG
Drop
вызывает функцию, которая паникуетEG
Drop
, Drop
паникует и всё летит к чёртуM
BD