diff options
Diffstat (limited to 'compiler/rustc_ast/src')
| -rw-r--r-- | compiler/rustc_ast/src/ast.rs | 12 | ||||
| -rw-r--r-- | compiler/rustc_ast/src/ptr.rs | 6 |
2 files changed, 9 insertions, 9 deletions
diff --git a/compiler/rustc_ast/src/ast.rs b/compiler/rustc_ast/src/ast.rs index 31e6750a678..3a81b93d157 100644 --- a/compiler/rustc_ast/src/ast.rs +++ b/compiler/rustc_ast/src/ast.rs @@ -241,15 +241,15 @@ impl AngleBracketedArg { } } -impl Into<P<GenericArgs>> for AngleBracketedArgs { - fn into(self) -> P<GenericArgs> { - P(GenericArgs::AngleBracketed(self)) +impl From<AngleBracketedArgs> for P<GenericArgs> { + fn from(val: AngleBracketedArgs) -> Self { + P(GenericArgs::AngleBracketed(val)) } } -impl Into<P<GenericArgs>> for ParenthesizedArgs { - fn into(self) -> P<GenericArgs> { - P(GenericArgs::Parenthesized(self)) +impl From<ParenthesizedArgs> for P<GenericArgs> { + fn from(val: ParenthesizedArgs) -> Self { + P(GenericArgs::Parenthesized(val)) } } diff --git a/compiler/rustc_ast/src/ptr.rs b/compiler/rustc_ast/src/ptr.rs index 97c714df8fd..dd923305cdf 100644 --- a/compiler/rustc_ast/src/ptr.rs +++ b/compiler/rustc_ast/src/ptr.rs @@ -158,9 +158,9 @@ impl<T> From<Vec<T>> for P<[T]> { } } -impl<T> Into<Vec<T>> for P<[T]> { - fn into(self) -> Vec<T> { - self.into_vec() +impl<T> From<P<[T]>> for Vec<T> { + fn from(val: P<[T]>) -> Self { + val.into_vec() } } |
