mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
Rust: extract isRef for SelfParam
This commit is contained in:
@@ -1546,12 +1546,18 @@ class _:
|
||||
|
||||
|
||||
@annotate(SelfParam, replace_bases={AstNode: ParamBase}, cfg = True)
|
||||
@rust.doc_test_signature(None)
|
||||
class _:
|
||||
"""
|
||||
A `self` parameter. For example `self` in:
|
||||
```rust
|
||||
fn push(&mut self, value: T) {
|
||||
// ...
|
||||
struct X;
|
||||
impl X {
|
||||
fn one(&self) {}
|
||||
fn two(&mut self) {}
|
||||
fn three(self) {}
|
||||
fn four(mut self) {}
|
||||
fn five<'a>(&'a self) {}
|
||||
}
|
||||
```
|
||||
"""
|
||||
|
||||
1
rust/schema/ast.py
generated
1
rust/schema/ast.py
generated
@@ -540,6 +540,7 @@ class ReturnTypeSyntax(AstNode):
|
||||
|
||||
class SelfParam(AstNode):
|
||||
attrs: list["Attr"] | child
|
||||
is_ref: predicate
|
||||
is_mut: predicate
|
||||
lifetime: optional["Lifetime"] | child
|
||||
name: optional["Name"] | child
|
||||
|
||||
Reference in New Issue
Block a user