]> git.lizzy.rs Git - rust.git/blobdiff - src/libsyntax/json.rs
Address PR reviews
[rust.git] / src / libsyntax / json.rs
index 3d0b0b228a84d54f8099c6254b6dc1d06f4ce67c..06335584c96108571e0136a1ba84a052270820e9 100644 (file)
@@ -279,12 +279,12 @@ fn from_multispan(msp: &MultiSpan, je: &JsonEmitter) -> Vec<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 @@ fn from_render_span(rsp: &RenderSpan, je: &JsonEmitter) -> Vec<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!(),
         }
     }