From aea2a6f8361c95d60cc8e2757ca473f6915902a9 Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Tue, 31 Dec 2024 01:56:28 +0000 Subject: Convert some Into impls into From impls --- .../src/error_reporting/infer/need_type_info.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'compiler/rustc_trait_selection/src') diff --git a/compiler/rustc_trait_selection/src/error_reporting/infer/need_type_info.rs b/compiler/rustc_trait_selection/src/error_reporting/infer/need_type_info.rs index 2dcf3760d2f..68a53381230 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/infer/need_type_info.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/infer/need_type_info.rs @@ -45,12 +45,12 @@ pub enum TypeAnnotationNeeded { E0284, } -impl Into for TypeAnnotationNeeded { - fn into(self) -> ErrCode { - match self { - Self::E0282 => E0282, - Self::E0283 => E0283, - Self::E0284 => E0284, +impl From for ErrCode { + fn from(val: TypeAnnotationNeeded) -> Self { + match val { + TypeAnnotationNeeded::E0282 => E0282, + TypeAnnotationNeeded::E0283 => E0283, + TypeAnnotationNeeded::E0284 => E0284, } } } -- cgit 1.4.1-3-g733a5