rewording note and refer issue
This commit is contained in:
parent
c576dc55b8
commit
071d0cd9f2
2 changed files with 4 additions and 2 deletions
|
|
@ -294,7 +294,8 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
|
|||
if is_shadowed {
|
||||
diag.note(format!(
|
||||
"the associated type `{}` is defined as `{}` in the implementation, \
|
||||
but the generic bound `{}` hides this definition",
|
||||
but the where-bound `{}` shadows this definition\n\
|
||||
see issue #152409 <https://github.com/rust-lang/rust/issues/152409> for more information",
|
||||
self.ty_to_string(tcx.mk_ty_from_kind(ty::Alias(ty::Projection, *alias))),
|
||||
self.ty_to_string(concrete),
|
||||
self.ty_to_string(alias.self_ty())
|
||||
|
|
|
|||
|
|
@ -10,7 +10,8 @@ LL | x
|
|||
|
|
||||
= note: expected associated type `<T as Trait>::Assoc`
|
||||
found type parameter `T`
|
||||
= note: the associated type `<T as Trait>::Assoc` is defined as `T` in the implementation, but the generic bound `T` hides this definition
|
||||
= note: the associated type `<T as Trait>::Assoc` is defined as `T` in the implementation, but the where-bound `T` shadows this definition
|
||||
see issue #152409 <https://github.com/rust-lang/rust/issues/152409> for more information
|
||||
help: consider further restricting this bound
|
||||
|
|
||||
LL | fn foo<T: Trait<Assoc = T>>(x: T) -> T::Assoc {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue