about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>2017-05-11 15:26:22 +0200
committerOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>2017-05-11 15:26:22 +0200
commit644ce5e535f74be304a77dfadb9ff46c743554c7 (patch)
treed00077c7ca7462f6162d2d008ba26a6c5721cae9 /src/libsyntax
parentf859f2585b0167dfd9ef22d88d992ba6fe55e158 (diff)
downloadrust-644ce5e535f74be304a77dfadb9ff46c743554c7.tar.gz
rust-644ce5e535f74be304a77dfadb9ff46c743554c7.zip
Address PR reviews
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/json.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libsyntax/json.rs b/src/libsyntax/json.rs
index 3d0b0b228a8..06335584c96 100644
--- a/src/libsyntax/json.rs
+++ b/src/libsyntax/json.rs
@@ -279,12 +279,12 @@ impl DiagnosticSpan {
 
     fn from_suggestion(suggestion: &CodeSuggestion, je: &JsonEmitter)
                        -> Vec<DiagnosticSpan> {
-        suggestion.substitutes
+        suggestion.substitution_parts
                       .iter()
-                      .flat_map(|&(span, ref suggestion)| {
-                          suggestion.iter().map(move |suggestion| {
+                      .flat_map(|substitution| {
+                          substitution.substitutions.iter().map(move |suggestion| {
                               let span_label = SpanLabel {
-                                  span,
+                                  span: substitution.span,
                                   is_primary: true,
                                   label: None,
                               };
@@ -301,7 +301,7 @@ impl DiagnosticSpan {
             RenderSpan::FullSpan(ref msp) =>
                 DiagnosticSpan::from_multispan(msp, je),
             // regular diagnostics don't produce this anymore
-            // will be removed in a later commit
+            // FIXME(oli_obk): remove it entirely
             RenderSpan::Suggestion(_) => unreachable!(),
         }
     }