mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 21:35:20 +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
|
@ -34,6 +34,7 @@
|
|||
//! derive:
|
||||
//! fmt: result
|
||||
//! bool_impl: option, fn
|
||||
//! add:
|
||||
|
||||
pub mod marker {
|
||||
// region:sized
|
||||
|
@ -302,6 +303,14 @@ pub mod ops {
|
|||
}
|
||||
pub use self::try_::{ControlFlow, FromResidual, Try};
|
||||
// endregion:try
|
||||
|
||||
// region:add
|
||||
#[lang = "add"]
|
||||
pub trait Add<Rhs = Self> {
|
||||
type Output;
|
||||
fn add(self, rhs: Rhs) -> Self::Output;
|
||||
}
|
||||
// endregion:add
|
||||
}
|
||||
|
||||
// region:eq
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue