Skip to content

Commit d76e861

Browse files
committed
serialize: rename to rustc_serialize.
1 parent af7554d commit d76e861

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+180
-188
lines changed

Cargo.lock

+18-18
Original file line numberDiff line numberDiff line change
@@ -1933,9 +1933,9 @@ dependencies = [
19331933
"rustc_data_structures 0.0.0",
19341934
"rustc_errors 0.0.0",
19351935
"rustc_fs_util 0.0.0",
1936+
"rustc_serialize 0.0.0",
19361937
"rustc_target 0.0.0",
19371938
"scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
1938-
"serialize 0.0.0",
19391939
"smallvec 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
19401940
"syntax 0.0.0",
19411941
"syntax_pos 0.0.0",
@@ -2187,8 +2187,8 @@ dependencies = [
21872187
"rustc_fs_util 0.0.0",
21882188
"rustc_incremental 0.0.0",
21892189
"rustc_mir 0.0.0",
2190+
"rustc_serialize 0.0.0",
21902191
"rustc_target 0.0.0",
2191-
"serialize 0.0.0",
21922192
"syntax 0.0.0",
21932193
"syntax_pos 0.0.0",
21942194
]
@@ -2231,7 +2231,7 @@ dependencies = [
22312231
"rustc-rayon 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
22322232
"rustc-rayon-core 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
22332233
"rustc_cratesio_shim 0.0.0",
2234-
"serialize 0.0.0",
2234+
"rustc_serialize 0.0.0",
22352235
"smallvec 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
22362236
"stable_deref_trait 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
22372237
]
@@ -2261,11 +2261,11 @@ dependencies = [
22612261
"rustc_privacy 0.0.0",
22622262
"rustc_resolve 0.0.0",
22632263
"rustc_save_analysis 0.0.0",
2264+
"rustc_serialize 0.0.0",
22642265
"rustc_target 0.0.0",
22652266
"rustc_traits 0.0.0",
22662267
"rustc_typeck 0.0.0",
22672268
"scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
2268-
"serialize 0.0.0",
22692269
"smallvec 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
22702270
"syntax 0.0.0",
22712271
"syntax_ext 0.0.0",
@@ -2280,7 +2280,7 @@ dependencies = [
22802280
"log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
22812281
"rustc_cratesio_shim 0.0.0",
22822282
"rustc_data_structures 0.0.0",
2283-
"serialize 0.0.0",
2283+
"rustc_serialize 0.0.0",
22842284
"syntax_pos 0.0.0",
22852285
"termcolor 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
22862286
"unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2300,7 +2300,7 @@ dependencies = [
23002300
"rustc 0.0.0",
23012301
"rustc_data_structures 0.0.0",
23022302
"rustc_fs_util 0.0.0",
2303-
"serialize 0.0.0",
2303+
"rustc_serialize 0.0.0",
23042304
"syntax 0.0.0",
23052305
"syntax_pos 0.0.0",
23062306
]
@@ -2347,8 +2347,8 @@ dependencies = [
23472347
"rustc 0.0.0",
23482348
"rustc_data_structures 0.0.0",
23492349
"rustc_errors 0.0.0",
2350+
"rustc_serialize 0.0.0",
23502351
"rustc_target 0.0.0",
2351-
"serialize 0.0.0",
23522352
"stable_deref_trait 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
23532353
"syntax 0.0.0",
23542354
"syntax_ext 0.0.0",
@@ -2371,8 +2371,8 @@ dependencies = [
23712371
"rustc_apfloat 0.0.0",
23722372
"rustc_data_structures 0.0.0",
23732373
"rustc_errors 0.0.0",
2374+
"rustc_serialize 0.0.0",
23742375
"rustc_target 0.0.0",
2375-
"serialize 0.0.0",
23762376
"smallvec 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
23772377
"syntax 0.0.0",
23782378
"syntax_pos 0.0.0",
@@ -2460,6 +2460,13 @@ dependencies = [
24602460
"syntax_pos 0.0.0",
24612461
]
24622462

2463+
[[package]]
2464+
name = "rustc_serialize"
2465+
version = "0.0.0"
2466+
dependencies = [
2467+
"smallvec 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
2468+
]
2469+
24632470
[[package]]
24642471
name = "rustc_target"
24652472
version = "0.0.0"
@@ -2468,7 +2475,7 @@ dependencies = [
24682475
"log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
24692476
"rustc_cratesio_shim 0.0.0",
24702477
"rustc_data_structures 0.0.0",
2471-
"serialize 0.0.0",
2478+
"rustc_serialize 0.0.0",
24722479
]
24732480

24742481
[[package]]
@@ -2678,13 +2685,6 @@ dependencies = [
26782685
"serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)",
26792686
]
26802687

2681-
[[package]]
2682-
name = "serialize"
2683-
version = "0.0.0"
2684-
dependencies = [
2685-
"smallvec 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
2686-
]
2687-
26882688
[[package]]
26892689
name = "shell-escape"
26902690
version = "0.1.4"
@@ -2869,9 +2869,9 @@ dependencies = [
28692869
"log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
28702870
"rustc_data_structures 0.0.0",
28712871
"rustc_errors 0.0.0",
2872+
"rustc_serialize 0.0.0",
28722873
"rustc_target 0.0.0",
28732874
"scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
2874-
"serialize 0.0.0",
28752875
"smallvec 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
28762876
"syntax_pos 0.0.0",
28772877
]
@@ -2897,8 +2897,8 @@ dependencies = [
28972897
"arena 0.0.0",
28982898
"cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
28992899
"rustc_data_structures 0.0.0",
2900+
"rustc_serialize 0.0.0",
29002901
"scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
2901-
"serialize 0.0.0",
29022902
"unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
29032903
]
29042904

src/librustc/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ rustc_apfloat = { path = "../librustc_apfloat" }
2424
rustc_target = { path = "../librustc_target" }
2525
rustc_data_structures = { path = "../librustc_data_structures" }
2626
rustc_errors = { path = "../librustc_errors" }
27-
serialize = { path = "../libserialize" }
27+
rustc_serialize = { path = "../librustc_serialize" }
2828
syntax = { path = "../libsyntax" }
2929
syntax_pos = { path = "../libsyntax_pos" }
3030
backtrace = "0.3.3"

src/librustc/hir/def_id.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use ty;
1212
use hir::map::definitions::FIRST_FREE_HIGH_DEF_INDEX;
1313
use rustc_data_structures::indexed_vec::Idx;
14-
use serialize;
14+
use rustc_serialize;
1515
use std::fmt;
1616
use std::u32;
1717

@@ -107,8 +107,8 @@ impl fmt::Display for CrateNum {
107107
}
108108
}
109109

110-
impl serialize::UseSpecializedEncodable for CrateNum {}
111-
impl serialize::UseSpecializedDecodable for CrateNum {}
110+
impl rustc_serialize::UseSpecializedEncodable for CrateNum {}
111+
impl rustc_serialize::UseSpecializedDecodable for CrateNum {}
112112

113113
/// A DefIndex is an index into the hir-map for a crate, identifying a
114114
/// particular definition. It should really be considered an interned
@@ -199,8 +199,8 @@ impl DefIndex {
199199
}
200200
}
201201

202-
impl serialize::UseSpecializedEncodable for DefIndex {}
203-
impl serialize::UseSpecializedDecodable for DefIndex {}
202+
impl rustc_serialize::UseSpecializedEncodable for DefIndex {}
203+
impl rustc_serialize::UseSpecializedDecodable for DefIndex {}
204204

205205
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
206206
pub enum DefIndexAddressSpace {
@@ -259,8 +259,8 @@ impl DefId {
259259
}
260260
}
261261

262-
impl serialize::UseSpecializedEncodable for DefId {}
263-
impl serialize::UseSpecializedDecodable for DefId {}
262+
impl rustc_serialize::UseSpecializedEncodable for DefId {}
263+
impl rustc_serialize::UseSpecializedDecodable for DefId {}
264264

265265
/// A LocalDefId is equivalent to a DefId with `krate == LOCAL_CRATE`. Since
266266
/// we encode this information in the type, we can ensure at compile time that
@@ -293,5 +293,5 @@ impl fmt::Debug for LocalDefId {
293293
}
294294
}
295295

296-
impl serialize::UseSpecializedEncodable for LocalDefId {}
297-
impl serialize::UseSpecializedDecodable for LocalDefId {}
296+
impl rustc_serialize::UseSpecializedEncodable for LocalDefId {}
297+
impl rustc_serialize::UseSpecializedDecodable for LocalDefId {}

src/librustc/hir/map/definitions.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use ich::Fingerprint;
2121
use rustc_data_structures::fx::FxHashMap;
2222
use rustc_data_structures::indexed_vec::{IndexVec};
2323
use rustc_data_structures::stable_hasher::StableHasher;
24-
use serialize::{Encodable, Decodable, Encoder, Decoder};
24+
use rustc_serialize::{Encodable, Decodable, Encoder, Decoder};
2525
use session::CrateDisambiguator;
2626
use std::borrow::Borrow;
2727
use std::fmt::Write;

src/librustc/hir/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ use ty::query::Providers;
4040
use rustc_data_structures::sync::{ParallelIterator, par_iter, Send, Sync, scope};
4141
use rustc_data_structures::thin_vec::ThinVec;
4242

43-
use serialize::{self, Encoder, Encodable, Decoder, Decodable};
43+
use rustc_serialize::{self, Encoder, Encodable, Decoder, Decodable};
4444
use std::collections::BTreeMap;
4545
use std::fmt;
4646

@@ -95,7 +95,7 @@ impl HirId {
9595
}
9696
}
9797

