compiler: Move impl of ToJson for abi::Endian
This commit is contained in:
parent
1bc403daad
commit
559de74562
2 changed files with 6 additions and 8 deletions
|
@ -6,19 +6,11 @@ use Primitive::*;
|
||||||
use rustc_data_structures::intern::Interned;
|
use rustc_data_structures::intern::Interned;
|
||||||
use rustc_macros::HashStable_Generic;
|
use rustc_macros::HashStable_Generic;
|
||||||
|
|
||||||
use crate::json::{Json, ToJson};
|
|
||||||
|
|
||||||
pub mod call;
|
pub mod call;
|
||||||
|
|
||||||
// Explicitly import `Float` to avoid ambiguity with `Primitive::Float`.
|
// Explicitly import `Float` to avoid ambiguity with `Primitive::Float`.
|
||||||
pub use rustc_abi::{Float, *};
|
pub use rustc_abi::{Float, *};
|
||||||
|
|
||||||
impl ToJson for Endian {
|
|
||||||
fn to_json(&self) -> Json {
|
|
||||||
self.as_str().to_json()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
rustc_index::newtype_index! {
|
rustc_index::newtype_index! {
|
||||||
/// The *source-order* index of a field in a variant.
|
/// 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…
Add table
Add a link
Reference in a new issue