Skip to content

Commit ccdb4f2

Browse files
committed
Type inference: Remove ParenExpr
1 parent 96852da commit ccdb4f2

3 files changed

Lines changed: 0 additions & 18 deletions

File tree

‎rust/ql/lib/codeql/rust/internal/typeinference/TypeInference.qll‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2322,11 +2322,6 @@ private module Input3 implements InputSig3 {
23222322

23232323
class AssignExpr extends AssignmentImpl, Rust::AssignmentExpr { }
23242324

2325-
// Required by the shared type-inference signature; parenthesized expressions are transparent.
2326-
abstract class ParenExpr extends Expr {
2327-
Expr getExpr() { none() }
2328-
}
2329-
23302325
final class Declaration = DeclarationImpl;
23312326

23322327
abstract private class DeclarationImpl extends AstNode {

‎shared/typeinference/codeql/typeinference/internal/TypeInference.qll‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2220,11 +2220,6 @@ module Make1<LocationSig Location, InputSig1<Location> Input1> {
22202220
/** A simple assignment expression, for example `x = y`. */
22212221
class AssignExpr extends Assignment;
22222222

2223-
/** A parenthesized expression. */
2224-
class ParenExpr extends Expr {
2225-
Expr getExpr();
2226-
}
2227-
22282223
/**
22292224
* A variable, or an entity that behaves like a variable with respect to
22302225
* type inference, for example a local variable, `const` item, or `static`
@@ -2774,8 +2769,6 @@ module Make1<LocationSig Location, InputSig1<Location> Input1> {
27742769
n1 = decl.getInitializer() and
27752770
n2 = decl.getPattern()
27762771
)
2777-
or
2778-
n1 = n2.(ParenExpr).getExpr()
27792772
)
27802773
}
27812774

‎unified/ql/lib/codeql/unified/internal/typeinference/TypeInference.qll‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,6 @@ module Input3 implements InputSig3 {
182182

183183
class AssignExpr extends Assignment, Unified::AssignExpr { }
184184

185-
class ParenExpr extends Expr {
186-
ParenExpr() { none() }
187-
188-
Expr getExpr() { none() }
189-
}
190-
191185
private newtype TDeclaration =
192186
TAstVariableDeclaration(Unified::VariableDeclaration decl) or
193187
TCallableDeclaration(Unified::Callable c) or

0 commit comments

Comments
 (0)