Skip to content

Commit 40b52be

Browse files
compiler: Move impl of ToJson for abi::Endian
1 parent fc0f045 commit 40b52be

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

compiler/rustc_target/src/abi/mod.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,11 @@ use Primitive::*;
66
use rustc_data_structures::intern::Interned;
77
use rustc_macros::HashStable_Generic;
88

9-
use crate::json::{Json, ToJson};
10-
119
pub mod call;
1210

1311
// Explicitly import `Float` to avoid ambiguity with `Primitive::Float`.
1412
pub use rustc_abi::{Float, *};
1513

16-
impl ToJson for Endian {
17-
fn to_json(&self) -> Json {
18-
self.as_str().to_json()
19-
}
20-
}
21-
2214
rustc_index::newtype_index! {
2315
/// The *source-order* index of a field in a variant.
2416
///

compiler/rustc_target/src/json.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,3 +134,9 @@ impl ToJson for TargetMetadata {
134134
})
135135
}
136136
}
137+
138+
impl ToJson for rustc_abi::Endian {
139+
fn to_json(&self) -> Json {
140+
self.as_str().to_json()
141+
}
142+
}

0 commit comments

Comments
 (0)