• Home
  • Raw
  • Download

Lines Matching full:spans

106         let spans = Spans::from_formatter(self);  in fmt()  localVariable
112 let notated = spans.notate(); in fmt()
115 // If we have error spans that cover multiple lines, then we just in fmt()
117 if !spans.multi_line.is_empty() { in fmt()
119 for span in &spans.multi_line { in fmt()
133 let notated = Spans::from_formatter(self).notate(); in fmt()
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.
149 struct Spans<'p> { struct
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
169 impl<'p> Spans<'p> { argument
170 /// Build a sequence of spans from a formatter.
173 ) -> Spans<'p> { in from_formatter()
183 let mut spans = Spans { in from_formatter() localVariable
189 spans.add(fmter.span.clone()); in from_formatter()
191 spans.add(span.clone()); in from_formatter()
193 spans in from_formatter()
199 // now, we only ever add two spans at most. in add()
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]; in notate_line() localVariable
237 if spans.is_empty() { in notate_line()
245 for span in spans { in notate_line()