Lines Matching refs:span
108 // handling, so pin the span we're given to its original thread and assume
110 span: ThreadBound<SpanRange>,
129 /// automatically uses the correct span from the current position of the
132 /// Use `Error::new` when the error needs to be triggered on some span other
151 /// return Err(Error::new(name_token.span(), "expected `name`"));
158 pub fn new<T: Display>(span: Span, message: T) -> Self {
159 return new(span, message.to_string());
161 fn new(span: Span, message: String) -> Error {
164 span: ThreadBound::new(SpanRange {
165 start: span,
166 end: span,
179 /// to attempt to span all tokens inside of `tokens`. While you would
194 let start = iter.next().map_or_else(Span::call_site, |t| t.span());
195 let end = iter.last().map_or(start, |t| t.span());
198 span: ThreadBound::new(SpanRange { start, end }),
210 pub fn span(&self) -> Span {
211 let SpanRange { start, end } = match self.messages[0].span.get() {
212 Some(span) => *span,
277 let (start, end) = match self.span.get() {
331 let span = crate::buffer::open_span_of_group(cursor);
332 Error::new(span, message)
343 span: ThreadBound::new(SpanRange { start, end }),
389 span: self.span,
407 Error::new(err.span(), err)