@@ -22,6 +22,17 @@ LL | fn cycle2() -> impl Clone {
2222 | ^^^^^^^^^^^^^^^^^^^^^^^^^
2323note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`...
2424 = note: ...which again requires processing `cycle1::{{impl-Trait}}`, completing the cycle
25+ note: cycle used when checking item types in top-level module
26+ --> $DIR/auto-trait-leak.rs:3:1
27+ |
28+ LL | / use std::cell::Cell;
29+ LL | | use std::rc::Rc;
30+ LL | |
31+ LL | | fn send<T: Send>(_: T) {}
32+ ... |
33+ LL | | Rc::new(String::from("foo"))
34+ LL | | }
35+ | |_^
2536
2637error[E0391]: cycle detected when processing `cycle1::{{impl-Trait}}`
2738 --> $DIR/auto-trait-leak.rs:14:16
@@ -46,6 +57,17 @@ note: ...which requires processing `cycle2`...
4657LL | fn cycle2() -> impl Clone {
4758 | ^^^^^^^^^^^^^^^^^^^^^^^^^
4859 = note: ...which again requires processing `cycle1::{{impl-Trait}}`, completing the cycle
60+ note: cycle used when checking item types in top-level module
61+ --> $DIR/auto-trait-leak.rs:3:1
62+ |
63+ LL | / use std::cell::Cell;
64+ LL | | use std::rc::Rc;
65+ LL | |
66+ LL | | fn send<T: Send>(_: T) {}
67+ ... |
68+ LL | | Rc::new(String::from("foo"))
69+ LL | | }
70+ | |_^
4971
5072error[E0277]: `std::rc::Rc<std::string::String>` cannot be sent between threads safely
5173 --> $DIR/auto-trait-leak.rs:17:5
0 commit comments