about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOliver Schneider <github35764891676564198441@oli-obk.de>2018-06-25 17:50:51 +0200
committerOliver Schneider <github35764891676564198441@oli-obk.de>2018-06-27 11:17:55 +0200
commit1b202426dcac3febc06b89a9ceecc8eb47db59e8 (patch)
treef0ea45a93929982fbc8580cd62d560148254a093
parent013fca8698eb858b19c0a2c31fa1f1487b1e582d (diff)
downloadrust-1b202426dcac3febc06b89a9ceecc8eb47db59e8.tar.gz
rust-1b202426dcac3febc06b89a9ceecc8eb47db59e8.zip
fixup
-rw-r--r--src/test/ui/impl-trait/auto-trait-leak.stderr50
1 files changed, 44 insertions, 6 deletions
diff --git a/src/test/ui/impl-trait/auto-trait-leak.stderr b/src/test/ui/impl-trait/auto-trait-leak.stderr
index 490817c46f8..acb1a0557be 100644
--- a/src/test/ui/impl-trait/auto-trait-leak.stderr
+++ b/src/test/ui/impl-trait/auto-trait-leak.stderr
@@ -1,12 +1,18 @@
-error[E0391]: cycle detected when processing `cycle1`
+error[E0391]: cycle detected when processing `cycle1::{{impl-Trait}}`
+  --> $DIR/auto-trait-leak.rs:24:16
+   |
+LL | fn cycle1() -> impl Clone {
+   |                ^^^^^^^^^^
+   |
+note: ...which requires processing `cycle1`...
   --> $DIR/auto-trait-leak.rs:24:1
    |
 LL | fn cycle1() -> impl Clone {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^
    |
 note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`...
-note: ...which requires processing `cycle2::{{exist-impl-Trait}}`...
-  --> $DIR/auto-trait-leak.rs:31:16
+note: ...which requires processing `cycle2::{{impl-Trait}}`...
+  --> $DIR/auto-trait-leak.rs:33:16
    |
 LL | fn cycle2() -> impl Clone {
    |                ^^^^^^^^^^
@@ -16,13 +22,45 @@ note: ...which requires processing `cycle2`...
 LL | fn cycle2() -> impl Clone {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^
 note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`...
-note: ...which requires processing `cycle1::{{exist-impl-Trait}}`...
+   = note: ...which again requires processing `cycle1::{{impl-Trait}}`, completing the cycle
+
+error[E0391]: cycle detected when processing `cycle1::{{impl-Trait}}`
   --> $DIR/auto-trait-leak.rs:24:16
    |
 LL | fn cycle1() -> impl Clone {
    |                ^^^^^^^^^^
-   = note: ...which again requires processing `cycle1`, completing the cycle
-note: cycle used when type-checking all item bodies
+   |
+note: ...which requires processing `cycle1`...
+  --> $DIR/auto-trait-leak.rs:24:1
+   |
+LL | fn cycle1() -> impl Clone {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`...
+note: ...which requires processing `cycle2::{{impl-Trait}}`...
+  --> $DIR/auto-trait-leak.rs:33:16
+   |
+LL | fn cycle2() -> impl Clone {
+   |                ^^^^^^^^^^
+note: ...which requires processing `cycle2`...
+  --> $DIR/auto-trait-leak.rs:33:1
+   |
+LL | fn cycle2() -> impl Clone {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+   = note: ...which again requires processing `cycle1::{{impl-Trait}}`, completing the cycle
+
+error[E0277]: `std::rc::Rc<std::string::String>` cannot be sent between threads safely
+  --> $DIR/auto-trait-leak.rs:27:5
+   |
+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`
+  --> $DIR/auto-trait-leak.rs:16:1
+   |
+LL | fn send<T: Send>(_: T) {}
+   | ^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error