Bless nll tests.
This commit is contained in:
parent
39c67b2133
commit
b4e3e62c9c
@ -112,11 +112,13 @@ LL | fn move_lifetime_into_fn<'a, 'b>(x: &'a u32, y: &'b u32) -> impl Fn(&'a u32
|
||||
error[E0310]: the parameter type `T` may not live long enough
|
||||
--> $DIR/must_outlive_least_region_or_bound.rs:40:5
|
||||
|
|
||||
LL | fn ty_param_wont_outlive_static<T:Debug>(x: T) -> impl Debug + 'static {
|
||||
| -- help: consider adding an explicit lifetime bound...: `T: 'static +`
|
||||
LL |
|
||||
LL | x
|
||||
| ^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
|
|
||||
LL | fn ty_param_wont_outlive_static<T:Debug + 'static>(x: T) -> impl Debug + 'static {
|
||||
| +++++++++
|
||||
|
||||
error: aborting due to 9 previous errors
|
||||
|
||||
|
@ -1,11 +1,13 @@
|
||||
error[E0310]: the parameter type `T` may not live long enough
|
||||
--> $DIR/type_parameters_captured.rs:9:5
|
||||
|
|
||||
LL | fn foo<T>(x: T) -> impl Any + 'static {
|
||||
| - help: consider adding an explicit lifetime bound...: `T: 'static`
|
||||
LL |
|
||||
LL | x
|
||||
| ^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
|
|
||||
LL | fn foo<T: 'static>(x: T) -> impl Any + 'static {
|
||||
| +++++++++
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -1,10 +1,13 @@
|
||||
error[E0310]: the parameter type `T` may not live long enough
|
||||
--> $DIR/issue_74400.rs:12:5
|
||||
|
|
||||
LL | fn g<T>(data: &[T]) {
|
||||
| - help: consider adding an explicit lifetime bound...: `T: 'static`
|
||||
LL | f(data, identity)
|
||||
| ^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
|
|
||||
LL | fn g<T: 'static>(data: &[T]) {
|
||||
| +++++++++
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/issue_74400.rs:12:5
|
||||
|
@ -1,8 +1,6 @@
|
||||
error[E0311]: the parameter type `T` may not live long enough
|
||||
--> $DIR/missing-lifetimes-in-signature-2.rs:20:5
|
||||
|
|
||||
LL | fn func<T: Test>(foo: &Foo, t: T) {
|
||||
| -- help: consider adding an explicit lifetime bound...: `T: 'a +`
|
||||
LL | / foo.bar(move |_| {
|
||||
LL | |
|
||||
LL | | t.test();
|
||||
@ -22,6 +20,10 @@ LL | |
|
||||
LL | | t.test();
|
||||
LL | | });
|
||||
| |______^
|
||||
help: consider adding an explicit lifetime bound...
|
||||
|
|
||||
LL | fn func<T: Test + 'a>(foo: &Foo, t: T) {
|
||||
| ++++
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -26,9 +26,6 @@ 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:31:5
|
||||
|
|
||||
LL | fn bar<G, T>(g: G, dest: &mut T) -> impl FnOnce() + '_
|
||||
| - help: consider adding an explicit lifetime bound...: `G: 'a`
|
||||
...
|
||||
LL | / move || {
|
||||
LL | | *dest = g.get();
|
||||
LL | | }
|
||||
@ -46,13 +43,14 @@ LL | / move || {
|
||||
LL | | *dest = g.get();
|
||||
LL | | }
|
||||
| |_____^
|
||||
help: consider adding an explicit lifetime bound...
|
||||
|
|
||||
LL | G: Get<T> + 'a,
|
||||
| ++++
|
||||
|
||||
error[E0311]: the parameter type `G` may not live long enough
|
||||
--> $DIR/missing-lifetimes-in-signature.rs:53:5
|
||||
|
|
||||
LL | fn qux<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_
|
||||
| -- help: consider adding an explicit lifetime bound...: `G: 'b +`
|
||||
...
|
||||
LL | / move || {
|
||||
LL | | *dest = g.get();
|
||||
LL | | }
|
||||
@ -70,13 +68,14 @@ LL | / move || {
|
||||
LL | | *dest = g.get();
|
||||
LL | | }
|
||||
| |_____^
|
||||
help: consider adding an explicit lifetime bound...
|
||||
|
|
||||
LL | fn qux<'a, G: 'a + '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:62:9
|
||||
|
|
||||
LL | fn qux<'b, G: Get<T> + 'b, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ {
|
||||
| -- help: consider adding an explicit lifetime bound...: `G: 'c +`
|
||||
LL |
|
||||
LL | / move || {
|
||||
LL | | *dest = g.get();
|
||||
LL | | }
|
||||
@ -94,13 +93,14 @@ LL | / move || {
|
||||
LL | | *dest = g.get();
|
||||
LL | | }
|
||||
| |_________^
|
||||
help: consider adding an explicit lifetime bound...
|
||||
|
|
||||
LL | fn qux<'b, G: Get<T> + 'b + 'c, 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:74:5
|
||||
|
|
||||
LL | fn bat<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ + 'a
|
||||
| -- help: consider adding an explicit lifetime bound...: `G: 'b +`
|
||||
...
|
||||
LL | / move || {
|
||||
LL | | *dest = g.get();
|
||||
LL | | }
|
||||
@ -118,6 +118,10 @@ LL | / move || {
|
||||
LL | | *dest = g.get();
|
||||
LL | | }
|
||||
| |_____^
|
||||
help: consider adding an explicit lifetime bound...
|
||||
|
|
||||
LL | fn bat<'a, G: 'a + 'b, 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:74:5
|
||||
@ -133,13 +137,15 @@ LL | | }
|
||||
error[E0309]: the parameter type `G` may not live long enough
|
||||
--> $DIR/missing-lifetimes-in-signature.rs:85:5
|
||||
|
|
||||
LL | fn bak<'a, G, T>(g: G, dest: &'a mut T) -> impl FnOnce() + 'a
|
||||
| - help: consider adding an explicit lifetime bound...: `G: 'a`
|
||||
...
|
||||
LL | / move || {
|
||||
LL | | *dest = g.get();
|
||||
LL | | }
|
||||
| |_____^ ...so that the type `G` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
|
|
||||
LL | G: Get<T> + 'a,
|
||||
| ++++
|
||||
|
||||
error: aborting due to 8 previous errors
|
||||
|
||||
|
@ -1,11 +1,13 @@
|
||||
error[E0310]: the parameter type `impl Debug` may not live long enough
|
||||
--> $DIR/suggest-impl-trait-lifetime.rs:7:5
|
||||
|
|
||||
LL | fn foo(d: impl Debug) {
|
||||
| ---------- help: consider adding an explicit lifetime bound...: `impl Debug + 'static`
|
||||
LL |
|
||||
LL | bar(d);
|
||||
| ^^^^^^ ...so that the type `impl Debug` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
|
|
||||
LL | fn foo(d: impl Debug + 'static) {
|
||||
| +++++++++
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user