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

276 lines
8.7 KiB
Plaintext
Raw Normal View History

error[E0391]: cycle detected when processing `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 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-07-11 09:01:48 -05:00
note: ...which requires processing `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 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires building MIR for...
--> $DIR/auto-trait-leak.rs:12:1
|
LL | fn cycle1() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires type-checking `cycle1`...
--> $DIR/auto-trait-leak.rs:12:1
|
2018-05-22 07:31:56 -05:00
LL | fn cycle1() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
= note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`...
note: ...which requires processing `cycle2::{{opaque}}#0`...
2020-01-08 11:02:10 -06:00
--> $DIR/auto-trait-leak.rs:22: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`...
2020-01-11 11:18:58 -06:00
--> $DIR/auto-trait-leak.rs:22: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`...
2020-01-08 11:02:10 -06:00
--> $DIR/auto-trait-leak.rs:22:1
|
2019-12-28 09:54:27 -06:00
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires processing `cycle2`...
2020-01-11 11:18:58 -06:00
--> $DIR/auto-trait-leak.rs:22:1
2019-12-28 09:54:27 -06:00
|
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires unsafety-checking `cycle2`...
2020-01-11 11:18:58 -06:00
--> $DIR/auto-trait-leak.rs:22:1
2019-12-28 09:54:27 -06:00
|
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires building MIR for...
2020-01-11 11:18:58 -06:00
--> $DIR/auto-trait-leak.rs:22:1
2019-12-28 09:54:27 -06:00
|
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires type-checking `cycle2`...
2020-01-11 11:18:58 -06:00
--> $DIR/auto-trait-leak.rs:22:1
2019-12-28 09:54:27 -06:00
|
2018-05-22 07:31:56 -05:00
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
= note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`...
= note: ...which again requires processing `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[E0391]: cycle detected when processing `cycle1::{{opaque}}#0`
2019-04-22 11:35:37 -05:00
--> $DIR/auto-trait-leak.rs:12:16
|
2018-02-22 18:42:32 -06:00
LL | fn cycle1() -> impl Clone {
2018-05-22 07:31:56 -05:00
| ^^^^^^^^^^
2018-07-11 09:01:48 -05:00
|
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 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-07-11 09:01:48 -05:00
note: ...which requires processing `cycle1`...
2019-04-22 11:35:37 -05:00
--> $DIR/auto-trait-leak.rs:12:1
2018-07-11 09:01:48 -05: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 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires building MIR for...
--> $DIR/auto-trait-leak.rs:12:1
|
LL | fn cycle1() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires type-checking `cycle1`...
--> $DIR/auto-trait-leak.rs:12:1
|
2018-07-11 09:01:48 -05:00
LL | fn cycle1() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
= note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`...
note: ...which requires processing `cycle2::{{opaque}}#0`...
2020-01-08 11:02:10 -06:00
--> $DIR/auto-trait-leak.rs:22:16
2018-07-11 09:01:48 -05:00
|
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^
2019-12-28 09:54:27 -06:00
note: ...which requires borrow-checking `cycle2`...
2020-01-11 11:18:58 -06:00
--> $DIR/auto-trait-leak.rs:22:1
2019-12-28 09:54:27 -06:00
|
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-07-11 09:01:48 -05:00
note: ...which requires processing `cycle2`...
2020-01-08 11:02:10 -06:00
--> $DIR/auto-trait-leak.rs:22:1
|
2020-01-11 11:18:58 -06:00
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires processing `cycle2`...
--> $DIR/auto-trait-leak.rs:22:1
|
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires unsafety-checking `cycle2`...
--> $DIR/auto-trait-leak.rs:22:1
|
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires building MIR for...
--> $DIR/auto-trait-leak.rs:22:1
|
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires type-checking `cycle2`...
--> $DIR/auto-trait-leak.rs:22:1
|
2020-01-08 11:02:10 -06:00
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
= note: ...which again requires processing `cycle1::{{opaque}}#0`, completing the cycle
note: cycle used when checking item types in top-level module
--> $DIR/auto-trait-leak.rs:1:1
|
LL | / use std::cell::Cell;
LL | | use std::rc::Rc;
LL | |
LL | | fn send<T: Send>(_: T) {}
... |
LL | | Rc::new(String::from("foo"))
LL | | }
| |_^
error[E0391]: cycle detected when processing `cycle1::{{opaque}}#0`
--> $DIR/auto-trait-leak.rs:12:16
|
LL | fn cycle1() -> impl Clone {
| ^^^^^^^^^^
|
2020-01-11 11:18:58 -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-01-08 11:02:10 -06:00
note: ...which requires processing `cycle1`...
--> $DIR/auto-trait-leak.rs:12:1
|
2020-01-11 11:18:58 -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 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires building MIR for...
--> $DIR/auto-trait-leak.rs:12:1
|
LL | fn cycle1() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires type-checking `cycle1`...
--> $DIR/auto-trait-leak.rs:12:1
|
2020-01-08 11:02:10 -06:00
LL | fn cycle1() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
= note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`...
note: ...which requires processing `cycle2::{{opaque}}#0`...
--> $DIR/auto-trait-leak.rs:22:16
|
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^
2020-01-11 11:18:58 -06:00
note: ...which requires borrow-checking `cycle2`...
--> $DIR/auto-trait-leak.rs:22:1
|
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2020-01-08 11:02:10 -06:00
note: ...which requires processing `cycle2`...
--> $DIR/auto-trait-leak.rs:22:1
2018-07-11 09:01:48 -05:00
|
2019-12-28 09:54:27 -06:00
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires processing `cycle2`...
2020-01-11 11:18:58 -06:00
--> $DIR/auto-trait-leak.rs:22:1
2019-12-28 09:54:27 -06:00
|
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires unsafety-checking `cycle2`...
2020-01-11 11:18:58 -06:00
--> $DIR/auto-trait-leak.rs:22:1
2019-12-28 09:54:27 -06:00
|
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires building MIR for...
2020-01-11 11:18:58 -06:00
--> $DIR/auto-trait-leak.rs:22:1
2019-12-28 09:54:27 -06:00
|
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires type-checking `cycle2`...
2020-01-11 11:18:58 -06:00
--> $DIR/auto-trait-leak.rs:22:1
2019-12-28 09:54:27 -06:00
|
2018-07-11 09:01:48 -05:00
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
= note: ...which again requires processing `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[E0277]: `std::rc::Rc<std::string::String>` cannot be sent between threads safely
2020-01-08 11:02:10 -06:00
--> $DIR/auto-trait-leak.rs:16:5
2018-07-11 09:01:48 -05:00
|
LL | fn send<T: Send>(_: T) {}
2020-04-06 00:15:06 -05:00
| ---- required by this bound in `send`
...
2018-07-11 09:01:48 -05:00
LL | send(cycle2().clone());
| ^^^^ `std::rc::Rc<std::string::String>` cannot be sent between threads safely
...
LL | fn cycle2() -> impl Clone {
| ---------- within this `impl std::clone::Clone`
2018-07-11 09:01:48 -05:00
|
= help: within `impl std::clone::Clone`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::string::String>`
= note: required because it appears within the type `impl std::clone::Clone`
2020-01-08 11:02:10 -06:00
error: aborting due to 4 previous errors
Some errors have detailed explanations: E0277, E0391.
2018-07-11 09:01:48 -05:00
For more information about an error, try `rustc --explain E0277`.