Rollup merge of #131652 - compiler-errors:modifiers, r=Nadrieril,jieyouxu
Move polarity into `PolyTraitRef` rather than storing it on the side Arguably we could move these modifiers into `TraitRef` instead of `PolyTraitRef`, but I see `TraitRef` as simply the *path* part of the trait ref. It doesn't really matter -- refactoring this further is much easier now.
This commit is contained in:
commit
4d53a28cac
48 changed files with 216 additions and 199 deletions
|
@ -192,7 +192,8 @@ fn suggest_changing_unsized_bound(
|
|||
.iter()
|
||||
.enumerate()
|
||||
.filter(|(_, bound)| {
|
||||
if let hir::GenericBound::Trait(poly, hir::TraitBoundModifier::Maybe) = bound
|
||||
if let hir::GenericBound::Trait(poly) = bound
|
||||
&& poly.modifiers == hir::TraitBoundModifier::Maybe
|
||||
&& poly.trait_ref.trait_def_id() == def_id
|
||||
{
|
||||
true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue