mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Add an ability to convert between Span
and visit::Location
This commit is contained in:
parent
569d7e3d15
commit
8bc120af82
@ -465,6 +465,12 @@ impl Location {
|
||||
}
|
||||
}
|
||||
|
||||
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