mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
compiler: Move impl of ToJson for abi::Endian
This commit is contained in:
parent
1bc403daad
commit
559de74562
@ -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.
|
||||
///
|
||||
|
@ -134,3 +134,9 @@ impl ToJson for TargetMetadata {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl ToJson for rustc_abi::Endian {
|
||||
fn to_json(&self) -> Json {
|
||||
self.as_str().to_json()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user