diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-05-29 16:04:35 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-05-29 16:04:35 +0100 |
commit | 30658b25d2bb00ec495e0f3396de772141482081 (patch) | |
tree | 2846ebee3a16875674aed26b534f905a30cb598f /crates/ra_syntax/src/ast/generated | |
parent | 190a0595a478d059fdd95a179fe38d59cb6379be (diff) | |
parent | 367487fe88dca78cffad5138673d5259f7f7ba6b (diff) |
Merge #4648
4648: Support raw_ref_op's raw reference operator r=matklad a=robojumper
Fixes #4642.
This syntax (and its semantics) are implemented in rustc behind the `raw_ref_op` feature.
It is not entirely clear whether this is the syntax that will become stable, but [it seems like](https://github.com/rust-lang/rust/pull/72279) rust-analyzer must still support this unstable syntax to support future stable rust.
Also fixes a random inference failure involving a direct coercion from `&[T, _]` to `*const [T]`.
Co-authored-by: robojumper <[email protected]>
Diffstat (limited to 'crates/ra_syntax/src/ast/generated')
-rw-r--r-- | crates/ra_syntax/src/ast/generated/nodes.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs index cf6067e57..255402fbc 100644 --- a/crates/ra_syntax/src/ast/generated/nodes.rs +++ b/crates/ra_syntax/src/ast/generated/nodes.rs | |||
@@ -1235,6 +1235,8 @@ impl CastExpr { | |||
1235 | /// ``` | 1235 | /// ``` |
1236 | /// ❰ &foo ❱; | 1236 | /// ❰ &foo ❱; |
1237 | /// ❰ &mut bar ❱; | 1237 | /// ❰ &mut bar ❱; |
1238 | /// ❰ &raw const bar ❱; | ||
1239 | /// ❰ &raw mut bar ❱; | ||
1238 | /// ``` | 1240 | /// ``` |
1239 | /// | 1241 | /// |
1240 | /// [Reference](https://doc.rust-lang.org/reference/expressions/operator-expr.html#borrow-operators) | 1242 | /// [Reference](https://doc.rust-lang.org/reference/expressions/operator-expr.html#borrow-operators) |
@@ -1247,6 +1249,7 @@ impl RefExpr { | |||
1247 | pub fn amp_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![&]) } | 1249 | pub fn amp_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![&]) } |
1248 | pub fn raw_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![raw]) } | 1250 | pub fn raw_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![raw]) } |
1249 | pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) } | 1251 | pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) } |
1252 | pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) } | ||
1250 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | 1253 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } |
1251 | } | 1254 | } |
1252 | /// Prefix operator call. This is either `!` or `*` or `-`. | 1255 | /// Prefix operator call. This is either `!` or `*` or `-`. |