Account for impl Trait
in "add bound" suggestion message
This commit is contained in:
parent
d860e5b088
commit
cb4db0a6c6
5 changed files with 10 additions and 4 deletions
|
@ -531,6 +531,12 @@ pub fn suggest_constraining_type_params<'a>(
|
|||
SuggestChangingConstraintsMessage::RestrictBoundFurther => {
|
||||
format!("consider further restricting this bound with {post}")
|
||||
}
|
||||
SuggestChangingConstraintsMessage::RestrictTypeFurther { ty }
|
||||
| SuggestChangingConstraintsMessage::RestrictType { ty }
|
||||
if ty.starts_with("impl ") =>
|
||||
{
|
||||
format!("consider restricting opaque type `{ty}` with {post}")
|
||||
}
|
||||
SuggestChangingConstraintsMessage::RestrictType { ty } => {
|
||||
format!("consider restricting type parameter `{ty}` with {post}")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue