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 /xtask/src | |
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 'xtask/src')
-rw-r--r-- | xtask/src/ast_src.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xtask/src/ast_src.rs b/xtask/src/ast_src.rs index 394a7bc88..d4621930e 100644 --- a/xtask/src/ast_src.rs +++ b/xtask/src/ast_src.rs | |||
@@ -1153,10 +1153,12 @@ pub(crate) const AST_SRC: AstSrc = AstSrc { | |||
1153 | /// ``` | 1153 | /// ``` |
1154 | /// ❰ &foo ❱; | 1154 | /// ❰ &foo ❱; |
1155 | /// ❰ &mut bar ❱; | 1155 | /// ❰ &mut bar ❱; |
1156 | /// ❰ &raw const bar ❱; | ||
1157 | /// ❰ &raw mut bar ❱; | ||
1156 | /// ``` | 1158 | /// ``` |
1157 | /// | 1159 | /// |
1158 | /// [Reference](https://doc.rust-lang.org/reference/expressions/operator-expr.html#borrow-operators) | 1160 | /// [Reference](https://doc.rust-lang.org/reference/expressions/operator-expr.html#borrow-operators) |
1159 | struct RefExpr: AttrsOwner { T![&], T![raw], T![mut], Expr } | 1161 | struct RefExpr: AttrsOwner { T![&], T![raw], T![mut], T![const], Expr } |
1160 | 1162 | ||
1161 | /// Prefix operator call. This is either `!` or `*` or `-`. | 1163 | /// Prefix operator call. This is either `!` or `*` or `-`. |
1162 | /// | 1164 | /// |