diff options
| author | bors <bors@rust-lang.org> | 2015-03-25 01:42:42 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-03-25 01:42:42 +0000 |
| commit | 593db005d4dbce2ff72009c1ba03477b031b2c0f (patch) | |
| tree | b585f5625dde7ab0af35fb3dd41a67ba0507f525 /src/libserialize/json.rs | |
| parent | 123a754cb8356d0e78837dd4e58103ad801309ff (diff) | |
| parent | 3021d4c56422e15331e38f4b7b04c7229e024fda (diff) | |
Auto merge of #23681 - alexcrichton:rollup, r=alexcrichton
Diffstat (limited to 'src/libserialize/json.rs')
| -rw-r--r-- | src/libserialize/json.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/libserialize/json.rs b/src/libserialize/json.rs index abbfc82319f..0d6ed91d529 100644 --- a/src/libserialize/json.rs +++ b/src/libserialize/json.rs @@ -2429,7 +2429,10 @@ pub trait ToJson { macro_rules! to_json_impl_i64 { ($($t:ty), +) => ( $(impl ToJson for $t { - fn to_json(&self) -> Json { Json::I64(*self as i64) } + fn to_json(&self) -> Json { + #![allow(trivial_numeric_casts)] + Json::I64(*self as i64) + } })+ ) } @@ -2439,7 +2442,10 @@ to_json_impl_i64! { int, i8, i16, i32, i64 } macro_rules! to_json_impl_u64 { ($($t:ty), +) => ( $(impl ToJson for $t { - fn to_json(&self) -> Json { Json::U64(*self as u64) } + fn to_json(&self) -> Json { + #![allow(trivial_numeric_casts)] + Json::U64(*self as u64) + } })+ ) } |
