Borderou de evaluare (job #2640577)

Utilizator TincaMateiTinca Matei TincaMatei Data 6 august 2020 22:28:34
Problema Secv8 Status done
Runda Arhiva de probleme Compilator rs | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: error[E0382]: use of partially moved value: `a` --> main.rs:93:7 | 92 | let joined = Treap::join(a.right, Some(b)); | ------- value moved here 93 | a.right = joined; | ^^^^^^^^^^^^^^^^ value used here after move | = note: move occurs because `a.right` has type `std::option::Option<std::boxed::Box<Treap>>`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `b` --> main.rs:98:7 | 97 | let joined = Treap::join(Some(a), b.left); | ------ value moved here 98 | b.left = joined; | ^^^^^^^^^^^^^^^ value used here after move | = note: move occurs because `b.left` has type `std::option::Option<std::boxed::Box<Treap>>`, which does not implement the `Copy` trait error[E0382]: use of moved value: `t` --> main.rs:164:16 | 163 | let mut res = Treap::collect(t.left, collection); | ------ value moved here 164 | res.push(t.key); | ^^^^^ value used here after move | = note: move occurs because `t.left` has type `std::option::Option<std::boxed::Box<Treap>>`, which does not implement the `Copy` trait error[E0382]: use of moved value: `t` --> main.rs:165:35 | 163 | let mut res = Treap::collect(t.left, collection); | ------ value moved here 164 | res.push(t.key); 165 | collection = Treap::collect(t.right, res); | ^^^^^^^ value used here after move | = note: move occurs because `t.left` has type `std::option::Option<std::boxed::Box<Treap>>`, which does not implement the `Copy` trait error: aborting due to 4 previous errors For more information about this error, try `rustc --explain E0382`. Non zero exit status: 1

Ceva nu functioneaza?