2023-08-27 17:02:54 -05:00
error[E0391]: cycle detected when computing type of opaque `cycle1::{opaque#0}`
2023-07-04 06:16:44 -05:00
--> $DIR/auto-trait-leak.rs:11: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 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());
| ^^^^
2023-02-01 23:49:07 -06:00
= note: ...which requires evaluating trait selection obligation `cycle2::{opaque#0}: core::marker::Send`...
2023-08-27 17:02:54 -05:00
note: ...which requires computing type of opaque `cycle2::{opaque#0}`...
--> $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 type-checking `cycle2`...
2023-08-27 17:02:54 -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());
| ^^^^
2023-02-01 23:49:07 -06:00
= note: ...which requires evaluating trait selection obligation `cycle1::{opaque#0}: core::marker::Send`...
2023-08-27 17:02:54 -05:00
= note: ...which again requires computing type of opaque `cycle1::{opaque#0}`, completing the cycle
note: cycle used when computing type of `cycle1::{opaque#0}`
--> $DIR/auto-trait-leak.rs:11:16
|
LL | fn cycle1() -> impl Clone {
| ^^^^^^^^^^
2023-07-18 20:53:34 -05:00
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
2018-07-11 09:01:48 -05:00
2023-08-27 17:02:54 -05:00
error[E0391]: cycle detected when computing type of opaque `cycle1::{opaque#0}`
2023-07-04 06:16:44 -05:00
--> $DIR/auto-trait-leak.rs:11:16
|
LL | fn cycle1() -> impl Clone {
| ^^^^^^^^^^
|
note: ...which requires type-checking `cycle1`...
--> $DIR/auto-trait-leak.rs:14:5
|
LL | send(cycle2().clone());
| ^^^^
= note: ...which requires evaluating trait selection obligation `cycle2::{opaque#0}: core::marker::Send`...
2023-08-27 17:02:54 -05:00
note: ...which requires computing type of opaque `cycle2::{opaque#0}`...
--> $DIR/auto-trait-leak.rs:19:16
2023-07-04 06:16:44 -05:00
|
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^
note: ...which requires type-checking `cycle2`...
2023-08-27 17:02:54 -05:00
--> $DIR/auto-trait-leak.rs:19:1
2023-07-04 06:16:44 -05:00
|
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2023-08-27 17:02:54 -05:00
= note: ...which again requires computing type of opaque `cycle1::{opaque#0}`, completing the cycle
note: cycle used when computing type of `cycle1::{opaque#0}`
--> $DIR/auto-trait-leak.rs:11:16
|
LL | fn cycle1() -> impl Clone {
| ^^^^^^^^^^
2023-07-18 20:53:34 -05:00
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
2023-07-04 06:16:44 -05:00
error: cannot check whether the hidden type of opaque type satisfies auto traits
2023-08-27 17:02:54 -05:00
--> $DIR/auto-trait-leak.rs:20:10
2023-07-04 06:16:44 -05:00
|
LL | send(cycle1().clone());
| ---- ^^^^^^^^^^^^^^^^
| |
| required by a bound introduced by this call
|
note: opaque type is declared here
--> $DIR/auto-trait-leak.rs:11:16
|
LL | fn cycle1() -> impl Clone {
| ^^^^^^^^^^
note: this item depends on auto traits of the hidden type, but may also be registering the hidden type. This is not supported right now. You can try moving the opaque type and the item that actually registers a hidden type into a new submodule
2023-08-27 17:02:54 -05:00
--> $DIR/auto-trait-leak.rs:19:4
2023-07-04 06:16:44 -05:00
|
LL | fn cycle2() -> impl Clone {
| ^^^^^^
note: required by a bound in `send`
--> $DIR/auto-trait-leak.rs:4:12
|
LL | fn send<T: Send>(_: T) {}
| ^^^^ required by this bound in `send`
2023-08-27 17:02:54 -05:00
error: aborting due to 3 previous errors
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`.