98-
impl serialize::UseSpecializedEncodable for HirId {
98+
impl rustc_serialize::UseSpecializedEncodable for HirId {
9999
fn default_encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
100100
let HirId {
101101
owner,
@@ -107,7 +107,7 @@ impl serialize::UseSpecializedEncodable for HirId {
107107
}
108108
}
109109

110-
impl serialize::UseSpecializedDecodable for HirId {
110+
impl rustc_serialize::UseSpecializedDecodable for HirId {
111111
fn default_decode<D: Decoder>(d: &mut D) -> Result<HirId, D::Error> {
112112
let owner = DefIndex::decode(d)?;
113113
let local_id = ItemLocalId::decode(d)?;

src/librustc/infer/canonical/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
use infer::{InferCtxt, RegionVariableOrigin, TypeVariableOrigin};
3535
use rustc_data_structures::indexed_vec::IndexVec;
3636
use rustc_data_structures::sync::Lrc;
37-
use serialize::UseSpecializedDecodable;
37+
use rustc_serialize::UseSpecializedDecodable;
3838
use smallvec::SmallVec;
3939
use std::ops::Index;
4040
use syntax::source_map::Span;

src/librustc/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ extern crate libc;
8787
extern crate polonius_engine;
8888
extern crate rustc_target;
8989
#[macro_use] extern crate rustc_data_structures;
90-
extern crate serialize;
9190
extern crate parking_lot;
9291
extern crate rustc_errors as errors;
9392
extern crate rustc_rayon as rayon;
@@ -100,7 +99,7 @@ extern crate proc_macro;
10099
extern crate chalk_engine;
101100
extern crate rustc_fs_util;
102101

103-
extern crate serialize as rustc_serialize; // used by deriving
102+
extern crate rustc_serialize; // used by deriving
104103

105104
extern crate rustc_apfloat;
106105
extern crate byteorder;

src/librustc/mir/cache.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,23 @@ use rustc_data_structures::stable_hasher::{HashStable, StableHasher,
1515
use ich::StableHashingContext;
1616
use mir::{Mir, BasicBlock};
1717

18-
use rustc_serialize as serialize;
18+
use rustc_serialize;
1919

2020
#[derive(Clone, Debug)]
2121
pub struct Cache {
2222
predecessors: RwLock<Option<IndexVec<BasicBlock, Vec<BasicBlock>>>>
2323
}
2424

2525

26-
impl serialize::Encodable for Cache {
27-
fn encode<S: serialize::Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
28-
serialize::Encodable::encode(&(), s)
26+
impl rustc_serialize::Encodable for Cache {
27+
fn encode<S: rustc_serialize::Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
28+
rustc_serialize::Encodable::encode(&(), s)
2929
}
3030
}
3131

32-
impl serialize::Decodable for Cache {
33-
fn decode<D: serialize::Decoder>(d: &mut D) -> Result<Self, D::Error> {
34-
serialize::Decodable::decode(d).map(|_v: ()| Self::new())
32+
impl rustc_serialize::Decodable for Cache {
33+
fn decode<D: rustc_serialize::Decoder>(d: &mut D) -> Result<Self, D::Error> {
34+
rustc_serialize::Decodable::decode(d).map(|_v: ()| Self::new())
3535
}
3636
}
3737

src/librustc/mir/interpret/allocation.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ impl<Tag, Extra> Allocation<Tag, Extra> {
139139
}
140140
}
141141

142-
impl<'tcx> ::serialize::UseSpecializedDecodable for &'tcx Allocation {}
142+
impl<'tcx> ::rustc_serialize::UseSpecializedDecodable for &'tcx Allocation {}
143143

144144
/// Alignment and bounds checks
145145
impl<'tcx, Tag, Extra> Allocation<Tag, Extra> {

src/librustc/mir/mod.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use rustc_data_structures::graph::{self, GraphPredecessors, GraphSuccessors};
2525
use rustc_data_structures::indexed_vec::{Idx, IndexVec};
2626
use rustc_data_structures::sync::Lrc;
2727
use rustc_data_structures::sync::MappedReadGuard;
28-
use rustc_serialize as serialize;
28+
use rustc_serialize;
2929
use smallvec::SmallVec;
3030
use std::borrow::Cow;
3131
use std::fmt::{self, Debug, Formatter, Write};
@@ -456,8 +456,10 @@ impl<T> ClearCrossCrate<T> {
456456
}
457457
}
458458

459-
impl<T: serialize::Encodable> serialize::UseSpecializedEncodable for ClearCrossCrate<T> {}
460-
impl<T: serialize::Decodable> serialize::UseSpecializedDecodable for ClearCrossCrate<T> {}
459+
impl<T: rustc_serialize::Encodable> rustc_serialize::UseSpecializedEncodable
460+
for ClearCrossCrate<T> {}
461+
impl<T: rustc_serialize::Decodable> rustc_serialize::UseSpecializedDecodable
462+
for ClearCrossCrate<T> {}
461463

462464
/// Grouped information about the source code origin of a MIR entity.
463465
/// Intended to be inspected by diagnostics and debuginfo.

src/librustc/ty/mod.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ use util::nodemap::{NodeSet, DefIdMap, FxHashMap};
4141
use arena::SyncDroplessArena;
4242
use session::DataTypeKind;
4343

44-
use serialize::{self, Encodable, Encoder};
44+
use rustc_serialize::{self, Encodable, Encoder};
4545
use std::cell::RefCell;
4646
use std::cmp::{self, Ordering};
4747
use std::fmt;
@@ -598,8 +598,8 @@ impl<'a, 'gcx> HashStable<StableHashingContext<'a>> for ty::TyS<'gcx> {
598598

599599
pub type Ty<'tcx> = &'tcx TyS<'tcx>;
600600

601-
impl<'tcx> serialize::UseSpecializedEncodable for Ty<'tcx> {}
602-
impl<'tcx> serialize::UseSpecializedDecodable for Ty<'tcx> {}
601+
impl<'tcx> rustc_serialize::UseSpecializedEncodable for Ty<'tcx> {}
602+
impl<'tcx> rustc_serialize::UseSpecializedDecodable for Ty<'tcx> {}
603603

604604
pub type CanonicalTy<'gcx> = Canonical<'gcx, Ty<'gcx>>;
605605

@@ -718,7 +718,7 @@ impl<'a, T> IntoIterator for &'a List<T> {
718718
}
719719
}
720720

721-
impl<'tcx> serialize::UseSpecializedDecodable for &'tcx List<Ty<'tcx>> {}
721+
impl<'tcx> rustc_serialize::UseSpecializedDecodable for &'tcx List<Ty<'tcx>> {}
722722

723723
impl<T> List<T> {
724724
#[inline(always)]
@@ -995,8 +995,8 @@ pub struct GenericPredicates<'tcx> {
995995
pub predicates: Vec<(Predicate<'tcx>, Span)>,
996996
}
997997

998-
impl<'tcx> serialize::UseSpecializedEncodable for GenericPredicates<'tcx> {}
999-
impl<'tcx> serialize::UseSpecializedDecodable for GenericPredicates<'tcx> {}
998+
impl<'tcx> rustc_serialize::UseSpecializedEncodable for GenericPredicates<'tcx> {}
999+
impl<'tcx> rustc_serialize::UseSpecializedDecodable for GenericPredicates<'tcx> {}
10001000

10011001
impl<'a, 'gcx, 'tcx> GenericPredicates<'tcx> {
10021002
pub fn instantiate(&self, tcx: TyCtxt<'a, 'gcx, 'tcx>, substs: &Substs<'tcx>)
@@ -1905,13 +1905,13 @@ impl Hash for AdtDef {
19051905
}
19061906
}
19071907

1908-
impl<'tcx> serialize::UseSpecializedEncodable for &'tcx AdtDef {
1908+
impl<'tcx> rustc_serialize::UseSpecializedEncodable for &'tcx AdtDef {
19091909
fn default_encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
19101910
self.did.encode(s)
19111911
}
19121912
}
19131913

1914-
impl<'tcx> serialize::UseSpecializedDecodable for &'tcx AdtDef {}
1914+
impl<'tcx> rustc_serialize::UseSpecializedDecodable for &'tcx AdtDef {}
19151915

19161916

19171917
impl<'a> HashStable<StableHashingContext<'a>> for AdtDef {

0 commit comments

Comments
 (0)