-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Rust: Support blanket implementations #20133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
) | ||
} | ||
|
||
private predicate noFirst2() { not exists(this.resolveBound(0)) and exists(this.resolveBound(1)) } |
Check warning
Code scanning / CodeQL
Dead code Warning
} | ||
|
||
private predicate blanketImplementationWithoutBound(Impl impl) { | ||
not exists(impl.getAttributeMacroExpansion()) and | ||
exists(TypeParam gp | | ||
gp = impl.getGenericParamList().getAGenericParam() and |
Check warning
Code scanning / CodeQL
Selecting minimum element using `rank[1]` Warning
gp = impl.getGenericParamList().getAGenericParam() and | ||
gp = impl.(ImplItemNode).resolveSelfTy() and | ||
not exists(gp.(TypeParamItemNode).getABoundPath()) | ||
) |
Check warning
Code scanning / CodeQL
Dead code Warning
not blanketImplementationTraitBound(impl, _) and | ||
not blanketImplementationWithoutBound(impl) and | ||
resolved = resolvePath(tp.getBoundPath(0)) | ||
) |
Check warning
Code scanning / CodeQL
Dead code Warning
} | ||
|
||
predicate getBlanketImpl(MethodCall mc, Type t, Impl impl, Trait trait, Function f) { | ||
SatisfiesConstraint<MethodCall, SatisfiesConstraintInput>::satisfiesConstraintType(mc, |
Check warning
Code scanning / CodeQL
Dead code Warning
methodCallMatchesBlanketImpl(mc, t, impl, trait, f) | ||
} | ||
|
||
pragma[nomagic] |
Check warning
Code scanning / CodeQL
Predicates starting with "get" or "as" should return a value Warning
No description provided.