diff options
| author | Andy Russell <arussell123@gmail.com> | 2019-01-17 10:18:56 -0500 |
|---|---|---|
| committer | Andy Russell <arussell123@gmail.com> | 2019-01-17 10:18:56 -0500 |
| commit | 02843d9eb71ad50d490afc6276f4bfe59f182624 (patch) | |
| tree | 6e05d1bd196d1e108931bd604e24ca676ca0e040 /src/libsyntax/parse/parser.rs | |
| parent | 920192490f3eea0cf3b2e58e28912eb68423fdde (diff) | |
| download | rust-02843d9eb71ad50d490afc6276f4bfe59f182624.tar.gz rust-02843d9eb71ad50d490afc6276f4bfe59f182624.zip | |
properly deprecate suggestion methods
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 823c786bded..4f1bc2fc241 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -4063,12 +4063,13 @@ impl<'a> Parser<'a> { if let Some(mut err) = delayed_err { if let Some(etc_span) = etc_span { - err.multipart_suggestion( + err.multipart_suggestion_with_applicability( "move the `..` to the end of the field list", vec![ (etc_span, String::new()), (self.span, format!("{}.. }}", if ate_comma { "" } else { ", " })), ], + Applicability::MachineApplicable, ); } err.emit(); @@ -6913,7 +6914,11 @@ impl<'a> Parser<'a> { let mut err = self.struct_span_err(fixed_name_sp, error_msg); err.span_label(fixed_name_sp, "dash-separated idents are not valid"); - err.multipart_suggestion(suggestion_msg, replacement); + err.multipart_suggestion_with_applicability( + suggestion_msg, + replacement, + Applicability::MachineApplicable, + ); err.emit(); } Ok(ident) |
