diff --git a/crates/ra_syntax/src/syntax_error.rs b/crates/ra_syntax/src/syntax_error.rs index 67deee1be6ee..d29c0cf6c700 100644 --- a/crates/ra_syntax/src/syntax_error.rs +++ b/crates/ra_syntax/src/syntax_error.rs @@ -19,15 +19,15 @@ pub enum Location { Range(TextRange), } -impl Into for TextUnit { - fn into(self) -> Location { - Location::Offset(self) +impl From for Location { + fn from(offset: TextUnit) -> Location { + Location::Offset(offset) } } -impl Into for TextRange { - fn into(self) -> Location { - Location::Range(self) +impl From for Location { + fn from(range: TextRange) -> Location { + Location::Range(range) } }