BinOpKind
This commit is contained in:
parent
1bd17e4fa2
commit
5d4102ee78
36 changed files with 260 additions and 248 deletions
|
|
@ -25,7 +25,7 @@ impl Mul for Foo {
|
|||
type Output = Foo;
|
||||
|
||||
fn mul(self, other: Foo) -> Foo {
|
||||
Foo(self.0 * other.0 % 42) // OK: BiRem part of BiExpr as parent node
|
||||
Foo(self.0 * other.0 % 42) // OK: BinOpKind::Rem part of BiExpr as parent node
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -33,7 +33,7 @@ impl Sub for Foo {
|
|||
type Output = Foo;
|
||||
|
||||
fn sub(self, other: Self) -> Self {
|
||||
Foo(self.0 * other.0 - 42) // OK: BiMul part of BiExpr as child node
|
||||
Foo(self.0 * other.0 - 42) // OK: BinOpKind::Mul part of BiExpr as child node
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ impl Div for Foo {
|
|||
type Output = Foo;
|
||||
|
||||
fn div(self, other: Self) -> Self {
|
||||
Foo(do_nothing(self.0 + other.0) / 42) // OK: BiAdd part of BiExpr as child node
|
||||
Foo(do_nothing(self.0 + other.0) / 42) // OK: BinOpKind::Add part of BiExpr as child node
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
if_chain! {
|
||||
if let ExprKind::Binary(ref op, ref left, ref right) = expr.node;
|
||||
if BinOp_::BiEq == op.node;
|
||||
if BinOpKind::Eq == op.node;
|
||||
if let ExprKind::Binary(ref op1, ref left1, ref right1) = left.node;
|
||||
if BinOp_::BiBitAnd == op1.node;
|
||||
if BinOpKind::BitAnd == op1.node;
|
||||
if let ExprKind::Path(ref path) = left1.node;
|
||||
if match_qpath(path, &["x"]);
|
||||
if let ExprKind::Lit(ref lit) = right1.node;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue