2020-08-31 12:11:44 -05:00
|
|
|
error[E0391]: cycle detected when computing type of `cycle1::{opaque#0}`
|
2019-04-22 11:35:37 -05:00
|
|
|
--> $DIR/auto-trait-leak.rs:12:16
|
2018-07-11 09:01:48 -05:00
|
|
|
|
|
|
|
|
LL | fn cycle1() -> impl Clone {
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
2019-12-28 09:54:27 -06:00
|
|
|
note: ...which requires borrow-checking `cycle1`...
|
|
|
|
--> $DIR/auto-trait-leak.rs:12:1
|
|
|
|
|
|
|
|
|
LL | fn cycle1() -> impl Clone {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
note: ...which requires processing `cycle1`...
|
|
|
|
--> $DIR/auto-trait-leak.rs:12:1
|
|
|
|
|
|
|
|
|
LL | fn cycle1() -> impl Clone {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-05-31 10:11:51 -05:00
|
|
|
note: ...which requires processing MIR for `cycle1`...
|
2019-04-22 11:35:37 -05:00
|
|
|
--> $DIR/auto-trait-leak.rs:12:1
|
2018-01-15 16:26:36 -06:00
|
|
|
|
|
2019-12-28 09:54:27 -06:00
|
|
|
LL | fn cycle1() -> impl Clone {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
note: ...which requires unsafety-checking `cycle1`...
|
|
|
|
--> $DIR/auto-trait-leak.rs:12:1
|
|
|
|
|
|
|
|
|
LL | fn cycle1() -> impl Clone {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-05-31 10:11:51 -05:00
|
|
|
note: ...which requires building MIR for `cycle1`...
|
2019-12-28 09:54:27 -06:00
|
|
|
--> $DIR/auto-trait-leak.rs:12:1
|
|
|
|
|
|
|
|
|
LL | fn cycle1() -> impl Clone {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-08-27 07:40:39 -05:00
|
|
|
note: ...which requires building THIR for `cycle1`...
|
|
|
|
--> $DIR/auto-trait-leak.rs:12:1
|
|
|
|
|
|
|
|
|
LL | fn cycle1() -> impl Clone {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
2019-12-28 09:54:27 -06:00
|
|
|
note: ...which requires type-checking `cycle1`...
|
2022-07-01 08:19:27 -05:00
|
|
|
--> $DIR/auto-trait-leak.rs:14:5
|
2019-12-28 09:54:27 -06:00
|
|
|
|
|
2022-07-01 08:19:27 -05:00
|
|
|
LL | send(cycle2().clone());
|
|
|
|
| ^^^^
|
|
|
|
= note: ...which requires evaluating trait selection obligation `impl core::clone::Clone: core::marker::Send`...
|
2020-08-31 12:11:44 -05:00
|
|
|
note: ...which requires computing type of `cycle2::{opaque#0}`...
|
2022-07-01 08:19:27 -05:00
|
|
|
--> $DIR/auto-trait-leak.rs:19:16
|
2017-11-26 14:32:30 -06:00
|
|
|
|
|
2018-05-22 07:31:56 -05:00
|
|
|
LL | fn cycle2() -> impl Clone {
|
|
|
|
| ^^^^^^^^^^
|
2019-12-28 09:54:27 -06:00
|
|
|
note: ...which requires borrow-checking `cycle2`...
|
2022-07-01 08:19:27 -05:00
|
|
|
--> $DIR/auto-trait-leak.rs:19:1
|
2019-12-28 09:54:27 -06:00
|
|
|
|
|
|
|
|
LL | fn cycle2() -> impl Clone {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
2018-05-22 07:31:56 -05:00
|
|
|
note: ...which requires processing `cycle2`...
|
2022-07-01 08:19:27 -05:00
|
|
|
--> $DIR/auto-trait-leak.rs:19:1
|
2018-01-15 16:26:36 -06:00
|
|
|
|
|
2019-12-28 09:54:27 -06:00
|
|
|
LL | fn cycle2() -> impl Clone {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-05-31 10:11:51 -05:00
|
|
|
note: ...which requires processing MIR for `cycle2`...
|
2022-07-01 08:19:27 -05:00
|
|
|
--> $DIR/auto-trait-leak.rs:19:1
|
2019-12-28 09:54:27 -06:00
|
|
|
|
|
|
|
|
LL | fn cycle2() -> impl Clone {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
note: ...which requires unsafety-checking `cycle2`...
|
2022-07-01 08:19:27 -05:00
|
|
|
--> $DIR/auto-trait-leak.rs:19:1
|
2019-12-28 09:54:27 -06:00
|
|
|
|
|
|
|
|
LL | fn cycle2() -> impl Clone {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-05-31 10:11:51 -05:00
|
|
|
note: ...which requires building MIR for `cycle2`...
|
2022-07-01 08:19:27 -05:00
|
|
|
--> $DIR/auto-trait-leak.rs:19:1
|
2019-12-28 09:54:27 -06:00
|
|
|
|
|
|
|
|
LL | fn cycle2() -> impl Clone {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-08-27 07:40:39 -05:00
|
|
|
note: ...which requires building THIR for `cycle2`...
|
|
|
|
--> $DIR/auto-trait-leak.rs:19:1
|
|
|
|
|
|
|
|
|
LL | fn cycle2() -> impl Clone {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
2019-12-28 09:54:27 -06:00
|
|
|
note: ...which requires type-checking `cycle2`...
|
2022-07-01 08:19:27 -05:00
|
|
|
--> $DIR/auto-trait-leak.rs:20:5
|
2019-12-28 09:54:27 -06:00
|
|
|
|
|
2022-07-01 08:19:27 -05:00
|
|
|
LL | send(cycle1().clone());
|
|
|
|
| ^^^^
|
|
|
|
= note: ...which requires evaluating trait selection obligation `impl core::clone::Clone: core::marker::Send`...
|
2020-08-31 12:11:44 -05:00
|
|
|
= note: ...which again requires computing type of `cycle1::{opaque#0}`, completing the cycle
|
2019-01-01 12:08:25 -06:00
|
|
|
note: cycle used when checking item types in top-level module
|
2019-04-22 11:35:37 -05:00
|
|
|
--> $DIR/auto-trait-leak.rs:1:1
|
2019-01-01 12:08:25 -06:00
|
|
|
|
|
|
|
|
LL | / use std::cell::Cell;
|
|
|
|
LL | | use std::rc::Rc;
|
|
|
|
LL | |
|
|
|
|
LL | | fn send<T: Send>(_: T) {}
|
|
|
|
... |
|
|
|
|
LL | | Rc::new(String::from("foo"))
|
|
|
|
LL | | }
|
|
|
|
| |_^
|
2018-07-11 09:01:48 -05:00
|
|
|
|
2022-07-01 08:19:27 -05:00
|
|
|
error: aborting due to previous error
|
2017-11-26 14:32:30 -06:00
|
|
|
|
2021-07-19 11:50:43 -05:00
|
|
|
For more information about this error, try `rustc --explain E0391`.
|