about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorJack Huey <jack.huey@umassmed.edu>2021-03-25 14:11:03 -0400
committerJack Huey <jack.huey@umassmed.edu>2021-03-25 14:11:03 -0400
commit44e9d201c1a5bb7db4fd9e312ea1ad690fc42476 (patch)
tree747b43305064327e0baa2a7bcd1c3c072af6df7e /src/test
parent7cb8f513c6fbea904703bfd0f28f70f439d6f671 (diff)
downloadrust-44e9d201c1a5bb7db4fd9e312ea1ad690fc42476.tar.gz
rust-44e9d201c1a5bb7db4fd9e312ea1ad690fc42476.zip
Bless nll test
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature.nll.stderr87
1 files changed, 3 insertions, 84 deletions
diff --git a/src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature.nll.stderr b/src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature.nll.stderr
index b509610b89e..916a6c2bf12 100644
--- a/src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature.nll.stderr
+++ b/src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature.nll.stderr
@@ -1,92 +1,11 @@
 error[E0261]: use of undeclared lifetime name `'a`
-  --> $DIR/missing-lifetimes-in-signature.rs:37:11
+  --> $DIR/missing-lifetimes-in-signature.rs:36:11
    |
 LL | fn baz<G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_
    |        -  ^^ undeclared lifetime
    |        |
    |        help: consider introducing lifetime `'a` here: `'a,`
 
-error: lifetime may not live long enough
-  --> $DIR/missing-lifetimes-in-signature.rs:15:37
-   |
-LL | fn foo<G, T>(g: G, dest: &mut T) -> impl FnOnce()
-   |                          -          ^^^^^^^^^^^^^ opaque type requires that `'1` must outlive `'static`
-   |                          |
-   |                          let's call the lifetime of this reference `'1`
-   |
-help: to allow this `impl Trait` to capture borrowed data with lifetime `'1`, add `'_` as a bound
-   |
-LL | fn foo<G, T>(g: G, dest: &mut T) -> impl FnOnce() + '_
-   |                                     ^^^^^^^^^^^^^^^^^^
-
-error[E0311]: the parameter type `G` may not live long enough
-  --> $DIR/missing-lifetimes-in-signature.rs:25:37
-   |
-LL | fn bar<G, T>(g: G, dest: &mut T) -> impl FnOnce() + '_
-   |                                     ^^^^^^^^^^^^^^^^^^
-   |
-note: the parameter type `G` must be valid for the anonymous lifetime defined on the function body at 25:26...
-  --> $DIR/missing-lifetimes-in-signature.rs:25:26
-   |
-LL | fn bar<G, T>(g: G, dest: &mut T) -> impl FnOnce() + '_
-   |                          ^^^^^^
-
-error[E0311]: the parameter type `G` may not live long enough
-  --> $DIR/missing-lifetimes-in-signature.rs:47:45
-   |
-LL | fn qux<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_
-   |                                             ^^^^^^^^^^^^^^^^^^
-   |
-note: the parameter type `G` must be valid for the anonymous lifetime defined on the function body at 47:34...
-  --> $DIR/missing-lifetimes-in-signature.rs:47:34
-   |
-LL | fn qux<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_
-   |                                  ^^^^^^
-
-error[E0311]: the parameter type `G` may not live long enough
-  --> $DIR/missing-lifetimes-in-signature.rs:59:58
-   |
-LL |     fn qux<'b, G: Get<T> + 'b, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ {
-   |                                                          ^^^^^^^^^^^^^^^^^^
-   |
-note: the parameter type `G` must be valid for the anonymous lifetime defined on the method body at 59:47...
-  --> $DIR/missing-lifetimes-in-signature.rs:59:47
-   |
-LL |     fn qux<'b, G: Get<T> + 'b, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ {
-   |                                               ^^^^^^
-
-error[E0311]: the parameter type `G` may not live long enough
-  --> $DIR/missing-lifetimes-in-signature.rs:68:45
-   |
-LL | fn bat<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ + 'a
-   |                                             ^^^^^^^^^^^^^^^^^^^^^^^
-   |
-note: the parameter type `G` must be valid for the anonymous lifetime defined on the function body at 68:34...
-  --> $DIR/missing-lifetimes-in-signature.rs:68:34
-   |
-LL | fn bat<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ + 'a
-   |                                  ^^^^^^
-
-error[E0621]: explicit lifetime required in the type of `dest`
-  --> $DIR/missing-lifetimes-in-signature.rs:73:5
-   |
-LL |   fn bat<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ + 'a
-   |                                    ------ help: add explicit lifetime `'a` to the type of `dest`: `&'a mut T`
-...
-LL | /     move || {
-LL | |         *dest = g.get();
-LL | |     }
-   | |_____^ lifetime `'a` required
-
-error[E0309]: the parameter type `G` may not live long enough
-  --> $DIR/missing-lifetimes-in-signature.rs:79:44
-   |
-LL | fn bak<'a, G, T>(g: G, dest: &'a mut T) -> impl FnOnce() + 'a
-   |                                            ^^^^^^^^^^^^^^^^^^
-   |
-   = help: consider adding an explicit lifetime bound `G: 'a`...
-
-error: aborting due to 8 previous errors
+error: aborting due to previous error
 
-Some errors have detailed explanations: E0261, E0309, E0621.
-For more information about an error, try `rustc --explain E0261`.
+For more information about this error, try `rustc --explain E0261`.