]> git.lizzy.rs Git - rust.git/blobdiff - src/libsyntax/json.rs
Auto merge of #45741 - oli-obk:refactor_suggestions, r=estebank
[rust.git] / src / libsyntax / json.rs
index 74a762f2f622cdf702840e9377fc3d46a39fb312..6564046ffe68f69d3720e683e8e0d863cb4267b7 100644 (file)
@@ -284,17 +284,17 @@ fn from_multispan(msp: &MultiSpan, je: &JsonEmitter) -> Vec<DiagnosticSpan> {
 
     fn from_suggestion(suggestion: &CodeSuggestion, je: &JsonEmitter)
                        -> Vec<DiagnosticSpan> {
-        suggestion.substitution_parts
+        suggestion.substitutions
                       .iter()
                       .flat_map(|substitution| {
-                          substitution.substitutions.iter().map(move |suggestion| {
+                          substitution.parts.iter().map(move |suggestion| {
                               let span_label = SpanLabel {
-                                  span: substitution.span,
+                                  span: suggestion.span,
                                   is_primary: true,
                                   label: None,
                               };
                               DiagnosticSpan::from_span_label(span_label,
-                                                              Some(suggestion),
+                                                              Some(&suggestion.snippet),
                                                               je)
                           })
                       })