diff --git a/compiler/stable_mir/src/mir/visit.rs b/compiler/stable_mir/src/mir/visit.rs index 50d7bae21db7..f391a0f444a3 100644 --- a/compiler/stable_mir/src/mir/visit.rs +++ b/compiler/stable_mir/src/mir/visit.rs @@ -465,6 +465,12 @@ impl Location { } } +impl From 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,