Open
Description
For the following code
pub trait Arbitrary: Sized + 'static {}
impl<'a, A: Clone> Arbitrary for ::std::borrow::Cow<'a, A> {}
The diagnostic looks like this:
error[E0477]: the type `std::borrow::Cow<'a, A>` does not fulfill the required lifetime
--> <anon>:3:20
|
3 | impl<'a, A: Clone> Arbitrary for ::std::borrow::Cow<'a, A> {}
| ^^^^^^^^^
|
= note: type must outlive the static lifetime
The note here makes no sense, because the static lifetime is the longest lifetime of all and cannot really be outlived. We should reword the note so it doesn’t say “outlive”.
Bonus points for explaining where the lifetime requirement comes from, because it is not entirely clear what here introduces the requirement, when the trait and implementation definitions aren’t so close together.