1
- error[E0391]: cycle detected when processing `cycle1`
1
+ error[E0391]: cycle detected when processing `cycle1::{{impl-Trait}}`
2
+ --> $DIR/auto-trait-leak.rs:24:16
3
+ |
4
+ LL | fn cycle1() -> impl Clone {
5
+ | ^^^^^^^^^^
6
+ |
7
+ note: ...which requires processing `cycle1`...
2
8
--> $DIR/auto-trait-leak.rs:24:1
3
9
|
4
10
LL | fn cycle1() -> impl Clone {
5
11
| ^^^^^^^^^^^^^^^^^^^^^^^^^
6
12
|
7
13
note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`...
8
- note: ...which requires processing `cycle2::{{exist- impl-Trait}}`...
9
- --> $DIR/auto-trait-leak.rs:31 :16
14
+ note: ...which requires processing `cycle2::{{impl-Trait}}`...
15
+ --> $DIR/auto-trait-leak.rs:33 :16
10
16
|
11
17
LL | fn cycle2() -> impl Clone {
12
18
| ^^^^^^^^^^
@@ -16,13 +22,45 @@ note: ...which requires processing `cycle2`...
16
22
LL | fn cycle2() -> impl Clone {
17
23
| ^^^^^^^^^^^^^^^^^^^^^^^^^
18
24
note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`...
19
- note: ...which requires processing `cycle1::{{exist-impl-Trait}}`...
25
+ = note: ...which again requires processing `cycle1::{{impl-Trait}}`, completing the cycle
26
+
27
+ error[E0391]: cycle detected when processing `cycle1::{{impl-Trait}}`
20
28
--> $DIR/auto-trait-leak.rs:24:16
21
29
|
22
30
LL | fn cycle1() -> impl Clone {
23
31
| ^^^^^^^^^^
24
- = note: ...which again requires processing `cycle1`, completing the cycle
25
- note: cycle used when type-checking all item bodies
32
+ |
33
+ note: ...which requires processing `cycle1`...
34
+ --> $DIR/auto-trait-leak.rs:24:1
35
+ |
36
+ LL | fn cycle1() -> impl Clone {
37
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^
38
+ note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`...
39
+ note: ...which requires processing `cycle2::{{impl-Trait}}`...
40
+ --> $DIR/auto-trait-leak.rs:33:16
41
+ |
42
+ LL | fn cycle2() -> impl Clone {
43
+ | ^^^^^^^^^^
44
+ note: ...which requires processing `cycle2`...
45
+ --> $DIR/auto-trait-leak.rs:33:1
46
+ |
47
+ LL | fn cycle2() -> impl Clone {
48
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^
49
+ = note: ...which again requires processing `cycle1::{{impl-Trait}}`, completing the cycle
50
+
51
+ error[E0277]: `std::rc::Rc<std::string::String>` cannot be sent between threads safely
52
+ --> $DIR/auto-trait-leak.rs:27:5
53
+ |
54
+ LL | send(cycle2().clone());
55
+ | ^^^^ `std::rc::Rc<std::string::String>` cannot be sent between threads safely
56
+ |
57
+ = help: within `impl std::clone::Clone`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::string::String>`
58
+ = note: required because it appears within the type `impl std::clone::Clone`
59
+ note: required by `send`
60
+ --> $DIR/auto-trait-leak.rs:16:1
61
+ |
62
+ LL | fn send<T: Send>(_: T) {}
63
+ | ^^^^^^^^^^^^^^^^^^^^^^
26
64
27
65
error: aborting due to previous error
28
66
0 commit comments