-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-dev-toolsRelevant to the dev-tools subteam, which will review and decide on the PR/issue.Relevant to the dev-tools subteam, which will review and decide on the PR/issue.
Description
Consider the following program:
fn main() {
panec!()
}
Relevant part of the rustc .\src\main.rs --error-format=json
output:
"spans": [
{
"file_name": ".\\src\\main.rs",
"byte_start": 16,
"byte_end": 21,
"line_start": 2,
"line_end": 2,
"column_start": 5,
"column_end": 10,
"is_primary": true,
"text": [
{
"text": " panec!()",
"highlight_start": 5,
"highlight_end": 10
}
],
"label": null,
"suggested_replacement": "panic!",
"expansion": null
}
],
So it suggests to replace fragment "panec" with "panic!", which results in extra exclamation point.
> rustc --version --verbose
rustc 1.25.0-nightly (61452e506 2018-01-09)
binary: rustc
commit-hash: 61452e506f0c88861cccaeea4ced3419bdb3cbe0
commit-date: 2018-01-09
host: x86_64-pc-windows-msvc
release: 1.25.0-nightly
LLVM version: 4.0
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-dev-toolsRelevant to the dev-tools subteam, which will review and decide on the PR/issue.Relevant to the dev-tools subteam, which will review and decide on the PR/issue.