Add an ability to convert between Span
and visit::Location
This commit is contained in:
parent
569d7e3d15
commit
8bc120af82
@ -465,6 +465,12 @@ pub fn span(&self) -> Span {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Span> for Location {
|
||||
fn from(span: Span) -> Self {
|
||||
Location(span)
|
||||
}
|
||||
}
|
||||
|
||||
/// Reference to a place used to represent a partial projection.
|
||||
pub struct PlaceRef<'a> {
|
||||
pub local: Local,
|
||||
|
Loading…
Reference in New Issue
Block a user