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

90 lines
3.0 KiB
Plaintext
Raw Normal View History

error[E0391]: cycle detected when processing `cycle1::{{opaque}}#0`
2018-12-25 09:56:47 -06:00
--> $DIR/auto-trait-leak.rs:14:16
2018-07-11 09:01:48 -05:00
|
LL | fn cycle1() -> impl Clone {
| ^^^^^^^^^^
|
note: ...which requires processing `cycle1`...
2018-12-25 09:56:47 -06:00
--> $DIR/auto-trait-leak.rs:14: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`...
2018-12-25 09:56:47 -06:00
--> $DIR/auto-trait-leak.rs:23:16
|
2018-05-22 07:31:56 -05:00
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^
note: ...which requires processing `cycle2`...
2018-12-25 09:56:47 -06:00
--> $DIR/auto-trait-leak.rs:23:1
|
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
--> $DIR/auto-trait-leak.rs:3: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 | | }
| |_^
2018-07-11 09:01:48 -05:00
error[E0391]: cycle detected when processing `cycle1::{{opaque}}#0`
2018-12-25 09:56:47 -06:00
--> $DIR/auto-trait-leak.rs:14: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
|
note: ...which requires processing `cycle1`...
2018-12-25 09:56:47 -06:00
--> $DIR/auto-trait-leak.rs:14: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`...
2018-12-25 09:56:47 -06:00
--> $DIR/auto-trait-leak.rs:23:16
2018-07-11 09:01:48 -05:00
|
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^
note: ...which requires processing `cycle2`...
2018-12-25 09:56:47 -06:00
--> $DIR/auto-trait-leak.rs:23:1
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
--> $DIR/auto-trait-leak.rs:3: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 | | }
| |_^
2018-07-11 09:01:48 -05:00
error[E0277]: `std::rc::Rc<std::string::String>` cannot be sent between threads safely
2018-12-25 09:56:47 -06:00
--> $DIR/auto-trait-leak.rs:17:5
2018-07-11 09:01:48 -05:00
|
LL | send(cycle2().clone());
| ^^^^ `std::rc::Rc<std::string::String>` cannot be sent between threads safely
|
= 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`
note: required by `send`
2018-12-25 09:56:47 -06:00
--> $DIR/auto-trait-leak.rs:6:1
2018-07-11 09:01:48 -05:00
|
LL | fn send<T: Send>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^
2018-07-11 09:01:48 -05:00
error: aborting due to 3 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`.