mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
Refactor & improve handling of overloaded binary operators
Fixes #9971. Also records them as method resolutions, which we could use later.
This commit is contained in:
parent
c8fd4fd410
commit
424dda8113
11 changed files with 317 additions and 261 deletions
|
@ -285,6 +285,33 @@ pub mod known {
|
|||
wrapping_add,
|
||||
wrapping_mul,
|
||||
wrapping_sub,
|
||||
// known methods of lang items
|
||||
add,
|
||||
mul,
|
||||
sub,
|
||||
div,
|
||||
rem,
|
||||
shl,
|
||||
shr,
|
||||
bitxor,
|
||||
bitor,
|
||||
bitand,
|
||||
add_assign,
|
||||
mul_assign,
|
||||
sub_assign,
|
||||
div_assign,
|
||||
rem_assign,
|
||||
shl_assign,
|
||||
shr_assign,
|
||||
bitxor_assign,
|
||||
bitor_assign,
|
||||
bitand_assign,
|
||||
eq,
|
||||
ne,
|
||||
ge,
|
||||
gt,
|
||||
le,
|
||||
lt,
|
||||
);
|
||||
|
||||
// self/Self cannot be used as an identifier
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue