Propagate mutability from arguments to local bindings in async fn
This commit is contained in:
parent
d15fc17381
commit
2fe50bc01b
2 changed files with 14 additions and 6 deletions
10
src/test/ui/async-await/mutable-arguments.rs
Normal file
10
src/test/ui/async-await/mutable-arguments.rs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
// edition:2018
|
||||
// run-pass
|
||||
|
||||
#![feature(async_await)]
|
||||
|
||||
async fn foo(n: u32, mut vec: Vec<u32>) {
|
||||
vec.push(n);
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue