Move /src/test to /tests
This commit is contained in:
parent
ca855e6e42
commit
cf2dff2b1e
27592 changed files with 0 additions and 0 deletions
16
tests/ui/async-await/no-move-across-await-struct.rs
Normal file
16
tests/ui/async-await/no-move-across-await-struct.rs
Normal file
|
@ -0,0 +1,16 @@
|
|||
// edition:2018
|
||||
// compile-flags: --crate-type lib
|
||||
|
||||
async fn no_move_across_await_struct() -> Vec<usize> {
|
||||
let s = Small { x: vec![31], y: vec![19, 1441] };
|
||||
needs_vec(s.x).await;
|
||||
s.x
|
||||
//~^ ERROR use of moved value: `s.x`
|
||||
}
|
||||
|
||||
struct Small {
|
||||
x: Vec<usize>,
|
||||
y: Vec<usize>,
|
||||
}
|
||||
|
||||
async fn needs_vec(_vec: Vec<usize>) {}
|
Loading…
Add table
Add a link
Reference in a new issue