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`...
1
+ error[E0391]: cycle detected when processing `cycle1`
8
2
--> $DIR/auto-trait-leak.rs:24:1
9
3
|
10
4
LL | fn cycle1() -> impl Clone {
11
5
| ^^^^^^^^^^^^^^^^^^^^^^^^^
12
6
|
13
7
note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`...
14
8
note: ...which requires processing `cycle2::{{impl-Trait}}`...
15
- --> $DIR/auto-trait-leak.rs:33 :16
9
+ --> $DIR/auto-trait-leak.rs:31 :16
16
10
|
17
11
LL | fn cycle2() -> impl Clone {
18
12
| ^^^^^^^^^^
@@ -22,45 +16,13 @@ note: ...which requires processing `cycle2`...
22
16
LL | fn cycle2() -> impl Clone {
23
17
| ^^^^^^^^^^^^^^^^^^^^^^^^^
24
18
note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`...
25
- = note: ...which again requires processing `cycle1::{{impl-Trait}}`, completing the cycle
26
-
27
- error[E0391]: cycle detected when processing `cycle1::{{impl-Trait}}`
19
+ note: ...which requires processing `cycle1::{{impl-Trait}}`...
28
20
--> $DIR/auto-trait-leak.rs:24:16
29
21
|
30
22
LL | fn cycle1() -> impl Clone {
31
23
| ^^^^^^^^^^
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
- | ^^^^^^^^^^^^^^^^^^^^^^
24
+ = note: ...which again requires processing `cycle1`, completing the cycle
25
+ note: cycle used when type-checking all item bodies
64
26
65
27
error: aborting due to previous error
66
28
0 commit comments