You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| ^^^ the trait `Clone` is not implemented for `str`, which is required by `for<'b> <<Vec<T> as Cycle>::Next as X<'b, <Vec<T> as Cycle>::Next>>::U: Clone`
5
+
| ^^^ unsatisfied trait bound
6
6
|
7
+
= help: the trait `Clone` is not implemented for `str`, which is required by `for<'b> <<Vec<T> as Cycle>::Next as X<'b, <Vec<T> as Cycle>::Next>>::U: Clone`
7
8
= help: the trait `Clone` is implemented for `String`
| ^^^ the trait `Clone` is not implemented for `str`, which is required by `for<'b> <<Box<T> as Cycle>::Next as X<'b, <Box<T> as Cycle>::Next>>::U: Clone`
22
+
| ^^^ unsatisfied trait bound
22
23
|
24
+
= help: the trait `Clone` is not implemented for `str`, which is required by `for<'b> <<Box<T> as Cycle>::Next as X<'b, <Box<T> as Cycle>::Next>>::U: Clone`
23
25
= help: the trait `Clone` is implemented for `String`
Copy file name to clipboardExpand all lines: tests/ui/async-await/async-closures/not-clone-closure.stderr
+2-1
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,9 @@ error[E0277]: the trait bound `NotClonableUpvar: Clone` is not satisfied in `{as
2
2
--> $DIR/not-clone-closure.rs:32:15
3
3
|
4
4
LL | not_clone.clone();
5
-
| ^^^^^ within `{async closure@$DIR/not-clone-closure.rs:29:21: 29:34}`, the trait `Clone` is not implemented for `NotClonableUpvar`, which is required by `{async closure@$DIR/not-clone-closure.rs:29:21: 29:34}: Clone`
5
+
| ^^^^^ unsatisfied trait bound
6
6
|
7
+
= help: within `{async closure@$DIR/not-clone-closure.rs:29:21: 29:34}`, the trait `Clone` is not implemented for `NotClonableUpvar`, which is required by `{async closure@$DIR/not-clone-closure.rs:29:21: 29:34}: Clone`
7
8
note: required because it's used within this closure
Copy file name to clipboardExpand all lines: tests/ui/coroutine/clone-impl.stderr
+36-36
Original file line number
Diff line number
Diff line change
@@ -1,104 +1,104 @@
1
-
error[E0277]: the trait bound `Vec<u32>: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:43:5: 43:12}`
2
-
--> $DIR/clone-impl.rs:49:5
1
+
error[E0277]: the trait bound `Vec<u32>: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:44:5: 44:12}`
2
+
--> $DIR/clone-impl.rs:50:5
3
3
|
4
4
LL | move || {
5
-
| ------- within this `{coroutine@$DIR/clone-impl.rs:43:5: 43:12}`
5
+
| ------- within this `{coroutine@$DIR/clone-impl.rs:44:5: 44:12}`
6
6
...
7
7
LL | check_copy(&gen_clone_0);
8
-
| ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:43:5: 43:12}`, the trait `Copy` is not implemented for `Vec<u32>`, which is required by `{coroutine@$DIR/clone-impl.rs:43:5: 43:12}: Copy`
8
+
| ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:44:5: 44:12}`, the trait `Copy` is not implemented for `Vec<u32>`, which is required by `{coroutine@$DIR/clone-impl.rs:44:5: 44:12}: Copy`
9
9
|
10
10
note: captured value does not implement `Copy`
11
-
--> $DIR/clone-impl.rs:47:14
11
+
--> $DIR/clone-impl.rs:48:14
12
12
|
13
13
LL | drop(clonable_0);
14
14
| ^^^^^^^^^^ has type `Vec<u32>` which does not implement `Copy`
15
15
note: required by a bound in `check_copy`
16
-
--> $DIR/clone-impl.rs:89:18
16
+
--> $DIR/clone-impl.rs:90:18
17
17
|
18
18
LL | fn check_copy<T: Copy>(_x: &T) {}
19
19
| ^^^^ required by this bound in `check_copy`
20
20
21
-
error[E0277]: the trait bound `Vec<char>: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:43:5: 43:12}`
22
-
--> $DIR/clone-impl.rs:49:5
21
+
error[E0277]: the trait bound `Vec<char>: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:44:5: 44:12}`
22
+
--> $DIR/clone-impl.rs:50:5
23
23
|
24
24
LL | move || {
25
-
| ------- within this `{coroutine@$DIR/clone-impl.rs:43:5: 43:12}`
25
+
| ------- within this `{coroutine@$DIR/clone-impl.rs:44:5: 44:12}`
26
26
...
27
27
LL | check_copy(&gen_clone_0);
28
-
| ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:43:5: 43:12}`, the trait `Copy` is not implemented for `Vec<char>`, which is required by `{coroutine@$DIR/clone-impl.rs:43:5: 43:12}: Copy`
28
+
| ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:44:5: 44:12}`, the trait `Copy` is not implemented for `Vec<char>`, which is required by `{coroutine@$DIR/clone-impl.rs:44:5: 44:12}: Copy`
29
29
|
30
30
note: coroutine does not implement `Copy` as this value is used across a yield
31
-
--> $DIR/clone-impl.rs:45:9
31
+
--> $DIR/clone-impl.rs:46:9
32
32
|
33
33
LL | let v = vec!['a'];
34
34
| - has type `Vec<char>` which does not implement `Copy`
35
35
LL | yield;
36
36
| ^^^^^ yield occurs here, with `v` maybe used later
37
37
note: required by a bound in `check_copy`
38
-
--> $DIR/clone-impl.rs:89:18
38
+
--> $DIR/clone-impl.rs:90:18
39
39
|
40
40
LL | fn check_copy<T: Copy>(_x: &T) {}
41
41
| ^^^^ required by this bound in `check_copy`
42
42
43
-
error[E0277]: the trait bound `Vec<u32>: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:58:5: 58:12}`
44
-
--> $DIR/clone-impl.rs:70:5
43
+
error[E0277]: the trait bound `Vec<u32>: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:59:5: 59:12}`
44
+
--> $DIR/clone-impl.rs:71:5
45
45
|
46
46
LL | move || {
47
-
| ------- within this `{coroutine@$DIR/clone-impl.rs:58:5: 58:12}`
47
+
| ------- within this `{coroutine@$DIR/clone-impl.rs:59:5: 59:12}`
48
48
...
49
49
LL | check_copy(&gen_clone_1);
50
-
| ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:58:5: 58:12}`, the trait `Copy` is not implemented for `Vec<u32>`, which is required by `{coroutine@$DIR/clone-impl.rs:58:5: 58:12}: Copy`
50
+
| ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:59:5: 59:12}`, the trait `Copy` is not implemented for `Vec<u32>`, which is required by `{coroutine@$DIR/clone-impl.rs:59:5: 59:12}: Copy`
51
51
|
52
52
note: captured value does not implement `Copy`
53
-
--> $DIR/clone-impl.rs:68:14
53
+
--> $DIR/clone-impl.rs:69:14
54
54
|
55
55
LL | drop(clonable_1);
56
56
| ^^^^^^^^^^ has type `Vec<u32>` which does not implement `Copy`
57
57
note: required by a bound in `check_copy`
58
-
--> $DIR/clone-impl.rs:89:18
58
+
--> $DIR/clone-impl.rs:90:18
59
59
|
60
60
LL | fn check_copy<T: Copy>(_x: &T) {}
61
61
| ^^^^ required by this bound in `check_copy`
62
62
63
-
error[E0277]: the trait bound `Vec<char>: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:58:5: 58:12}`
64
-
--> $DIR/clone-impl.rs:70:5
63
+
error[E0277]: the trait bound `Vec<char>: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:59:5: 59:12}`
64
+
--> $DIR/clone-impl.rs:71:5
65
65
|
66
66
LL | move || {
67
-
| ------- within this `{coroutine@$DIR/clone-impl.rs:58:5: 58:12}`
67
+
| ------- within this `{coroutine@$DIR/clone-impl.rs:59:5: 59:12}`
68
68
...
69
69
LL | check_copy(&gen_clone_1);
70
-
| ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:58:5: 58:12}`, the trait `Copy` is not implemented for `Vec<char>`, which is required by `{coroutine@$DIR/clone-impl.rs:58:5: 58:12}: Copy`
70
+
| ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:59:5: 59:12}`, the trait `Copy` is not implemented for `Vec<char>`, which is required by `{coroutine@$DIR/clone-impl.rs:59:5: 59:12}: Copy`
71
71
|
72
72
note: coroutine does not implement `Copy` as this value is used across a yield
73
-
--> $DIR/clone-impl.rs:64:9
73
+
--> $DIR/clone-impl.rs:65:9
74
74
|
75
75
LL | let v = vec!['a'];
76
76
| - has type `Vec<char>` which does not implement `Copy`
77
77
...
78
78
LL | yield;
79
79
| ^^^^^ yield occurs here, with `v` maybe used later
80
80
note: required by a bound in `check_copy`
81
-
--> $DIR/clone-impl.rs:89:18
81
+
--> $DIR/clone-impl.rs:90:18
82
82
|
83
83
LL | fn check_copy<T: Copy>(_x: &T) {}
84
84
| ^^^^ required by this bound in `check_copy`
85
85
86
-
error[E0277]: the trait bound `NonClone: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:79:5: 79:12}`
87
-
--> $DIR/clone-impl.rs:83:5
86
+
error[E0277]: the trait bound `NonClone: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:80:5: 80:12}`
87
+
--> $DIR/clone-impl.rs:84:5
88
88
|
89
89
LL | move || {
90
-
| ------- within this `{coroutine@$DIR/clone-impl.rs:79:5: 79:12}`
90
+
| ------- within this `{coroutine@$DIR/clone-impl.rs:80:5: 80:12}`
91
91
...
92
92
LL | check_copy(&gen_non_clone);
93
-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:79:5: 79:12}`, the trait `Copy` is not implemented for `NonClone`, which is required by `{coroutine@$DIR/clone-impl.rs:79:5: 79:12}: Copy`
93
+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:80:5: 80:12}`, the trait `Copy` is not implemented for `NonClone`, which is required by `{coroutine@$DIR/clone-impl.rs:80:5: 80:12}: Copy`
94
94
|
95
95
note: captured value does not implement `Copy`
96
-
--> $DIR/clone-impl.rs:81:14
96
+
--> $DIR/clone-impl.rs:82:14
97
97
|
98
98
LL | drop(non_clonable);
99
99
| ^^^^^^^^^^^^ has type `NonClone` which does not implement `Copy`
100
100
note: required by a bound in `check_copy`
101
-
--> $DIR/clone-impl.rs:89:18
101
+
--> $DIR/clone-impl.rs:90:18
102
102
|
103
103
LL | fn check_copy<T: Copy>(_x: &T) {}
104
104
| ^^^^ required by this bound in `check_copy`
@@ -108,22 +108,22 @@ LL + #[derive(Copy)]
108
108
LL | struct NonClone;
109
109
|
110
110
111
-
error[E0277]: the trait bound `NonClone: Clone` is not satisfied in `{coroutine@$DIR/clone-impl.rs:79:5: 79:12}`
112
-
--> $DIR/clone-impl.rs:85:5
111
+
error[E0277]: the trait bound `NonClone: Clone` is not satisfied in `{coroutine@$DIR/clone-impl.rs:80:5: 80:12}`
112
+
--> $DIR/clone-impl.rs:86:5
113
113
|
114
114
LL | move || {
115
-
| ------- within this `{coroutine@$DIR/clone-impl.rs:79:5: 79:12}`
115
+
| ------- within this `{coroutine@$DIR/clone-impl.rs:80:5: 80:12}`
116
116
...
117
117
LL | check_clone(&gen_non_clone);
118
-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:79:5: 79:12}`, the trait `Clone` is not implemented for `NonClone`, which is required by `{coroutine@$DIR/clone-impl.rs:79:5: 79:12}: Clone`
118
+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:80:5: 80:12}`, the trait `Clone` is not implemented for `NonClone`, which is required by `{coroutine@$DIR/clone-impl.rs:80:5: 80:12}: Clone`
119
119
|
120
120
note: captured value does not implement `Clone`
121
-
--> $DIR/clone-impl.rs:81:14
121
+
--> $DIR/clone-impl.rs:82:14
122
122
|
123
123
LL | drop(non_clonable);
124
124
| ^^^^^^^^^^^^ has type `NonClone` which does not implement `Clone`
note: consider changing this parameter type in function `copy` to borrow instead if owning the value isn't necessary
14
-
--> $DIR/issue-105084.rs:9:21
14
+
--> $DIR/issue-105084.rs:10:21
15
15
|
16
16
LL | fn copy<T: Copy>(x: T) -> T {
17
17
| ---- ^ this parameter takes ownership of the value
@@ -22,25 +22,25 @@ help: consider cloning the value if the performance cost is acceptable
22
22
LL | let mut h = copy(g.clone());
23
23
| ++++++++
24
24
25
-
error[E0277]: the trait bound `Box<(i32, ())>: Copy` is not satisfied in `{coroutine@$DIR/issue-105084.rs:15:5: 15:7}`
26
-
--> $DIR/issue-105084.rs:32:17
25
+
error[E0277]: the trait bound `Box<(i32, ())>: Copy` is not satisfied in `{coroutine@$DIR/issue-105084.rs:16:5: 16:7}`
26
+
--> $DIR/issue-105084.rs:33:17
27
27
|
28
28
LL | || {
29
-
| -- within this `{coroutine@$DIR/issue-105084.rs:15:5: 15:7}`
29
+
| -- within this `{coroutine@$DIR/issue-105084.rs:16:5: 16:7}`
30
30
...
31
31
LL | let mut h = copy(g);
32
-
| ^^^^^^^ within `{coroutine@$DIR/issue-105084.rs:15:5: 15:7}`, the trait `Copy` is not implemented for `Box<(i32, ())>`, which is required by `{coroutine@$DIR/issue-105084.rs:15:5: 15:7}: Copy`
32
+
| ^^^^^^^ within `{coroutine@$DIR/issue-105084.rs:16:5: 16:7}`, the trait `Copy` is not implemented for `Box<(i32, ())>`, which is required by `{coroutine@$DIR/issue-105084.rs:16:5: 16:7}: Copy`
33
33
|
34
34
note: coroutine does not implement `Copy` as this value is used across a yield
35
-
--> $DIR/issue-105084.rs:22:22
35
+
--> $DIR/issue-105084.rs:23:22
36
36
|
37
37
LL | Box::new((5, yield));
38
38
| -------------^^^^^--
39
39
| | |
40
40
| | yield occurs here, with `Box::new((5, yield))` maybe used later
41
41
| has type `Box<(i32, ())>` which does not implement `Copy`
0 commit comments