remove trailing dots
This commit is contained in:
parent
996ffcb718
commit
a8830631b9
compiler/rustc_infer/src/infer/error_reporting
tests/ui
associated-inherent-types
async-await/in-trait
builtin-superkinds
coercion
consts
error-codes
fn
generic-associated-types
impl-trait
must_outlive_least_region_or_bound.stderrtype_parameters_captured.stderrunactionable_diagnostic.fixedunactionable_diagnostic.rsunactionable_diagnostic.stderr
lifetimes
lifetime-doesnt-live-long-enough.stderr
lifetime-errors
suggest-introducing-and-adding-missing-lifetime.stderrmarker_trait_attr
nll
closure-requirements
issue-98589-closures-relate-named-regions.stderrissue-98693.stderrmember-constraints
ty-outlives
impl-trait-outlives.stderrprojection-implied-bounds.stderrprojection-no-regions-closure.stderrprojection-no-regions-fn.stderrprojection-one-region-closure.stderrprojection-where-clause-none.stderrty-param-closure-approximate-lower-bound.stderrty-param-closure-outlives-from-return-type.stderrty-param-closure-outlives-from-where-clause.stderrty-param-fn-body.stderrty-param-fn.stderr
user-annotations
regions
regions-close-associated-type-into-object.stderrregions-close-object-into-object-4.stderrregions-close-object-into-object-5.stderrregions-close-over-type-parameter-1.stderrregions-close-param-into-object.stderrregions-implied-bounds-projection-gap-1.stderrregions-infer-bound-from-trait-self.stderrregions-infer-bound-from-trait.stderr
rfcs/rfc-2093-infer-outlives
suggestions
lifetimes
issue-105544.fixedissue-105544.rsissue-105544.stderrmissing-lifetimes-in-signature-2.stderrmissing-lifetimes-in-signature.stderrtype-param-bound-scope.stderrtype-param-missing-lifetime.stderr
suggest-impl-trait-lifetime.fixedsuggest-impl-trait-lifetime.rssuggest-impl-trait-lifetime.stderrtype-alias-impl-trait
closure_wf_outlives.stderrgeneric_type_does_not_live_long_enough.stderrimplied_lifetime_wf_check3.stderrimplied_lifetime_wf_check4_static.stderrwf-in-associated-type.fail.stderrwf-nested.fail.stderrwf-nested.pass_sound.stderr
wf
@ -2433,7 +2433,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
|
||||
}
|
||||
|
||||
err.multipart_suggestion_verbose(
|
||||
format!("{msg}..."),
|
||||
format!("{msg}"),
|
||||
suggs,
|
||||
Applicability::MaybeIncorrect, // Issue #41966
|
||||
);
|
||||
|
@ -6,7 +6,7 @@ LL | type NoTyOutliv<'a, T> = &'a T;
|
||||
| |
|
||||
| the parameter type `T` must be valid for the lifetime `'a` as defined here...
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | type NoTyOutliv<'a, T: 'a> = &'a T;
|
||||
| ++++
|
||||
|
@ -7,7 +7,7 @@ LL | async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash;
|
||||
| | the parameter type `U` must be valid for the anonymous lifetime as defined here...
|
||||
| ...so that the reference type `&(T, U)` does not outlive the data it points at
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | async fn foo<'a>(&'a self) -> &'a (T, U) where T: Debug + Sized, U: Hash, U: 'a;
|
||||
| ++++ ++ ++ +++++++
|
||||
@ -21,7 +21,7 @@ LL | async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash;
|
||||
| | the parameter type `T` must be valid for the anonymous lifetime as defined here...
|
||||
| ...so that the reference type `&(T, U)` does not outlive the data it points at
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | async fn foo<'a>(&'a self) -> &'a (T, U) where T: Debug + Sized, U: Hash, T: 'a;
|
||||
| ++++ ++ ++ +++++++
|
||||
|
@ -7,7 +7,7 @@ LL | async fn foo(&self) -> &(T, U);
|
||||
| | the parameter type `U` must be valid for the anonymous lifetime as defined here...
|
||||
| ...so that the reference type `&(T, U)` does not outlive the data it points at
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | async fn foo<'a>(&'a self) -> &'a (T, U) where U: 'a;
|
||||
| ++++ ++ ++ +++++++++++
|
||||
@ -21,7 +21,7 @@ LL | async fn foo(&self) -> &(T, U);
|
||||
| | the parameter type `T` must be valid for the anonymous lifetime as defined here...
|
||||
| ...so that the reference type `&(T, U)` does not outlive the data it points at
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | async fn foo<'a>(&'a self) -> &'a (T, U) where T: 'a;
|
||||
| ++++ ++ ++ +++++++++++
|
||||
|
@ -12,7 +12,7 @@ note: ...that is required by this bound
|
||||
|
|
||||
LL | trait Foo : Sized+Sync+'static {
|
||||
| ^^^^^^^
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | impl <T: Sync + 'static> Foo for T { }
|
||||
| +++++++++
|
||||
|
@ -7,7 +7,7 @@ LL | impl<T> CoerceUnsized<Foo<dyn Any>> for Foo<T> {}
|
||||
| the parameter type `T` must be valid for the static lifetime...
|
||||
| ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | impl<T: 'static> CoerceUnsized<Foo<dyn Any>> for Foo<T> {}
|
||||
| +++++++++
|
||||
|
@ -7,7 +7,7 @@ LL | type_id: TypeId::of::<T>(),
|
||||
| the parameter type `T` must be valid for the static lifetime...
|
||||
| ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | pub fn new<T: 'static>() -> &'static Self {
|
||||
| +++++++++
|
||||
@ -22,7 +22,7 @@ LL | type_id: TypeId::of::<T>(),
|
||||
| ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | pub fn new<T: 'static>() -> &'static Self {
|
||||
| +++++++++
|
||||
|
@ -6,7 +6,7 @@ LL | fn no_restriction<T>(x: &()) -> &() {
|
||||
LL | with_restriction::<T>(x)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn no_restriction<'a, T: 'a>(x: &'a ()) -> &'a () {
|
||||
| +++ ++++ ++ ++
|
||||
|
@ -11,7 +11,7 @@ note: ...that is required by this bound
|
||||
|
|
||||
LL | trait Trait<'a>: 'a {
|
||||
| ^^
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | impl<'a, T: 'a> Trait<'a> for T {
|
||||
| ++++
|
||||
|
@ -6,7 +6,7 @@ LL | type Item<'a> = &'a mut T;
|
||||
| |
|
||||
| the parameter type `T` must be valid for the lifetime `'a` as defined here...
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | type Item<'a> = &'a mut T where T: 'a;
|
||||
| +++++++++++
|
||||
|
@ -122,7 +122,7 @@ LL | x
|
||||
| the parameter type `T` must be valid for the static lifetime...
|
||||
| ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn ty_param_wont_outlive_static<T:Debug + 'static>(x: T) -> impl Debug + 'static {
|
||||
| +++++++++
|
||||
|
@ -7,7 +7,7 @@ LL | x
|
||||
| the parameter type `T` must be valid for the static lifetime...
|
||||
| ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn foo<T: 'static>(x: T) -> impl Any + 'static {
|
||||
| +++++++++
|
||||
|
@ -14,7 +14,7 @@ fn foo<'x, P>(
|
||||
}
|
||||
|
||||
pub fn bar<'t, T: 't>(
|
||||
//~^ HELP: consider adding an explicit lifetime bound...
|
||||
//~^ HELP: consider adding an explicit lifetime bound
|
||||
post: T,
|
||||
x: &'t Foo,
|
||||
) -> &'t impl Trait {
|
||||
|
@ -14,7 +14,7 @@ fn foo<'x, P>(
|
||||
}
|
||||
|
||||
pub fn bar<'t, T>(
|
||||
//~^ HELP: consider adding an explicit lifetime bound...
|
||||
//~^ HELP: consider adding an explicit lifetime bound
|
||||
post: T,
|
||||
x: &'t Foo,
|
||||
) -> &'t impl Trait {
|
||||
|
@ -7,7 +7,7 @@ LL | pub fn bar<'t, T>(
|
||||
LL | foo(post, x)
|
||||
| ^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | pub fn bar<'t, T: 't>(
|
||||
| ++++
|
||||
|
@ -7,7 +7,7 @@ LL | foo: &'static T
|
||||
| the parameter type `T` must be valid for the static lifetime...
|
||||
| ...so that the reference type `&'static T` does not outlive the data it points at
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | struct Foo<T: 'static> {
|
||||
| +++++++++
|
||||
@ -20,7 +20,7 @@ LL | fn generic_in_parent<'a, L: X<&'a Nested<K>>>() {
|
||||
| |
|
||||
| the parameter type `K` must be valid for the lifetime `'a` as defined here...
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn generic_in_parent<'a, L: X<&'a Nested<K>>>() where K: 'a {
|
||||
| +++++++++++
|
||||
@ -33,7 +33,7 @@ LL | fn generic_in_child<'a, 'b, L: X<&'a Nested<M>>, M: 'b>() {
|
||||
| |
|
||||
| the parameter type `M` must be valid for the lifetime `'a` as defined here...
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn generic_in_child<'a, 'b, L: X<&'a Nested<M>>, M: 'b + 'a>() {
|
||||
| ++++
|
||||
@ -46,7 +46,7 @@ LL | fn foo<'a, L: X<&'a Nested<K>>>();
|
||||
| |
|
||||
| the parameter type `K` must be valid for the lifetime `'a` as defined here...
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn foo<'a, L: X<&'a Nested<K>>>() where K: 'a;
|
||||
| +++++++++++
|
||||
@ -59,7 +59,7 @@ LL | fn bar<'a, L: X<&'a Nested<Self>>>();
|
||||
| |
|
||||
| the parameter type `Self` must be valid for the lifetime `'a` as defined here...
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn bar<'a, L: X<&'a Nested<Self>>>() where Self: 'a;
|
||||
| ++++++++++++++
|
||||
@ -72,7 +72,7 @@ LL | fn baz<'a, L, M: X<&'a Nested<L>>>() {
|
||||
| |
|
||||
| the parameter type `L` must be valid for the lifetime `'a` as defined here...
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn baz<'a, L: 'a, M: X<&'a Nested<L>>>() {
|
||||
| ++++
|
||||
|
@ -7,7 +7,7 @@ LL | f(data, identity)
|
||||
| the parameter type `T` must be valid for the static lifetime...
|
||||
| ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn g<T: 'static>(data: &[T]) {
|
||||
| +++++++++
|
||||
|
@ -6,7 +6,7 @@ LL | fn no_restriction<T>(x: &()) -> &() {
|
||||
LL | with_restriction::<T>(x)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn no_restriction<'a, T: 'a>(x: &'a ()) -> &'a () {
|
||||
| +++ ++++ ++ ++
|
||||
|
@ -7,7 +7,7 @@ LL | impl<T: Copy> F for T {}
|
||||
| the parameter type `T` must be valid for the static lifetime...
|
||||
| ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | impl<T: Copy + 'static> F for T {}
|
||||
| +++++++++
|
||||
|
@ -31,7 +31,7 @@ LL | fn supply<'a, T>(value: T)
|
||||
LL | require(value);
|
||||
| ^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | T: Trait<'a> + 'a,
|
||||
| ++++
|
||||
|
@ -42,7 +42,7 @@ LL | fn test_early_type<'a: 'a, T>() {
|
||||
LL | || { None::<&'a T>; };
|
||||
| ^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn test_early_type<'a: 'a, T: 'a>() {
|
||||
| ++++
|
||||
@ -55,7 +55,7 @@ LL | fn test_late_type<'a, T>() {
|
||||
LL | || { None::<&'a T>; };
|
||||
| ^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn test_late_type<'a, T: 'a>() {
|
||||
| ++++
|
||||
|
@ -7,7 +7,7 @@ LL | assert_static::<T>();
|
||||
| the parameter type `T` must be valid for the static lifetime...
|
||||
| ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn test<T: 'static>() {
|
||||
| +++++++++
|
||||
|
@ -7,7 +7,7 @@ LL | fn test_b<'a, 'b, 'c, T>() -> impl Cap<'a> + Cap<'b> + Cap<'c>
|
||||
LL | type_test::<'_, T>() // This should pass if we pick 'b.
|
||||
| ^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | T: 'b + 'a,
|
||||
| ++++
|
||||
@ -21,7 +21,7 @@ LL | fn test_c<'a, 'b, 'c, T>() -> impl Cap<'a> + Cap<'b> + Cap<'c>
|
||||
LL | type_test::<'_, T>() // This should pass if we pick 'c.
|
||||
| ^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | T: 'c + 'a,
|
||||
| ++++
|
||||
|
@ -7,7 +7,7 @@ LL | fn no_region<'a, T>(x: Box<T>) -> impl Debug + 'a
|
||||
LL | x
|
||||
| ^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | T: Debug + 'a,
|
||||
| ++++
|
||||
@ -21,7 +21,7 @@ LL | fn wrong_region<'a, 'b, T>(x: Box<T>) -> impl Debug + 'a
|
||||
LL | x
|
||||
| ^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | T: 'b + Debug + 'a,
|
||||
| ++++
|
||||
|
@ -7,7 +7,7 @@ LL | twice(value, |value_ref, item| invoke2(value_ref, item));
|
||||
| the parameter type `T` must be valid for the static lifetime...
|
||||
| ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn generic2<T: Iterator + 'static>(value: T) {
|
||||
| +++++++++
|
||||
|
@ -31,7 +31,7 @@ LL | fn no_region<'a, T>(x: Box<T>) -> Box<dyn Anything + 'a>
|
||||
LL | with_signature(x, |mut y| Box::new(y.next()))
|
||||
| ^^^^^^^^^^^^^^^^^^ ...so that the type `<T as Iterator>::Item` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | T: Iterator, <T as Iterator>::Item: 'a
|
||||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@ -93,7 +93,7 @@ LL | fn wrong_region<'a, 'b, T>(x: Box<T>) -> Box<dyn Anything + 'a>
|
||||
LL | with_signature(x, |mut y| Box::new(y.next()))
|
||||
| ^^^^^^^^^^^^^^^^^^ ...so that the type `<T as Iterator>::Item` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | T: 'b + Iterator, <T as Iterator>::Item: 'a
|
||||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -7,7 +7,7 @@ LL | fn no_region<'a, T>(mut x: T) -> Box<dyn Anything + 'a>
|
||||
LL | Box::new(x.next())
|
||||
| ^^^^^^^^^^^^^^^^^^ ...so that the type `<T as Iterator>::Item` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | T: Iterator, <T as Iterator>::Item: 'a
|
||||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@ -21,7 +21,7 @@ LL | fn wrong_region<'a, 'b, T>(mut x: T) -> Box<dyn Anything + 'a>
|
||||
LL | Box::new(x.next())
|
||||
| ^^^^^^^^^^^^^^^^^^ ...so that the type `<T as Iterator>::Item` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | T: 'b + Iterator, <T as Iterator>::Item: 'a
|
||||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -33,7 +33,7 @@ LL | fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
|
||||
LL | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
| ^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | T: Anything<'b> + 'a,
|
||||
| ++++
|
||||
@ -86,7 +86,7 @@ LL | fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
|
||||
LL | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
| ^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | T: Anything<'b> + 'a,
|
||||
| ++++
|
||||
|
@ -7,7 +7,7 @@ LL | fn foo<'a, T>() -> &'a ()
|
||||
LL | bar::<T::Output>()
|
||||
| ^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | T: MyTrait<'a> + 'a,
|
||||
| ++++
|
||||
|
@ -51,7 +51,7 @@ LL | fn generic_fail<'a, T>(cell: Cell<&'a ()>, value: T) {
|
||||
LL | twice(cell, value, |a, b| invoke(a, b));
|
||||
| ^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn generic_fail<'a, T: 'a>(cell: Cell<&'a ()>, value: T) {
|
||||
| ++++
|
||||
|
@ -31,7 +31,7 @@ LL | fn no_region<'a, T>(x: Box<T>) -> Box<dyn Debug + 'a>
|
||||
LL | with_signature(x, |y| y)
|
||||
| ^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | T: Debug + 'a,
|
||||
| ++++
|
||||
@ -45,7 +45,7 @@ LL | fn wrong_region<'a, 'b, T>(x: Box<T>) -> Box<Debug + 'a>
|
||||
LL | x
|
||||
| ^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | T: 'b + Debug + 'a,
|
||||
| ++++
|
||||
|
@ -30,7 +30,7 @@ LL | fn no_region<'a, T>(a: Cell<&'a ()>, b: T) {
|
||||
LL | require(&x, &y)
|
||||
| ^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn no_region<'a, T: 'a>(a: Cell<&'a ()>, b: T) {
|
||||
| ++++
|
||||
@ -93,7 +93,7 @@ LL | fn wrong_region<'a, 'b, T>(a: Cell<&'a ()>, b: T)
|
||||
LL | require(&x, &y)
|
||||
| ^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | T: 'b + 'a,
|
||||
| ++++
|
||||
|
@ -6,7 +6,7 @@ LL | fn region_static<'a, T>(cell: Cell<&'a usize>, t: T) {
|
||||
LL | outlives(cell, t)
|
||||
| ^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn region_static<'a, T: 'a>(cell: Cell<&'a usize>, t: T) {
|
||||
| ++++
|
||||
|
@ -7,7 +7,7 @@ LL | fn no_region<'a, T>(x: Box<T>) -> Box<Debug + 'a>
|
||||
LL | x
|
||||
| ^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | T: Debug + 'a,
|
||||
| ++++
|
||||
@ -21,7 +21,7 @@ LL | fn wrong_region<'a, 'b, T>(x: Box<T>) -> Box<Debug + 'a>
|
||||
LL | x
|
||||
| ^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | T: 'b + Debug + 'a,
|
||||
| ++++
|
||||
|
@ -7,7 +7,7 @@ LL | let _: <(_,) as Tr>::Ty = a;
|
||||
| the parameter type `A` must be valid for the static lifetime...
|
||||
| ...so that the type `A` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn test1<A: 'static, B, C, D>(a: A, b: B, c: C) {
|
||||
| +++++++++
|
||||
@ -21,7 +21,7 @@ LL | Some::<<(_,) as Tr>::Ty>(b);
|
||||
| the parameter type `B` must be valid for the static lifetime...
|
||||
| ...so that the type `B` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn test1<A, B: 'static, C, D>(a: A, b: B, c: C) {
|
||||
| +++++++++
|
||||
@ -35,7 +35,7 @@ LL | || -> <(_,) as Tr>::Ty { c };
|
||||
| the parameter type `C` must be valid for the static lifetime...
|
||||
| ...so that the type `C` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn test1<A, B, C: 'static, D>(a: A, b: B, c: C) {
|
||||
| +++++++++
|
||||
@ -49,7 +49,7 @@ LL | |d: <(_,) as Tr>::Ty| -> D { d };
|
||||
| the parameter type `D` must be valid for the static lifetime...
|
||||
| ...so that the type `D` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn test1<A, B, C, D: 'static>(a: A, b: B, c: C) {
|
||||
| +++++++++
|
||||
@ -63,7 +63,7 @@ LL | let _: Alias<_, _> = (a, 0u8);
|
||||
| the parameter type `A` must be valid for the static lifetime...
|
||||
| ...so that the type `A` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn test2<A: 'static, B, C>(a: A, b: B, c: C) {
|
||||
| +++++++++
|
||||
@ -77,7 +77,7 @@ LL | Some::<Alias<_, _>>((b, 0u8));
|
||||
| the parameter type `B` must be valid for the static lifetime...
|
||||
| ...so that the type `B` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn test2<A, B: 'static, C>(a: A, b: B, c: C) {
|
||||
| +++++++++
|
||||
@ -91,7 +91,7 @@ LL | || -> Alias<_, _> { (c, 0u8) };
|
||||
| the parameter type `C` must be valid for the static lifetime...
|
||||
| ...so that the type `C` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn test2<A, B, C: 'static>(a: A, b: B, c: C) {
|
||||
| +++++++++
|
||||
|
@ -7,7 +7,7 @@ LL | Box::new(item)
|
||||
| the associated type `<T as Iter>::Item` must be valid for the static lifetime...
|
||||
| ...so that the type `<T as Iter>::Item` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn bad1<T: Iter>(v: T) -> Box<dyn X + 'static> where <T as Iter>::Item: 'static
|
||||
| ++++++++++++++++++++++++++++++++
|
||||
@ -21,7 +21,7 @@ LL | Box::new(item)
|
||||
| the associated type `<T as Iter>::Item` must be valid for the static lifetime...
|
||||
| ...so that the type `<T as Iter>::Item` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | where Box<T::Item> : X, <T as Iter>::Item: 'static
|
||||
| ++++++++++++++++++++++++++++
|
||||
@ -35,7 +35,7 @@ LL | fn bad3<'a, T: Iter>(v: T) -> Box<dyn X + 'a>
|
||||
LL | Box::new(item)
|
||||
| ^^^^^^^^^^^^^^ ...so that the type `<T as Iter>::Item` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn bad3<'a, T: Iter>(v: T) -> Box<dyn X + 'a> where <T as Iter>::Item: 'a
|
||||
| +++++++++++++++++++++++++++
|
||||
@ -49,7 +49,7 @@ LL | fn bad4<'a, T: Iter>(v: T) -> Box<dyn X + 'a>
|
||||
LL | Box::new(item)
|
||||
| ^^^^^^^^^^^^^^ ...so that the type `<T as Iter>::Item` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | where Box<T::Item> : X, <T as Iter>::Item: 'a
|
||||
| +++++++++++++++++++++++
|
||||
|
@ -7,7 +7,7 @@ LL | Box::new(B(&*v)) as Box<dyn X>
|
||||
| the parameter type `U` must be valid for the static lifetime...
|
||||
| ...so that the type `U` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn i<'a, T, U: 'static>(v: Box<dyn A<U>+'a>) -> Box<dyn X + 'static> {
|
||||
| +++++++++
|
||||
@ -21,7 +21,7 @@ LL | Box::new(B(&*v)) as Box<dyn X>
|
||||
| the parameter type `U` must be valid for the static lifetime...
|
||||
| ...so that the type `U` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn i<'a, T, U: 'static>(v: Box<dyn A<U>+'a>) -> Box<dyn X + 'static> {
|
||||
| +++++++++
|
||||
@ -36,7 +36,7 @@ LL | Box::new(B(&*v)) as Box<dyn X>
|
||||
| ...so that the type `U` will meet its required lifetime bounds
|
||||
|
|
||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn i<'a, T, U: 'static>(v: Box<dyn A<U>+'a>) -> Box<dyn X + 'static> {
|
||||
| +++++++++
|
||||
@ -76,7 +76,7 @@ LL | Box::new(B(&*v)) as Box<dyn X>
|
||||
| the parameter type `U` must be valid for the static lifetime...
|
||||
| ...so that the type `U` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn i<'a, T, U: 'static>(v: Box<dyn A<U>+'a>) -> Box<dyn X + 'static> {
|
||||
| +++++++++
|
||||
|
@ -7,7 +7,7 @@ LL | Box::new(B(&*v)) as Box<dyn X>
|
||||
| the parameter type `T` must be valid for the static lifetime...
|
||||
| ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn f<'a, T: 'static, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> {
|
||||
| +++++++++
|
||||
@ -21,7 +21,7 @@ LL | Box::new(B(&*v)) as Box<dyn X>
|
||||
| the parameter type `T` must be valid for the static lifetime...
|
||||
| ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn f<'a, T: 'static, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> {
|
||||
| +++++++++
|
||||
@ -36,7 +36,7 @@ LL | Box::new(B(&*v)) as Box<dyn X>
|
||||
| ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn f<'a, T: 'static, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> {
|
||||
| +++++++++
|
||||
@ -59,7 +59,7 @@ LL | Box::new(B(&*v)) as Box<dyn X>
|
||||
| the parameter type `T` must be valid for the static lifetime...
|
||||
| ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn f<'a, T: 'static, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> {
|
||||
| +++++++++
|
||||
|
@ -7,7 +7,7 @@ LL | Box::new(v) as Box<dyn SomeTrait + 'static>
|
||||
| the parameter type `A` must be valid for the static lifetime...
|
||||
| ...so that the type `A` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn make_object1<A: SomeTrait + 'static>(v: A) -> Box<dyn SomeTrait + 'static> {
|
||||
| +++++++++
|
||||
@ -20,7 +20,7 @@ LL | fn make_object3<'a, 'b, A: SomeTrait + 'a>(v: A) -> Box<dyn SomeTrait + 'b>
|
||||
LL | Box::new(v) as Box<dyn SomeTrait + 'b>
|
||||
| ^^^^^^^^^^^ ...so that the type `A` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn make_object3<'a, 'b, A: SomeTrait + 'a + 'b>(v: A) -> Box<dyn SomeTrait + 'b> {
|
||||
| ++++
|
||||
|
@ -7,7 +7,7 @@ LL | Box::new(v)
|
||||
| the parameter type `T` must be valid for the static lifetime...
|
||||
| ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | where T : X + 'static
|
||||
| +++++++++
|
||||
@ -21,7 +21,7 @@ LL | Box::new(v)
|
||||
| the parameter type `T` must be valid for the static lifetime...
|
||||
| ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn p2<T: 'static>(v: Box<T>) -> Box<dyn X + 'static>
|
||||
| +++++++++
|
||||
@ -35,7 +35,7 @@ LL | fn p3<'a,T>(v: T) -> Box<dyn X + 'a>
|
||||
LL | Box::new(v)
|
||||
| ^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | where T : X + 'a
|
||||
| ++++
|
||||
@ -49,7 +49,7 @@ LL | fn p4<'a,T>(v: Box<T>) -> Box<dyn X + 'a>
|
||||
LL | Box::new(v)
|
||||
| ^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn p4<'a,T: 'a>(v: Box<T>) -> Box<dyn X + 'a>
|
||||
| ++++
|
||||
|
@ -7,7 +7,7 @@ LL | {
|
||||
LL | wf::<&'x T>();
|
||||
| ^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn func<'x, T:Trait1<'x> + 'x>(t: &'x T::Foo)
|
||||
| ++++
|
||||
|
@ -7,7 +7,7 @@ LL | fn foo(self, x: Inv<'a>) {
|
||||
LL | check_bound(x, self)
|
||||
| ^^^^^^^^^^^^^^^^^^^^ ...so that the type `Self` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | trait InheritsFromNothing<'a> : Sized where Self: 'a {
|
||||
| ++++++++++++++
|
||||
|
@ -6,7 +6,7 @@ LL | fn bar1<'a,A>(x: Inv<'a>, a: A) {
|
||||
LL | check_bound(x, a)
|
||||
| ^^^^^^^^^^^^^^^^^ ...so that the type `A` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn bar1<'a,A: 'a>(x: Inv<'a>, a: A) {
|
||||
| ++++
|
||||
@ -19,7 +19,7 @@ LL | fn bar2<'a,'b,A:Is<'b>>(x: Inv<'a>, y: Inv<'b>, a: A) {
|
||||
LL | check_bound(x, a)
|
||||
| ^^^^^^^^^^^^^^^^^ ...so that the type `A` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn bar2<'a,'b,A:Is<'b> + 'a>(x: Inv<'a>, y: Inv<'b>, a: A) {
|
||||
| ++++
|
||||
|
@ -12,7 +12,7 @@ note: ...that is required by this bound
|
||||
|
|
||||
LL | struct Bar<T: 'static> {
|
||||
| ^^^^^^^
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | struct Foo<U: 'static> {
|
||||
| +++++++++
|
||||
|
@ -6,7 +6,7 @@ LL | enum Ref1<'a, T> {
|
||||
LL | Ref1Variant1(RequireOutlives<'a, T>),
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | enum Ref1<'a, T: 'a> {
|
||||
| ++++
|
||||
@ -20,7 +20,7 @@ LL | Ref2Variant1,
|
||||
LL | Ref2Variant2(isize, RequireOutlives<'a, T>),
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | enum Ref2<'a, T: 'a> {
|
||||
| ++++
|
||||
@ -33,7 +33,7 @@ LL | enum RefDouble<'a, 'b, T> {
|
||||
LL | RefDoubleVariant1(&'a RequireOutlives<'b, T>),
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | enum RefDouble<'a, 'b, T: 'b> {
|
||||
| ++++
|
||||
|
@ -6,7 +6,7 @@ LL | impl<'a, T> Trait<'a, T> for usize {
|
||||
LL | type Out = &'a T;
|
||||
| ^^^^^ ...so that the reference type `&'a T` does not outlive the data it points at
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | impl<'a, T: 'a> Trait<'a, T> for usize {
|
||||
| ++++
|
||||
@ -24,7 +24,7 @@ note: ...that is required by this bound
|
||||
|
|
||||
LL | struct RefOk<'a, T:'a> {
|
||||
| ^^
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | impl<'a, T: 'a> Trait<'a, T> for u32 {
|
||||
| ++++
|
||||
|
@ -11,7 +11,7 @@ fn foo<'a>(d: impl Sized + 'a, p: &'a mut ()) -> impl Sized + 'a { //~ NOTE the
|
||||
|
||||
fn foo1<'b>(d: impl Sized + 'b, p: &'b mut ()) -> impl Sized + '_ {
|
||||
//~^ NOTE the parameter type `impl Sized` must be valid for the lifetime `'b` as defined here...
|
||||
//~| HELP consider adding an explicit lifetime bound...
|
||||
//~| HELP consider adding an explicit lifetime bound
|
||||
(d, p) //~ NOTE ...so that the type `impl Sized` will meet its required lifetime bounds
|
||||
//~^ ERROR the parameter type `impl Sized` may not live long enough
|
||||
}
|
||||
@ -32,7 +32,7 @@ fn bar<'a, T : Sized + 'a>(d: T, p: &'a mut ()) -> impl Sized + 'a { //~ NOTE t
|
||||
|
||||
fn bar1<'b, T : Sized + 'b>(d: T, p: &'b mut ()) -> impl Sized + '_ {
|
||||
//~^ NOTE the parameter type `T` must be valid for the lifetime `'b` as defined here...
|
||||
//~| HELP consider adding an explicit lifetime bound...
|
||||
//~| HELP consider adding an explicit lifetime bound
|
||||
(d, p) //~ NOTE ...so that the type `T` will meet its required lifetime bounds
|
||||
//~^ ERROR the parameter type `T` may not live long enough
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ fn foo(d: impl Sized, p: &mut ()) -> impl Sized + '_ { //~ NOTE the parameter ty
|
||||
|
||||
fn foo1<'b>(d: impl Sized, p: &'b mut ()) -> impl Sized + '_ {
|
||||
//~^ NOTE the parameter type `impl Sized` must be valid for the lifetime `'b` as defined here...
|
||||
//~| HELP consider adding an explicit lifetime bound...
|
||||
//~| HELP consider adding an explicit lifetime bound
|
||||
(d, p) //~ NOTE ...so that the type `impl Sized` will meet its required lifetime bounds
|
||||
//~^ ERROR the parameter type `impl Sized` may not live long enough
|
||||
}
|
||||
@ -32,7 +32,7 @@ fn bar<T : Sized>(d: T, p: & mut ()) -> impl Sized + '_ { //~ NOTE the parameter
|
||||
|
||||
fn bar1<'b, T : Sized>(d: T, p: &'b mut ()) -> impl Sized + '_ {
|
||||
//~^ NOTE the parameter type `T` must be valid for the lifetime `'b` as defined here...
|
||||
//~| HELP consider adding an explicit lifetime bound...
|
||||
//~| HELP consider adding an explicit lifetime bound
|
||||
(d, p) //~ NOTE ...so that the type `T` will meet its required lifetime bounds
|
||||
//~^ ERROR the parameter type `T` may not live long enough
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ LL |
|
||||
LL | (d, p)
|
||||
| ^^^^^^ ...so that the type `impl Sized` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn foo<'a>(d: impl Sized + 'a, p: &'a mut ()) -> impl Sized + 'a {
|
||||
| ++++ ++++ ++ ~~
|
||||
@ -21,7 +21,7 @@ LL | fn foo1<'b>(d: impl Sized, p: &'b mut ()) -> impl Sized + '_ {
|
||||
LL | (d, p)
|
||||
| ^^^^^^ ...so that the type `impl Sized` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn foo1<'b>(d: impl Sized + 'b, p: &'b mut ()) -> impl Sized + '_ {
|
||||
| ++++
|
||||
@ -35,7 +35,7 @@ LL |
|
||||
LL | (d, p)
|
||||
| ^^^^^^ ...so that the type `impl Sized + 'a` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn foo2<'b, 'a>(d: impl Sized + 'a + 'b, p: &'b mut ()) -> impl Sized + 'b {
|
||||
| +++ ++++ ++ ~~
|
||||
@ -49,7 +49,7 @@ LL |
|
||||
LL | (d, p)
|
||||
| ^^^^^^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn bar<'a, T : Sized + 'a>(d: T, p: &'a mut ()) -> impl Sized + 'a {
|
||||
| +++ ++++ ++ ~~
|
||||
@ -63,7 +63,7 @@ LL | fn bar1<'b, T : Sized>(d: T, p: &'b mut ()) -> impl Sized + '_ {
|
||||
LL | (d, p)
|
||||
| ^^^^^^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn bar1<'b, T : Sized + 'b>(d: T, p: &'b mut ()) -> impl Sized + '_ {
|
||||
| ++++
|
||||
@ -77,7 +77,7 @@ LL |
|
||||
LL | (d, p)
|
||||
| ^^^^^^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn bar2<'b, 'a, T : Sized + 'a + 'b>(d: T, p: &'b mut ()) -> impl Sized + 'b {
|
||||
| +++ ++++ ++ ~~
|
||||
|
@ -9,7 +9,7 @@ LL | | t.test();
|
||||
LL | | });
|
||||
| |______^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn func<'a, T: Test + 'a>(_dummy: &Foo, foo: &Foo<'a>, t: T) {
|
||||
| +++ ++++ ++++
|
||||
|
@ -37,7 +37,7 @@ LL | | *dest = g.get();
|
||||
LL | | }
|
||||
| |_____^ ...so that the type `G` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL ~ fn bar<'a, G, T>(g: G, dest: &'a mut T) -> impl FnOnce() + 'a
|
||||
LL | where
|
||||
@ -56,7 +56,7 @@ LL | | *dest = g.get();
|
||||
LL | | }
|
||||
| |_____^ ...so that the type `G` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn qux<'b, 'a, G: 'a + 'b, T>(g: G, dest: &'b mut T) -> impl FnOnce() + 'b
|
||||
| +++ ++++ ++ ~~
|
||||
@ -72,7 +72,7 @@ LL | | *dest = g.get();
|
||||
LL | | }
|
||||
| |_________^ ...so that the type `G` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn qux<'c, 'b, G: Get<T> + 'b + 'c, T>(g: G, dest: &'c mut T) -> impl FnOnce() + 'c {
|
||||
| +++ ++++ ++ ~~
|
||||
@ -90,7 +90,7 @@ LL | | *dest = g.get();
|
||||
LL | | }
|
||||
| |_____^ ...so that the type `G` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn bat<'b, 'a, G: 'a + 'b, T>(g: G, dest: &'b mut T) -> impl FnOnce() + 'b + 'a
|
||||
| +++ ++++ ++ ~~
|
||||
@ -120,7 +120,7 @@ LL | | *dest = g.get();
|
||||
LL | | }
|
||||
| |_____^ ...so that the type `G` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | G: Get<T> + 'a,
|
||||
| ++++
|
||||
|
@ -7,7 +7,7 @@ LL | fn foo(self, lt: Inv<'a>) {
|
||||
LL | check_bound(self, lt)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ ...so that the type `Self` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | trait Trait1<'a>: Sized where Self: 'a {
|
||||
| ++++++++++++++
|
||||
@ -20,7 +20,7 @@ LL | fn foo<'a>(self, lt: Inv<'a>) {
|
||||
LL | check_bound(self, lt)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ ...so that the type `Self` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn foo<'a>(self, lt: Inv<'a>) where Self: 'a {
|
||||
| ++++++++++++++
|
||||
@ -33,7 +33,7 @@ LL | fn foo<'a>(arg: T, lt: Inv<'a>) {
|
||||
LL | check_bound(arg, lt)
|
||||
| ^^^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn foo<'a>(arg: T, lt: Inv<'a>) where T: 'a {
|
||||
| +++++++++++
|
||||
@ -47,7 +47,7 @@ LL | fn foo<T>(arg: T, lt: Inv<'a>) {
|
||||
LL | check_bound(arg, lt)
|
||||
| ^^^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn foo<T: 'a>(arg: T, lt: Inv<'a>) {
|
||||
| ++++
|
||||
@ -61,7 +61,7 @@ LL | fn foo(self, lt: Inv<'a>) {
|
||||
LL | check_bound(self, lt);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | impl<'a, T: 'a> Trait5<'a> for T {
|
||||
| ++++
|
||||
|
@ -7,7 +7,7 @@ LL | async fn foo<A>(self, arg: A, _: &str) -> &str {
|
||||
LL | check_bound(arg, self.0 .0);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `A` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL ~ impl<'a, X> MyTy<Elided<'a, X>> {
|
||||
LL ~ async fn foo<A: 'a>(self, arg: A, _: &str) -> &str {
|
||||
@ -22,7 +22,7 @@ LL | lt: Inv<'_>,
|
||||
LL | check_bound(arg, lt);
|
||||
| ^^^^^^^^^^^^^^^^^^^^ ...so that the type `A` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL ~ async fn foo2<'b>(
|
||||
LL | arg: A,
|
||||
@ -42,7 +42,7 @@ LL | async fn bar2<'b>(_dummy: &'a u8, arg: A, lt: Inv<'_>) {
|
||||
LL | check_bound(arg, lt);
|
||||
| ^^^^^^^^^^^^^^^^^^^^ ...so that the type `A` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | async fn bar2<'c, 'b>(_dummy: &'a u8, arg: A, lt: Inv<'c>) where A: 'c {
|
||||
| +++ ~~ +++++++++++
|
||||
@ -56,7 +56,7 @@ LL | async fn foo3(self) {
|
||||
LL | check_bound(self.0 .1, self.0 .0);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `A` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | impl<'a, A: 'a> MyTy<Elided<'a, A>> {
|
||||
| +++ ++++ ~~
|
||||
|
@ -3,7 +3,7 @@
|
||||
use std::fmt::Debug;
|
||||
|
||||
fn foo(d: impl Debug + 'static) {
|
||||
//~^ HELP consider adding an explicit lifetime bound...
|
||||
//~^ HELP consider adding an explicit lifetime bound
|
||||
bar(d);
|
||||
//~^ ERROR the parameter type `impl Debug` may not live long enough
|
||||
//~| NOTE the parameter type `impl Debug` must be valid for the static lifetime...
|
||||
|
@ -3,7 +3,7 @@
|
||||
use std::fmt::Debug;
|
||||
|
||||
fn foo(d: impl Debug) {
|
||||
//~^ HELP consider adding an explicit lifetime bound...
|
||||
//~^ HELP consider adding an explicit lifetime bound
|
||||
bar(d);
|
||||
//~^ ERROR the parameter type `impl Debug` may not live long enough
|
||||
//~| NOTE the parameter type `impl Debug` must be valid for the static lifetime...
|
||||
|
@ -7,7 +7,7 @@ LL | bar(d);
|
||||
| the parameter type `impl Debug` must be valid for the static lifetime...
|
||||
| ...so that the type `impl Debug` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn foo(d: impl Debug + 'static) {
|
||||
| +++++++++
|
||||
|
@ -56,7 +56,7 @@ note: ...that is required by this bound
|
||||
|
|
||||
LL | T: 'static,
|
||||
| ^^^^^^^
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | type Opaque<T: 'static> = impl Sized;
|
||||
| +++++++++
|
||||
|
@ -22,7 +22,7 @@ LL | t
|
||||
| the parameter type `T` must be valid for the static lifetime...
|
||||
| ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn wrong_generic<T: 'static>(t: T) -> WrongGeneric<T> {
|
||||
| +++++++++
|
||||
|
@ -27,7 +27,7 @@ LL | fn test<A>() where Ty<A>: 'static { assert_static::<A>() }
|
||||
| the parameter type `A` must be valid for the static lifetime...
|
||||
| ...so that the type `A` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn test<A: 'static>() where Ty<A>: 'static { assert_static::<A>() }
|
||||
| +++++++++
|
||||
|
@ -7,7 +7,7 @@ LL | type Ty<A> = impl Sized + 'static;
|
||||
| the parameter type `A` must be valid for the static lifetime...
|
||||
| ...so that the type `A` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | type Ty<A: 'static> = impl Sized + 'static;
|
||||
| +++++++++
|
||||
|
@ -6,7 +6,7 @@ LL | impl<'a, T> Trait<'a, T> for () {
|
||||
LL | type Opaque = impl Sized + 'a;
|
||||
| ^^^^^^^^^^^^^^^ ...so that the type `&'a T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | impl<'a, T: 'a> Trait<'a, T> for () {
|
||||
| ++++
|
||||
@ -19,7 +19,7 @@ LL | impl<'a, T> Trait<'a, T> for () {
|
||||
LL | type Opaque = impl Sized + 'a;
|
||||
| ^^^^^^^^^^^^^^^ ...so that the reference type `&'a T` does not outlive the data it points at
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | impl<'a, T: 'a> Trait<'a, T> for () {
|
||||
| ++++
|
||||
|
@ -12,7 +12,7 @@ note: ...that is required by this bound
|
||||
|
|
||||
LL | struct IsStatic<T: 'static>(T);
|
||||
| ^^^^^^^
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | type InnerOpaque<T: 'static> = impl Sized;
|
||||
| +++++++++
|
||||
|
@ -7,7 +7,7 @@ LL | let _ = outer.get();
|
||||
| the parameter type `T` must be valid for the static lifetime...
|
||||
| ...so that the type `T` will meet its required lifetime bounds
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | fn test<T: 'static>() {
|
||||
| +++++++++
|
||||
|
@ -6,7 +6,7 @@ LL | impl<'a, T> Foo<'a> for T {
|
||||
LL | type Bar = &'a T;
|
||||
| ^^^^^ ...so that the reference type `&'a T` does not outlive the data it points at
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | impl<'a, T: 'a> Foo<'a> for T {
|
||||
| ++++
|
||||
|
@ -7,7 +7,7 @@ LL | x: fn() -> &'static T
|
||||
| the parameter type `T` must be valid for the static lifetime...
|
||||
| ...so that the reference type `&'static T` does not outlive the data it points at
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | struct Foo<T: 'static> {
|
||||
| +++++++++
|
||||
@ -21,7 +21,7 @@ LL | x: fn(&'static T)
|
||||
| the parameter type `T` must be valid for the static lifetime...
|
||||
| ...so that the reference type `&'static T` does not outlive the data it points at
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | struct Bar<T: 'static> {
|
||||
| +++++++++
|
||||
|
@ -7,7 +7,7 @@ LL | x: dyn Object<&'static T>
|
||||
| the parameter type `T` must be valid for the static lifetime...
|
||||
| ...so that the reference type `&'static T` does not outlive the data it points at
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | struct Foo<T: 'static> {
|
||||
| +++++++++
|
||||
|
@ -6,7 +6,7 @@ LL | impl<'a, T> Trait<'a, T> for usize {
|
||||
LL | type Out = &'a fn(T);
|
||||
| ^^^^^^^^^ ...so that the reference type `&'a fn(T)` does not outlive the data it points at
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | impl<'a, T: 'a> Trait<'a, T> for usize {
|
||||
| ++++
|
||||
@ -19,7 +19,7 @@ LL | impl<'a, T> Trait<'a, T> for u32 {
|
||||
LL | type Out = &'a dyn Baz<T>;
|
||||
| ^^^^^^^^^^^^^^ ...so that the reference type `&'a (dyn Baz<T> + 'a)` does not outlive the data it points at
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | impl<'a, T: 'a> Trait<'a, T> for u32 {
|
||||
| ++++
|
||||
|
@ -7,7 +7,7 @@ LL | type Type1;
|
||||
LL | type Type2 = &'a Self::Type1;
|
||||
| ^^^^^^^^^^^^^^^ ...so that the reference type `&'a <Self as SomeTrait<'a>>::Type1` does not outlive the data it points at
|
||||
|
|
||||
help: consider adding an explicit lifetime bound...
|
||||
help: consider adding an explicit lifetime bound
|
||||
|
|
||||
LL | type Type2 = &'a Self::Type1 where <Self as SomeTrait<'a>>::Type1: 'a;
|
||||
| ++++++++++++++++++++++++++++++++++++++++
|
||||
|
Loading…
x
Reference in New Issue
Block a user