From 644ce5e535f74be304a77dfadb9ff46c743554c7 Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Thu, 11 May 2017 15:26:22 +0200 Subject: Address PR reviews --- src/libsyntax/json.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/libsyntax') 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 { - 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!(), } } -- cgit 1.4.1-3-g733a5