Skip to content

Commit 9cd008f

Browse files
canndrewcrlf0710
authored andcommitted
fix tests after rebase
1 parent d9a1722 commit 9cd008f

File tree

3 files changed

+26
-18
lines changed

3 files changed

+26
-18
lines changed

src/test/ui/generator/clone-impl-async.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,24 @@ fn main() {
1515
drop(non_clone);
1616
};
1717
check_copy(&inner_non_clone);
18-
//~^ ERROR the trait bound `impl Future<Output = [async output]>: Copy` is not satisfied
18+
//~^ ERROR the trait bound `impl Future<Output = ()>: Copy` is not satisfied
1919
check_clone(&inner_non_clone);
20-
//~^ ERROR the trait bound `impl Future<Output = [async output]>: Clone` is not satisfied
20+
//~^ ERROR the trait bound `impl Future<Output = ()>: Clone` is not satisfied
2121

2222
let non_clone = NonClone;
2323
let outer_non_clone = async move {
2424
drop(non_clone);
2525
};
2626
check_copy(&outer_non_clone);
27-
//~^ ERROR the trait bound `impl Future<Output = [async output]>: Copy` is not satisfied
27+
//~^ ERROR the trait bound `impl Future<Output = ()>: Copy` is not satisfied
2828
check_clone(&outer_non_clone);
29-
//~^ ERROR the trait bound `impl Future<Output = [async output]>: Clone` is not satisfied
29+
//~^ ERROR the trait bound `impl Future<Output = ()>: Clone` is not satisfied
3030

3131
let maybe_copy_clone = async move {};
3232
check_copy(&maybe_copy_clone);
33-
//~^ ERROR the trait bound `impl Future<Output = [async output]>: Copy` is not satisfied
33+
//~^ ERROR the trait bound `impl Future<Output = ()>: Copy` is not satisfied
3434
check_clone(&maybe_copy_clone);
35-
//~^ ERROR the trait bound `impl Future<Output = [async output]>: Clone` is not satisfied
35+
//~^ ERROR the trait bound `impl Future<Output = ()>: Clone` is not satisfied
3636

3737
let inner_non_clone_fn = the_inner_non_clone_fn();
3838
check_copy(&inner_non_clone_fn);

src/test/ui/generator/clone-impl-async.stderr

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error[E0277]: the trait bound `impl Future<Output = [async output]>: Copy` is not satisfied
1+
error[E0277]: the trait bound `impl Future<Output = ()>: Copy` is not satisfied
22
--> $DIR/clone-impl-async.rs:17:16
33
|
44
LL | check_copy(&inner_non_clone);
5-
| ---------- ^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `impl Future<Output = [async output]>`
5+
| ---------- ^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `impl Future<Output = ()>`
66
| |
77
| required by a bound introduced by this call
88
|
@@ -12,11 +12,11 @@ note: required by a bound in `check_copy`
1212
LL | fn check_copy<T: Copy>(_x: &T) {}
1313
| ^^^^ required by this bound in `check_copy`
1414

15-
error[E0277]: the trait bound `impl Future<Output = [async output]>: Clone` is not satisfied
15+
error[E0277]: the trait bound `impl Future<Output = ()>: Clone` is not satisfied
1616
--> $DIR/clone-impl-async.rs:19:17
1717
|
1818
LL | check_clone(&inner_non_clone);
19-
| ----------- ^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `impl Future<Output = [async output]>`
19+
| ----------- ^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `impl Future<Output = ()>`
2020
| |
2121
| required by a bound introduced by this call
2222
|
@@ -26,11 +26,11 @@ note: required by a bound in `check_clone`
2626
LL | fn check_clone<T: Clone>(_x: &T) {}
2727
| ^^^^^ required by this bound in `check_clone`
2828

29-
error[E0277]: the trait bound `impl Future<Output = [async output]>: Copy` is not satisfied
29+
error[E0277]: the trait bound `impl Future<Output = ()>: Copy` is not satisfied
3030
--> $DIR/clone-impl-async.rs:26:16
3131
|
3232
LL | check_copy(&outer_non_clone);
33-
| ---------- ^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `impl Future<Output = [async output]>`
33+
| ---------- ^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `impl Future<Output = ()>`
3434
| |
3535
| required by a bound introduced by this call
3636
|
@@ -40,11 +40,11 @@ note: required by a bound in `check_copy`
4040
LL | fn check_copy<T: Copy>(_x: &T) {}
4141
| ^^^^ required by this bound in `check_copy`
4242

43-
error[E0277]: the trait bound `impl Future<Output = [async output]>: Clone` is not satisfied
43+
error[E0277]: the trait bound `impl Future<Output = ()>: Clone` is not satisfied
4444
--> $DIR/clone-impl-async.rs:28:17
4545
|
4646
LL | check_clone(&outer_non_clone);
47-
| ----------- ^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `impl Future<Output = [async output]>`
47+
| ----------- ^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `impl Future<Output = ()>`
4848
| |
4949
| required by a bound introduced by this call
5050
|
@@ -54,11 +54,11 @@ note: required by a bound in `check_clone`
5454
LL | fn check_clone<T: Clone>(_x: &T) {}
5555
| ^^^^^ required by this bound in `check_clone`
5656

57-
error[E0277]: the trait bound `impl Future<Output = [async output]>: Copy` is not satisfied
57+
error[E0277]: the trait bound `impl Future<Output = ()>: Copy` is not satisfied
5858
--> $DIR/clone-impl-async.rs:32:16
5959
|
6060
LL | check_copy(&maybe_copy_clone);
61-
| ---------- ^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `impl Future<Output = [async output]>`
61+
| ---------- ^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `impl Future<Output = ()>`
6262
| |
6363
| required by a bound introduced by this call
6464
|
@@ -68,11 +68,11 @@ note: required by a bound in `check_copy`
6868
LL | fn check_copy<T: Copy>(_x: &T) {}
6969
| ^^^^ required by this bound in `check_copy`
7070

71-
error[E0277]: the trait bound `impl Future<Output = [async output]>: Clone` is not satisfied
71+
error[E0277]: the trait bound `impl Future<Output = ()>: Clone` is not satisfied
7272
--> $DIR/clone-impl-async.rs:34:17
7373
|
7474
LL | check_clone(&maybe_copy_clone);
75-
| ----------- ^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `impl Future<Output = [async output]>`
75+
| ----------- ^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `impl Future<Output = ()>`
7676
| |
7777
| required by a bound introduced by this call
7878
|

src/test/ui/generator/clone-impl.stderr

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ note: required by a bound in `check_copy`
133133
|
134134
LL | fn check_copy<T: Copy>(_x: &T) {}
135135
| ^^^^ required by this bound in `check_copy`
136+
help: consider annotating `NonClone` with `#[derive(Copy)]`
137+
|
138+
LL | #[derive(Copy)]
139+
|
136140

137141
error[E0277]: the trait bound `NonClone: Clone` is not satisfied in `[generator@$DIR/clone-impl.rs:62:25: 65:6]`
138142
--> $DIR/clone-impl.rs:68:5
@@ -157,6 +161,10 @@ note: required by a bound in `check_clone`
157161
|
158162
LL | fn check_clone<T: Clone>(_x: &T) {}
159163
| ^^^^^ required by this bound in `check_clone`
164+
help: consider annotating `NonClone` with `#[derive(Clone)]`
165+
|
166+
LL | #[derive(Clone)]
167+
|
160168

161169
error: aborting due to 6 previous errors
162170

0 commit comments

Comments
 (0)