]> git.lizzy.rs Git - rust.git/blob - tests/ui/async-await/argument-patterns.rs
Rollup merge of #106854 - steffahn:drop_linear_arc_rebased, r=Mark-Simulacrum
[rust.git] / tests / ui / async-await / argument-patterns.rs
1 // edition:2018
2 // check-pass
3
4 #![deny(unused_mut)]
5
6 type A = Vec<u32>;
7
8 async fn a(n: u32, mut vec: A) {
9     vec.push(n);
10 }
11
12 async fn b(n: u32, ref mut vec: A) {
13     vec.push(n);
14 }
15
16 async fn c(ref vec: A) {
17     vec.contains(&0);
18 }
19
20 async fn d((a, mut b): (A, A)) {
21     b.push(1);
22 }
23
24 async fn f((ref mut a, ref b): (A, A)) {}
25
26 async fn g(((ref a, ref mut b), (ref mut c, ref d)): ((A, A), (A, A))) {}
27
28 fn main() {}