Update fn_once-moved test
This commit is contained in:
parent
ee88a870b6
commit
31bfdd7f17
@ -20,5 +20,6 @@ fn main() {
|
||||
debug_dump_dict();
|
||||
debug_dump_dict();
|
||||
//~^ ERROR use of moved value: `debug_dump_dict`
|
||||
//~| NOTE closure was moved because it only implements `FnOnce`
|
||||
//~| NOTE closure cannot be invoked more than once because it moves the
|
||||
//~| variable `dict` out of its environment
|
||||
}
|
||||
|
@ -1,12 +1,15 @@
|
||||
error[E0382]: use of moved value: `debug_dump_dict`
|
||||
--> $DIR/fn_once-moved.rs:21:5
|
||||
|
|
||||
16 | for (key, value) in dict {
|
||||
| ---- dict moved here
|
||||
...
|
||||
20 | debug_dump_dict();
|
||||
| --------------- value moved here
|
||||
21 | debug_dump_dict();
|
||||
| ^^^^^^^^^^^^^^^ value used here after move
|
||||
|
|
||||
= help: closure was moved because it only implements `FnOnce`
|
||||
= help: closure cannot be invoked more than once because it moves the variable `dict` out of its environment
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user