pub trait Located {
// Required method
fn location(&self) -> Location;
// Provided methods
fn span(&self) -> Span { ... }
fn file_id(&self) -> FileId { ... }
fn primary(&self, message: impl Into<String>) -> Label { ... }
fn secondary(&self, message: impl Into<String>) -> Label { ... }
}Expand description
Implements utilities for types who have a Location attached to them.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.