rust/src/test/ui/impl-trait/auto-trait-leak.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

100 lines
3.1 KiB
Plaintext
Raw Normal View History

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
|
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`...
--> $DIR/auto-trait-leak.rs:14:5
2019-12-28 09:54:27 -06:00
|
LL | send(cycle2().clone());
| ^^^^
= note: ...which requires evaluating trait selection obligation `impl core::clone::Clone: core::marker::Send`...
note: ...which requires computing type of `cycle2::{opaque#0}`...
--> $DIR/auto-trait-leak.rs:19:16
|
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`...
--> $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`...
--> $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 processing MIR for `cycle2`...
--> $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`...
--> $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`...
--> $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`...
--> $DIR/auto-trait-leak.rs:20:5
2019-12-28 09:54:27 -06:00
|
LL | send(cycle1().clone());
| ^^^^
= note: ...which requires evaluating trait selection obligation `impl core::clone::Clone: core::marker::Send`...
= 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
error: aborting due to previous error
For more information about this error, try `rustc --explain E0391`.