diff options
| author | Oliver Schneider <git-spam-no-reply9815368754983@oli-obk.de> | 2017-11-03 16:17:33 +0100 |
|---|---|---|
| committer | Oliver Schneider <git-spam-no-reply9815368754983@oli-obk.de> | 2017-11-03 16:30:04 +0100 |
| commit | 443332afaffbd0220452002567a2b61fd0e3fd9d (patch) | |
| tree | 469b7ba52733921fc97745acb6db16a77855711f /src/libsyntax | |
| parent | 525b81d570b15df2ed5896f0215baea5c64c650c (diff) | |
| download | rust-443332afaffbd0220452002567a2b61fd0e3fd9d.tar.gz rust-443332afaffbd0220452002567a2b61fd0e3fd9d.zip | |
Refactor internal suggestion API
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/json.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/json.rs b/src/libsyntax/json.rs index 31fe0c234e8..4f06238a7cf 100644 --- a/src/libsyntax/json.rs +++ b/src/libsyntax/json.rs @@ -278,17 +278,17 @@ impl 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) }) }) |
