rust/tests
Matthias Krüger bf49dfc943
Rollup merge of #139392 - compiler-errors:raw-expr, r=oli-obk
Detect and provide suggestion for `&raw EXPR`

When emitting an error in the parser, and we detect that the previous token was `raw` and we *could* have consumed `const`/`mut`, suggest that this may have been a mistyped raw ref expr. To do this, we add `const`/`mut` to the expected token set when parsing `&raw` as an expression (which does not affect the "good path" of parsing, for the record).

This is kind of a rudimentary error improvement, since it doesn't actually attempt to recover anything, leading to some other knock-on errors b/c we still treat `&raw` as the expression that was parsed... but at least we add the suggestion! I don't think the parser grammar means we can faithfully recover `&raw EXPR` early, i.e. during `parse_expr_borrow`.

Fixes #133231
2025-04-14 18:15:31 +02:00
..
assembly Auto merge of #139578 - ferrocene:pa-compiletest-edition, r=jieyouxu 2025-04-11 10:53:45 +00:00
auxiliary tests: use minicore more 2025-02-24 09:26:54 +00:00
codegen Rollup merge of #139718 - folkertdev:unsafe-attributes-earlier-editions, r=fmease 2025-04-13 23:57:40 -04:00
codegen-units Remove -Zinline-in-all-cgus and clean up CGU partitioning tests 2025-01-27 23:48:47 -05:00
coverage Update the minimum external LLVM to 19 2025-04-05 11:44:38 -07:00
coverage-run-rustdoc Update coverage-run-rustdoc output 2025-03-28 10:35:53 +01:00
crashes Use delayed bug for normalization errors in drop elaboration 2025-04-11 16:31:28 +00:00
debuginfo replace //@ compile-flags: --edition with //@ edition 2025-04-10 09:56:37 +02:00
incremental UI tests: migrate remaining compile time error-patterns to line annotations 2025-04-13 21:48:53 +03:00
mir-opt JumpThreading: Re-enable and fix Not ops on non-booleans 2025-04-13 20:29:49 +00:00
pretty Avoid empty identifiers for delegate params and args. 2025-04-10 14:46:53 +10:00
run-make tests: produce target artifacts and/or require crate type / ignore cross-compile 2025-04-12 15:09:06 +08:00
rustdoc replace //@ compile-flags: --edition with //@ edition 2025-04-10 09:56:37 +02:00
rustdoc-gui Add regression test for #139282 2025-04-07 17:28:46 +02:00
rustdoc-js rustdoc-search: add unbox flag to Result aliases 2025-04-11 11:36:40 -07:00
rustdoc-js-std rustdoc-search: add unbox flag to Result aliases 2025-04-11 11:36:40 -07:00
rustdoc-json rustdoc-json: Add test for #[automatically_derived] attribute 2025-03-31 20:42:49 +00:00
rustdoc-ui UI tests: migrate remaining compile time error-patterns to line annotations 2025-04-13 21:48:53 +03:00
ui Rollup merge of #139392 - compiler-errors:raw-expr, r=oli-obk 2025-04-14 18:15:31 +02:00
ui-fulldeps Rollup merge of #139760 - petrochenkov:noerrpat2, r=jieyouxu 2025-04-13 23:57:41 -04:00
COMPILER_TESTS.md