From 559de745626901cf1fba5aaa5a2b96fbc92e09ff Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Tue, 8 Oct 2024 19:07:43 -0700 Subject: [PATCH] compiler: Move impl of ToJson for abi::Endian --- compiler/rustc_target/src/abi/mod.rs | 8 -------- compiler/rustc_target/src/json.rs | 6 ++++++ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/compiler/rustc_target/src/abi/mod.rs b/compiler/rustc_target/src/abi/mod.rs index b744d5ad4ed..9f26c98df86 100644 --- a/compiler/rustc_target/src/abi/mod.rs +++ b/compiler/rustc_target/src/abi/mod.rs @@ -6,19 +6,11 @@ use Primitive::*; use rustc_data_structures::intern::Interned; use rustc_macros::HashStable_Generic; -use crate::json::{Json, ToJson}; - pub mod call; // Explicitly import `Float` to avoid ambiguity with `Primitive::Float`. pub use rustc_abi::{Float, *}; -impl ToJson for Endian { - fn to_json(&self) -> Json { - self.as_str().to_json() - } -} - rustc_index::newtype_index! { /// The *source-order* index of a field in a variant. /// diff --git a/compiler/rustc_target/src/json.rs b/compiler/rustc_target/src/json.rs index 2c367defe7b..b09d8d724ef 100644 --- a/compiler/rustc_target/src/json.rs +++ b/compiler/rustc_target/src/json.rs @@ -134,3 +134,9 @@ impl ToJson for TargetMetadata { }) } } + +impl ToJson for rustc_abi::Endian { + fn to_json(&self) -> Json { + self.as_str().to_json() + } +}