about summary refs log tree commit diff
path: root/compiler/rustc_errors/src
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-12-31 01:56:28 +0000
committerMichael Goulet <michael@errs.io>2024-12-31 01:56:33 +0000
commitaea2a6f8361c95d60cc8e2757ca473f6915902a9 (patch)
tree975e84cd34a60716d98febe5d63035a25ccce512 /compiler/rustc_errors/src
parent7f75bfa1ad4e9a9d33a179a90603001515e91991 (diff)
Convert some Into impls into From impls
Diffstat (limited to 'compiler/rustc_errors/src')
-rw-r--r--compiler/rustc_errors/src/diagnostic.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_errors/src/diagnostic.rs b/compiler/rustc_errors/src/diagnostic.rs
index 05b9cbfbc06..afce877547f 100644
--- a/compiler/rustc_errors/src/diagnostic.rs
+++ b/compiler/rustc_errors/src/diagnostic.rs
@@ -156,9 +156,9 @@ impl IntoDiagArg for DiagArgValue {
     }
 }
 
-impl Into<FluentValue<'static>> for DiagArgValue {
-    fn into(self) -> FluentValue<'static> {
-        match self {
+impl From<DiagArgValue> for FluentValue<'static> {
+    fn from(val: DiagArgValue) -> Self {
+        match val {
             DiagArgValue::Str(s) => From::from(s),
             DiagArgValue::Number(n) => From::from(n),
             DiagArgValue::StrListSepByAnd(l) => fluent_value_from_str_list_sep_by_and(l),