pub struct Problem {
pub kind: ProblemKind,
pub span: Span,
}Expand description
One problem, at the source span it is about.
§Examples
use lower_lang::{Problem, ProblemKind, Span};
let p = Problem { kind: ProblemKind::UnknownOperator, span: Span::new(4, 5) };
assert_eq!(p.to_string(), "4..5: unknown operator");Fields§
§kind: ProblemKindWhat is wrong.
span: SpanWhere, in the syntax tree’s source.
Trait Implementations§
impl Copy for Problem
impl Eq for Problem
impl StructuralPartialEq for Problem
Auto Trait Implementations§
impl Freeze for Problem
impl RefUnwindSafe for Problem
impl Send for Problem
impl Sync for Problem
impl Unpin for Problem
impl UnsafeUnpin for Problem
impl UnwindSafe for Problem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more