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:
Florian Diebold 2021-08-22 17:21:47 +02:00
parent c8fd4fd410
commit 424dda8113
11 changed files with 317 additions and 261 deletions

View file

@ -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