diff options
| author | bors <bors@rust-lang.org> | 2023-06-27 17:54:24 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-06-27 17:54:24 +0000 |
| commit | 5ea66686467d3ec5f8c81570e7f0f16ad8dd8cc3 (patch) | |
| tree | d274cb5b7df7d9f2ac3427400a74daa26ffe9c5a /tests | |
| parent | 3c554f5cb4965a08f2a2b45ab4bba321a5f249fa (diff) | |
| parent | adc3ae24d6a53466a594bf181c6fc135bd24d1c8 (diff) | |
| download | rust-5ea66686467d3ec5f8c81570e7f0f16ad8dd8cc3.tar.gz rust-5ea66686467d3ec5f8c81570e7f0f16ad8dd8cc3.zip | |
Auto merge of #113102 - matthiaskrgr:rollup-wpkbsw1, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #112518 (Detect actual span for getting unexpected token from parsing macros) - #112978 (Add suggestion for bad block fragment error) - #113068 (bootstrap: rename 'user' profile to 'dist') - #113079 (Use `CoverageKind::as_operand_id` instead of manually reimplementing it) - #113089 (Export AnalysisResults trait in rustc_mir_dataflow) - #113093 (`thir`: Add `Become` expression kind) - #113096 (Remove unused struct and tweak format macro uses) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/parser/bad-interpolated-block.stderr | 12 | ||||
| -rw-r--r-- | tests/ui/parser/issues/issue-112458.rs | 4 | ||||
| -rw-r--r-- | tests/ui/parser/issues/issue-112458.stderr | 15 | ||||
| -rw-r--r-- | tests/ui/parser/labeled-no-colon-expr.stderr | 4 |
4 files changed, 35 insertions, 0 deletions
diff --git a/tests/ui/parser/bad-interpolated-block.stderr b/tests/ui/parser/bad-interpolated-block.stderr index 2a0999afdfa..651036c51c9 100644 --- a/tests/ui/parser/bad-interpolated-block.stderr +++ b/tests/ui/parser/bad-interpolated-block.stderr @@ -10,6 +10,10 @@ LL | m!({}); | ------ in this macro invocation | = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info) +help: wrap this in another block + | +LL | 'lab: { $b }; + | + + error: cannot use a `block` macro fragment here --> $DIR/bad-interpolated-block.rs:6:16 @@ -23,6 +27,10 @@ LL | m!({}); | ------ in this macro invocation | = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info) +help: wrap this in another block + | +LL | unsafe { $b }; + | + + error: cannot use a `block` macro fragment here --> $DIR/bad-interpolated-block.rs:7:23 @@ -34,6 +42,10 @@ LL | m!({}); | ------ in this macro invocation | = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info) +help: wrap this in another block + | +LL | |x: u8| -> () { $b }; + | + + error: aborting due to 3 previous errors diff --git a/tests/ui/parser/issues/issue-112458.rs b/tests/ui/parser/issues/issue-112458.rs new file mode 100644 index 00000000000..36895450cd9 --- /dev/null +++ b/tests/ui/parser/issues/issue-112458.rs @@ -0,0 +1,4 @@ +fn main() { + println!("{}", x.); //~ ERROR unexpected token: `)` + //~^ ERROR cannot find value `x` in this scope +} diff --git a/tests/ui/parser/issues/issue-112458.stderr b/tests/ui/parser/issues/issue-112458.stderr new file mode 100644 index 00000000000..54a8f1d03b0 --- /dev/null +++ b/tests/ui/parser/issues/issue-112458.stderr @@ -0,0 +1,15 @@ +error: unexpected token: `)` + --> $DIR/issue-112458.rs:2:22 + | +LL | println!("{}", x.); + | ^ + +error[E0425]: cannot find value `x` in this scope + --> $DIR/issue-112458.rs:2:20 + | +LL | println!("{}", x.); + | ^ not found in this scope + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/parser/labeled-no-colon-expr.stderr b/tests/ui/parser/labeled-no-colon-expr.stderr index 62288fe152d..4d61d9c1403 100644 --- a/tests/ui/parser/labeled-no-colon-expr.stderr +++ b/tests/ui/parser/labeled-no-colon-expr.stderr @@ -77,6 +77,10 @@ LL | m!({}); | ------ in this macro invocation | = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info) +help: wrap this in another block + | +LL | 'l5 { $b }; + | + + error: labeled expression must be followed by `:` --> $DIR/labeled-no-colon-expr.rs:14:8 |
