diff options
| author | Michael Howell <michael@notriddle.com> | 2022-03-22 15:29:07 -0700 |
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2022-03-22 15:29:07 -0700 |
| commit | 3729b17b7e960a95d0887dc0fff28b25a1393385 (patch) | |
| tree | d9876e1b34207c8c933928c7ed721682a0319dbf /src/test/ui/parser | |
| parent | 64137f0b15b752d0c734661dc713bcd140858320 (diff) | |
| download | rust-3729b17b7e960a95d0887dc0fff28b25a1393385.tar.gz rust-3729b17b7e960a95d0887dc0fff28b25a1393385.zip | |
diagnostics: do not suggest `fn foo({ <body> }`
Instead of suggesting that the body always replace the last character on the line, presuming it must be a semicolon, the parser should instead check what the last character is, and append the body if it is anything else. Fixes #83104
Diffstat (limited to 'src/test/ui/parser')
| -rw-r--r-- | src/test/ui/parser/issues/issue-87635.stderr | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/test/ui/parser/issues/issue-87635.stderr b/src/test/ui/parser/issues/issue-87635.stderr index 0a52d0687b2..1d459f1b907 100644 --- a/src/test/ui/parser/issues/issue-87635.stderr +++ b/src/test/ui/parser/issues/issue-87635.stderr @@ -13,9 +13,7 @@ error: associated function in `impl` without body --> $DIR/issue-87635.rs:4:5 | LL | pub fn bar() - | ^^^^^^^^^^^- - | | - | help: provide a definition for the function: `{ <body> }` + | ^^^^^^^^^^^^- help: provide a definition for the function: `{ <body> }` error: aborting due to 2 previous errors |
