Skip to content

Commit cc620d8

Browse files
authored
Rollup merge of rust-lang#34965 - jonathandturner:multispan_cleanup, r=sanxiyn
Remove unused methods from MultiSpan Removed a couple of unused methods from MultiSpan. I thought about batching this with some other changes but wasn't sure when I'd get around to them, so PR for a tiny fix instead. This can be rollup'd.
2 parents 2c50f4e + f7019a4 commit cc620d8

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

src/libsyntax_pos/lib.rs

+4-15
Original file line numberDiff line numberDiff line change
@@ -193,20 +193,6 @@ impl MultiSpan {
193193
}
194194
}
195195

196-
pub fn from_span(primary_span: Span) -> MultiSpan {
197-
MultiSpan {
198-
primary_spans: vec![primary_span],
199-
span_labels: vec![]
200-
}
201-
}
202-
203-
pub fn from_spans(vec: Vec<Span>) -> MultiSpan {
204-
MultiSpan {
205-
primary_spans: vec,
206-
span_labels: vec![]
207-
}
208-
}
209-
210196
pub fn push_span_label(&mut self, span: Span, label: String) {
211197
self.span_labels.push((span, label));
212198
}
@@ -254,7 +240,10 @@ impl MultiSpan {
254240

255241
impl From<Span> for MultiSpan {
256242
fn from(span: Span) -> MultiSpan {
257-
MultiSpan::from_span(span)
243+
MultiSpan {
244+
primary_spans: vec![span],
245+
span_labels: vec![]
246+
}
258247
}
259248
}
260249

0 commit comments

Comments
 (0)