Skip to content

Use levenshtein distance for CLI flags #159482

Description

@estebank

Code

//@ compile-flags: -Copt-leve=2
//~? ERROR unknown codegen option: `opt-leve`

fn main() {}

Current output

error: unknown codegen option: `opt-leve`

Desired output

error: unknown codegen option: `opt-leve`
 |
 = help: you might have meant to use `--opt-level=<N>`

Rationale and extra context

No response

Other cases

Rust Version

1.97

Anything else?

No response

Metadata

Metadata

Assignees

Labels

A-CLIArea: Command-line interface (CLI) to the compilerA-diagnosticsArea: Messages for errors, warnings, and lintsD-lack-of-suggestionDiagnostics: Adding a (structured) suggestion would increase the quality of the diagnostic.D-papercutDiagnostics: An error or lint that needs small tweaks.D-terseDiagnostics: An error or lint that doesn't give enough information about the problem at hand.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