Lines Matching defs:spans
106 let spans = Spans::from_formatter(self);
112 let notated = spans.notate();
115 // If we have error spans that cover multiple lines, then we just
117 if !spans.multi_line.is_empty() {
119 for span in &spans.multi_line {
141 /// This type represents an arbitrary number of error spans in a way that makes
145 /// Technically, we can only ever have two spans given our current error
147 /// two spans, it became obvious that an algorithm to handle an arbitrary
148 /// number of spans was actually much simpler.
158 /// All error spans that occur on a single line. This sequence always has
160 /// of the sequence represents a line number, starting at `0`. The spans
163 /// All error spans that occur over one or more lines. That is, the start
164 /// and end position of the span have different line numbers. The spans are
170 /// Build a sequence of spans from a formatter.
183 let mut spans = Spans {
189 spans.add(fmter.span.clone());
191 spans.add(span.clone());
193 spans
199 // now, we only ever add two spans at most.
211 /// location. This only applies to spans that occur within a single line.
232 /// spans for the given line, then `None` is returned. Otherwise, an
236 let spans = &self.by_line[i];
237 if spans.is_empty() {
245 for span in spans {