Repository navigation
Handle missing closing brackets in turbofish #57819
Copy link
Copy link
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTA-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`
Description
Activity
- addedA-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTA-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`
on Jan 21, 2019 @estebank looks like you got your link syntax turned around
Reacted by Esteban KuberI've submitted #57852 for this. It takes the opposite approach to that suggested here, instead of suggesting that extra
>characters are added at the end (and making redundant pairs of angle brackets legal), it suggests that unmatched leading<characters are removed.I think if suggestions are applied with this approach that it ends up with a cleaner result (at the expense of implementation complexity). Happy to scrap that and take the approach suggested here instead if preferred.
- added 2 commits that reference this issue
on Jan 26, 2019 - added a commit that references this issue
on Jan 26, 2019
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTA-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`
Like #57817 handles too many closing brackets in type arguments when using turbofish, we should also handle too few closing brackets correctly with an appropriate suggestion (and proper item generation):