Skip to content

"help: } may belong here" no longer reported #108608

Open

Description

After #108297, the help message for inserting closing delims is no longer emitted. (cc @chenyukang)

Code

I tried this code:

use std::{mem, ptr;

old output:

error: this file contains an unclosed delimiter
 --> src/main.rs:1:20
  |
1 | use std::{mem, ptr;
  |          -         ^
  |          |
  |          unclosed delimiter

error: expected one of `,`, `::`, `as`, or `}`, found `;`
 --> src/main.rs:1:10
  |
1 | use std::{mem, ptr;
  |          ^        ^
  |          |        |
  |          |        expected one of `,`, `::`, `as`, or `}`
  |          |        help: `}` may belong here
  |          unclosed delimiter

error: expected item, found `}`
 --> src/main.rs:1:20
  |
1 | use std::{mem, ptr;
  |                    ^ expected item

new output

error: this file contains an unclosed delimiter
 --> src/main.rs:1:20
  |
1 | use std::{mem, ptr;
  |          -         ^
  |          |
  |          unclosed delimiter

While noisy, the old output contains a concrete fix (} may belong here) and the new one doesn't.

Version it worked on

It most recently worked on: rustc 1.69.0-nightly (31f858d 2023-02-28)

Version with regression

master at 64165aa, which will be in nightly 2023-03-01

@rustbot modify labels: +regression-from-stable-to-nightly -regression-untriaged +A-parser +A-diagnostics

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsA-parserArea: The parsing of Rust source code to an ASTC-bugCategory: This is a bug.P-lowLow priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions