reword trait bound suggestion message to include the bounds
This commit is contained in:
parent
68253e14ee
commit
d13c34828e
155 changed files with 331 additions and 314 deletions
|
@ -4,7 +4,7 @@ error[E0220]: associated type `Assoc` not found for `V`
|
|||
LL | pub type Foo<V> = impl Trait<V::Assoc>;
|
||||
| ^^^^^ there is an associated type `Assoc` in the trait `TraitWithAssoc`
|
||||
|
|
||||
help: consider restricting type parameter `V`
|
||||
help: consider restricting type parameter `V` with trait `TraitWithAssoc`
|
||||
|
|
||||
LL | pub type Foo<V: TraitWithAssoc> = impl Trait<V::Assoc>;
|
||||
| ++++++++++++++++
|
||||
|
@ -16,7 +16,7 @@ LL | pub type Foo<V> = impl Trait<V::Assoc>;
|
|||
| ^^^^^ there is an associated type `Assoc` in the trait `TraitWithAssoc`
|
||||
|
|
||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||
help: consider restricting type parameter `V`
|
||||
help: consider restricting type parameter `V` with trait `TraitWithAssoc`
|
||||
|
|
||||
LL | pub type Foo<V: TraitWithAssoc> = impl Trait<V::Assoc>;
|
||||
| ++++++++++++++++
|
||||
|
|
|
@ -4,7 +4,7 @@ error[E0277]: the trait bound `C: Bar<5>` is not satisfied
|
|||
LL | pub struct Structure<C: Tec> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bar<5>` is not implemented for `C`
|
||||
|
|
||||
help: consider further restricting this bound
|
||||
help: consider further restricting this bound with trait `Bar<5>`
|
||||
|
|
||||
LL | pub struct Structure<C: Tec + Bar<5>> {
|
||||
| ++++++++
|
||||
|
@ -15,7 +15,7 @@ error[E0277]: the trait bound `C: Bar<5>` is not satisfied
|
|||
LL | _field: C::BarType,
|
||||
| ^^^^^^^^^^ the trait `Bar<5>` is not implemented for `C`
|
||||
|
|
||||
help: consider further restricting this bound
|
||||
help: consider further restricting this bound with trait `Bar<5>`
|
||||
|
|
||||
LL | pub struct Structure<C: Tec + Bar<5>> {
|
||||
| ++++++++
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue