-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Rust: Handle Deref trait in type inference
#20987
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
| /** | ||
| * Index assignments like `a[i] = rhs` are treated as `*a.index_mut(i) = rhs`, | ||
| * so they should in principle be handled by `referenceAssignment`. | ||
| * | ||
| * However, this would require support for [generalized reverse flow][1], which | ||
| * is not yet implemented, so instead we simulate reverse flow where it would | ||
| * have applied via the model for `<_ as core::ops::index::IndexMut>::index_mut`. | ||
| * | ||
| * The same is the case for compound assignments like `a[i] += rhs`, which are | ||
| * treated as `(*a.index_mut(i)).add_assign(rhs)`. | ||
| * | ||
| * [1]: https://github.com/github/codeql/pull/18109 | ||
| */ |
Check warning
Code scanning / CodeQL
Predicate QLDoc style Warning
baba061 to
5dda9be
Compare
5dda9be to
eb1db27
Compare
eb1db27 to
e269016
Compare
| pragma[nomagic] | ||
| Type getACandidateReceiverTypeAtSubstituteLookupTraits( | ||
| string derefChain, boolean borrow, TypePath path | ||
| Type getANonPseudoCandidateReceiverTypeAt( |
Check warning
Code scanning / CodeQL
Missing QLDoc for parameter Warning
8266451 to
14037e4
Compare
| if apos.isReturn() then isReturn = true else isReturn = false | ||
| ) | ||
| } | ||
|
|
Check warning
Code scanning / CodeQL
Omittable 'exists' variable Warning
in this argument
| or | ||
| derefChainBorrow = ";" | ||
| ) and | ||
| path = path0 |
Check warning
Code scanning / CodeQL
Omittable 'exists' variable Warning
No description provided.