diff options
| author | Hirochika Matsumoto <hirochika.k.matsumoto@gmail.com> | 2023-11-27 18:28:51 +0900 |
|---|---|---|
| committer | Hirochika Matsumoto <hirochika.k.matsumoto@gmail.com> | 2023-11-27 21:38:19 +0900 |
| commit | f4c2bdeec9d53c6a7221ebfdb2d995932dff9648 (patch) | |
| tree | 81bf624c30ae20d0decbd2d91805404b8e4c75f4 /compiler/rustc_parse/src/errors.rs | |
| parent | b29a1e00f850e548f3021ea523d0e143724fa9b7 (diff) | |
| download | rust-f4c2bdeec9d53c6a7221ebfdb2d995932dff9648.tar.gz rust-f4c2bdeec9d53c6a7221ebfdb2d995932dff9648.zip | |
Suggest swapping the order of `ref` and `box`
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
| -rw-r--r-- | compiler/rustc_parse/src/errors.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/rustc_parse/src/errors.rs b/compiler/rustc_parse/src/errors.rs index 7ce348619c6..0a919240ce5 100644 --- a/compiler/rustc_parse/src/errors.rs +++ b/compiler/rustc_parse/src/errors.rs @@ -138,6 +138,14 @@ pub(crate) enum InvalidVariableDeclarationSub { } #[derive(Diagnostic)] +#[diag(parse_switch_ref_box_order)] +pub(crate) struct SwitchRefBoxOrder { + #[primary_span] + #[suggestion(applicability = "machine-applicable", code = "box ref")] + pub span: Span, +} + +#[derive(Diagnostic)] #[diag(parse_invalid_comparison_operator)] pub(crate) struct InvalidComparisonOperator { #[primary_span] |
