Rust: extract isRef for SelfParam

This commit is contained in:
Paolo Tranquilli
2024-12-16 14:12:13 +01:00
parent aaf0cd5dee
commit 4c4a8d7619
19 changed files with 111 additions and 32 deletions

View File

@@ -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) {}
}
```
"""