Skip to content

Commit 4df7044

Browse files
committed
Rust: Remove CallExprBase
1 parent bc0ab15 commit 4df7044

File tree

1 file changed

+7
-16
lines changed

1 file changed

+7
-16
lines changed

rust/schema/annotations.py

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -228,41 +228,32 @@ class _:
228228
loop_body: drop
229229

230230

231-
class CallExprBase(Expr):
232-
"""
233-
A function or method call expression. See `CallExpr` and `MethodCallExpr` for further details.
234-
"""
235-
arg_list: optional["ArgList"] | child
236-
attrs: list["Attr"] | child
237-
args: list["Expr"] | synth
238-
239-
240-
@annotate(CallExpr, replace_bases={Expr: CallExprBase}, cfg=True)
231+
@annotate(CallExpr, cfg=True)
241232
class _:
242233
"""
243-
A function call expression. For example:
234+
A call expression. For example:
244235
```rust
245236
foo(42);
246237
foo::<u32, u64>(42);
247238
foo[0](42);
248239
foo(1) = 4;
240+
Option::Some(42);
249241
```
250242
"""
251-
arg_list: drop
252-
attrs: drop
253243

254244

255-
@annotate(MethodCallExpr, replace_bases={Expr: CallExprBase}, cfg=True)
245+
@annotate(MethodCallExpr, cfg=True)
256246
class _:
257247
"""
258248
A method call expression. For example:
259249
```rust
260250
x.foo(42);
261251
x.foo::<u32, u64>(42);
262252
```
253+
254+
Consider using `MethodCall` instead, as that also includes calls to methods using
255+
function call syntax (e.g., `Foo::method(x)`).
263256
"""
264-
arg_list: drop
265-
attrs: drop
266257

267258

268259
@annotate(MatchArm)

0 commit comments

Comments
 (0)