File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
rust/ql/lib/codeql/rust/internal/typeinference Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -33,16 +33,18 @@ private int idOfDynTraitTypeRepr(DynTraitTypeRepr node) {
3333}
3434
3535/** Holds if `dt` is the (arbitrarily chosen) canonical dyn trait type abstraction for `trait`. */
36- private predicate canonicalDynTraitTypeAbstraction ( DynTraitTypeRepr dt , Trait trait ) {
37- dt = min ( DynTraitTypeRepr d | d .getTrait ( ) = trait | d order by idOfDynTraitTypeRepr ( d ) )
36+ private predicate canonicalDynTraitTypeAbstraction ( DynTraitTypeRepr dt ) {
37+ exists ( Trait trait |
38+ dt = min ( DynTraitTypeRepr d | d .getTrait ( ) = trait | d order by idOfDynTraitTypeRepr ( d ) )
39+ )
3840}
3941
4042final class DynTypeAbstraction extends TypeAbstraction , DynTraitTypeRepr {
4143 DynTypeAbstraction ( ) {
4244 // We pick a "canonical" `dyn Trait` in order to avoid including multiple
4345 // entries in `conditionSatisfiesConstraint` with the exact same effect when
4446 // `dyn Trait` occurs multiple times for the same trait.
45- canonicalDynTraitTypeAbstraction ( this , this . getTrait ( ) )
47+ canonicalDynTraitTypeAbstraction ( this )
4648 }
4749
4850 override TypeParameter getATypeParameter ( ) {
You can’t perform that action at this time.
0 commit comments