]>
Commit | Line | Data |
---|---|---|
48663c56 | 1 | // edition:2018 |
e1599b0c | 2 | // check-pass |
48663c56 | 3 | |
48663c56 | 4 | #![deny(unused_mut)] |
48663c56 XL |
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() {} |