Closed
Description
For following code
pub trait Arbitrary: Sized + 'static {}
impl<'a, A> Arbitrary for ::std::borrow::Cow<'a, A> {}
The error is
error[E0277]: the trait bound `A: std::clone::Clone` is not satisfied
--> <anon>:3:13
|
3 | impl<'a, A> Arbitrary for ::std::borrow::Cow<'a, A> {}
| ^^^^^^^^^ the trait `std::clone::Clone` is not implemented for `A`
|
= help: consider adding a `where A: std::clone::Clone` bound
= note: required because of the requirements on the impl of `std::borrow::ToOwned` for `A`
= note: required because it appears within the type `std::borrow::Cow<'a, A>`
= note: required by `Arbitrary`
Note the span is pointing at Arbitrary
, despite error really being about the generic bound A
. It should point at A
instead.