]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/impl-trait/region-escape-via-bound.stderr
Remove licenses
[rust.git] / src / test / ui / impl-trait / region-escape-via-bound.stderr
index b673111d2198605417a6076206b827e39a3b5207..81b44b7eba7fdd43de6657d6015da8ba46c8f182 100644 (file)
@@ -1,19 +1,14 @@
 error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
-  --> $DIR/region-escape-via-bound.rs:26:29
+  --> $DIR/region-escape-via-bound.rs:16:29
    |
 LL | fn foo(x: Cell<&'x u32>) -> impl Trait<'y>
    |                             ^^^^^^^^^^^^^^
    |
-note: hidden type `std::cell::Cell<&'x u32>` captures the lifetime 'x as defined on the function body at 26:1
-  --> $DIR/region-escape-via-bound.rs:26:1
+note: hidden type `std::cell::Cell<&'x u32>` captures the lifetime 'x as defined on the function body at 18:7
+  --> $DIR/region-escape-via-bound.rs:18:7
    |
-LL | / fn foo(x: Cell<&'x u32>) -> impl Trait<'y>
-LL | |     //~^ ERROR hidden type for `impl Trait` captures lifetime that does not appear in bounds [E0700]
-LL | | where 'x: 'y
-LL | | {
-LL | |     x
-LL | | }
-   | |_^
+LL | where 'x: 'y
+   |       ^^
 
 error: aborting due to previous error