Skip to content

Commit

Permalink
Revert "Remove unused methods from MultiSpan"
Browse files Browse the repository at this point in the history
This reverts commit f7019a4.

This removed the only way to make a suggestion with more than one
substitute. Bring it back until we come up with a better solution.
  • Loading branch information
mcarton committed Jul 28, 2016
1 parent cec262e commit 6dc98cf
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions src/libsyntax_pos/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,20 @@ impl MultiSpan {
}
}

pub fn from_span(primary_span: Span) -> MultiSpan {
MultiSpan {
primary_spans: vec![primary_span],
span_labels: vec![]
}
}

pub fn from_spans(vec: Vec<Span>) -> MultiSpan {
MultiSpan {
primary_spans: vec,
span_labels: vec![]
}
}

pub fn push_span_label(&mut self, span: Span, label: String) {
self.span_labels.push((span, label));
}
Expand Down Expand Up @@ -240,10 +254,7 @@ impl MultiSpan {

impl From<Span> for MultiSpan {
fn from(span: Span) -> MultiSpan {
MultiSpan {
primary_spans: vec![span],
span_labels: vec![]
}
MultiSpan::from_span(span)
}
}

Expand Down

0 comments on commit 6dc98cf

Please sign in to comment.