about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorVitaly _Vi Shukela <vi0oss@gmail.com>2018-09-15 03:18:29 +0300
committerVitaly _Vi Shukela <vi0oss@gmail.com>2018-09-16 21:42:46 +0300
commitb6fea3255c0954456b068db8d1cdb6af464dd651 (patch)
tree91c30f2be1b21f795904575a622a658da25e5443 /src/libsyntax
parentd3cba9b4b4959d63eaaf5ffd647e4a5fc6d43e17 (diff)
downloadrust-b6fea3255c0954456b068db8d1cdb6af464dd651.tar.gz
rust-b6fea3255c0954456b068db8d1cdb6af464dd651.zip
Remove usages of span_suggestion without Applicability
Use Applicability::Unspecified for all of them instead.
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/config.rs7
-rw-r--r--src/libsyntax/ext/tt/macro_rules.rs4
-rw-r--r--src/libsyntax/parse/parser.rs6
3 files changed, 14 insertions, 3 deletions
diff --git a/src/libsyntax/config.rs b/src/libsyntax/config.rs
index 63b70b12248..c3917488b98 100644
--- a/src/libsyntax/config.rs
+++ b/src/libsyntax/config.rs
@@ -16,6 +16,7 @@ use source_map::Spanned;
 use edition::Edition;
 use parse::{token, ParseSess};
 use OneVector;
+use errors::Applicability;
 
 use ptr::P;
 
@@ -123,7 +124,11 @@ impl<'a> StripUnconfigured<'a> {
             let error = |span, msg, suggestion: &str| {
                 let mut err = self.sess.span_diagnostic.struct_span_err(span, msg);
                 if !suggestion.is_empty() {
-                    err.span_suggestion(span, "expected syntax is", suggestion.into());
+                    err.span_suggestion_with_applicability(span,
+                                                           "expected syntax is",
+                                                           suggestion.into(),
+                                                           Applicability::Unspecified,
+                                                           );
                 }
                 err.emit();
                 true
diff --git a/src/libsyntax/ext/tt/macro_rules.rs b/src/libsyntax/ext/tt/macro_rules.rs
index 86247745c41..75f46f2e02c 100644
--- a/src/libsyntax/ext/tt/macro_rules.rs
+++ b/src/libsyntax/ext/tt/macro_rules.rs
@@ -32,6 +32,7 @@ use std::borrow::Cow;
 use std::collections::hash_map::Entry;
 
 use rustc_data_structures::sync::Lrc;
+use errors::Applicability;
 
 pub struct ParserAnyMacro<'a> {
     parser: Parser<'a>,
@@ -187,10 +188,11 @@ fn generic_extension<'cx>(cx: &'cx mut ExtCtxt,
                     if comma_span == DUMMY_SP {
                         err.note("you might be missing a comma");
                     } else {
-                        err.span_suggestion_short(
+                        err.span_suggestion_short_with_applicability(
                             comma_span,
                             "missing comma here",
                             ", ".to_string(),
+                            Applicability::Unspecified,
                         );
                     }
                 }
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 48e034b117f..458a5c6473f 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -3882,7 +3882,11 @@ impl<'a> Parser<'a> {
                 if self.token == token::CloseDelim(token::Brace) {
                     // If the struct looks otherwise well formed, recover and continue.
                     if let Some(sp) = comma_sp {
-                        err.span_suggestion_short(sp, "remove this comma", String::new());
+                        err.span_suggestion_short_with_applicability(sp,
+                                                                     "remove this comma",
+                                                                     String::new(),
+                                                                     Applicability::Unspecified,
+                                                                     );
                     }
                     err.emit();
                     break;