mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Support raw_ref_op's raw reference operator
This commit is contained in:
parent
190a0595a4
commit
367487fe88
12 changed files with 259 additions and 72 deletions
|
@ -1235,6 +1235,8 @@ impl CastExpr {
|
|||
/// ```
|
||||
/// ❰ &foo ❱;
|
||||
/// ❰ &mut bar ❱;
|
||||
/// ❰ &raw const bar ❱;
|
||||
/// ❰ &raw mut bar ❱;
|
||||
/// ```
|
||||
///
|
||||
/// [Reference](https://doc.rust-lang.org/reference/expressions/operator-expr.html#borrow-operators)
|
||||
|
@ -1247,6 +1249,7 @@ impl RefExpr {
|
|||
pub fn amp_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![&]) }
|
||||
pub fn raw_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![raw]) }
|
||||
pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
|
||||
pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
|
||||
pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
|
||||
}
|
||||
/// Prefix operator call. This is either `!` or `*` or `-`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue