diff options
| author | clubby789 <jamie@hill-daniel.co.uk> | 2023-02-27 13:17:29 +0000 |
|---|---|---|
| committer | clubby789 <jamie@hill-daniel.co.uk> | 2023-03-12 13:19:46 +0000 |
| commit | 0932452fa40178b6f8b93a2bab3b4ead4e2bb560 (patch) | |
| tree | 640a6f9236a494096b535bffd7bbb30f1f62318e /compiler/rustc_parse/src/errors.rs | |
| parent | dd7df04e168324fc002ab4985b6c7513f08ccf49 (diff) | |
| download | rust-0932452fa40178b6f8b93a2bab3b4ead4e2bb560.tar.gz rust-0932452fa40178b6f8b93a2bab3b4ead4e2bb560.zip | |
Remove `box_syntax` from AST and use in tools
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
| -rw-r--r-- | compiler/rustc_parse/src/errors.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/compiler/rustc_parse/src/errors.rs b/compiler/rustc_parse/src/errors.rs index 63e5bc50513..af0c3026c66 100644 --- a/compiler/rustc_parse/src/errors.rs +++ b/compiler/rustc_parse/src/errors.rs @@ -2300,3 +2300,16 @@ impl HelpUseLatestEdition { } } } + +#[derive(Diagnostic)] +#[diag(parse_box_syntax_removed)] +pub struct BoxSyntaxRemoved<'a> { + #[primary_span] + #[suggestion( + code = "Box::new({code})", + applicability = "machine-applicable", + style = "verbose" + )] + pub span: Span, + pub code: &'a str, +} |
