Skip to content

Commit 87c7e57

Browse files
committed
Rename ty::Slice to ty::List
1 parent 674ef66 commit 87c7e57

File tree

20 files changed

+140
-139
lines changed

20 files changed

+140
-139
lines changed

src/librustc/ich/impls_ty.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use ty;
2525
use mir;
2626

2727
impl<'a, 'gcx, T> HashStable<StableHashingContext<'a>>
28-
for &'gcx ty::Slice<T>
28+
for &'gcx ty::List<T>
2929
where T: HashStable<StableHashingContext<'a>> {
3030
fn hash_stable<W: StableHasherResult>(&self,
3131
hcx: &mut StableHashingContext<'a>,
@@ -53,7 +53,7 @@ for &'gcx ty::Slice<T>
5353
}
5454
}
5555

56-
impl<'a, 'gcx, T> ToStableHashKey<StableHashingContext<'a>> for &'gcx ty::Slice<T>
56+
impl<'a, 'gcx, T> ToStableHashKey<StableHashingContext<'a>> for &'gcx ty::List<T>
5757
where T: HashStable<StableHashingContext<'a>>
5858
{
5959
type KeyType = Fingerprint;

src/librustc/infer/canonical/canonicalizer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use infer::InferCtxt;
2323
use std::sync::atomic::Ordering;
2424
use ty::fold::{TypeFoldable, TypeFolder};
2525
use ty::subst::Kind;
26-
use ty::{self, CanonicalVar, Lift, Slice, Ty, TyCtxt, TypeFlags};
26+
use ty::{self, CanonicalVar, Lift, List, Ty, TyCtxt, TypeFlags};
2727

2828
use rustc_data_structures::fx::FxHashMap;
2929
use rustc_data_structures::indexed_vec::Idx;
@@ -327,7 +327,7 @@ impl<'cx, 'gcx, 'tcx> Canonicalizer<'cx, 'gcx, 'tcx> {
327327
if !value.has_type_flags(needs_canonical_flags) {
328328
let out_value = gcx.lift(value).unwrap();
329329
let canon_value = Canonical {
330-
variables: Slice::empty(),
330+
variables: List::empty(),
331331
value: out_value,
332332
};
333333
return canon_value;

src/librustc/infer/canonical/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ use std::ops::Index;
4040
use syntax::source_map::Span;
4141
use ty::fold::TypeFoldable;
4242
use ty::subst::Kind;
43-
use ty::{self, CanonicalVar, Lift, Region, Slice, TyCtxt};
43+
use ty::{self, CanonicalVar, Lift, Region, List, TyCtxt};
4444

4545
mod canonicalizer;
4646

@@ -57,7 +57,7 @@ pub struct Canonical<'gcx, V> {
5757
pub value: V,
5858
}
5959

60-
pub type CanonicalVarInfos<'gcx> = &'gcx Slice<CanonicalVarInfo>;
60+
pub type CanonicalVarInfos<'gcx> = &'gcx List<CanonicalVarInfo>;
6161

6262
impl<'gcx> UseSpecializedDecodable for CanonicalVarInfos<'gcx> {}
6363

@@ -221,7 +221,7 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
221221
fn fresh_inference_vars_for_canonical_vars(
222222
&self,
223223
span: Span,
224-
variables: &Slice<CanonicalVarInfo>,
224+
variables: &List<CanonicalVarInfo>,
225225
) -> CanonicalVarValues<'tcx> {
226226
let var_values: IndexVec<CanonicalVar, Kind<'tcx>> = variables
227227
.iter()

src/librustc/traits/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use infer::outlives::env::OutlivesEnvironment;
2424
use middle::region;
2525
use mir::interpret::ConstEvalErr;
2626
use ty::subst::Substs;
27-
use ty::{self, AdtKind, Slice, Ty, TyCtxt, GenericParamDefKind, ToPredicate};
27+
use ty::{self, AdtKind, List, Ty, TyCtxt, GenericParamDefKind, ToPredicate};
2828
use ty::error::{ExpectedFound, TypeError};
2929
use ty::fold::{TypeFolder, TypeFoldable, TypeVisitor};
3030
use infer::{InferCtxt};
@@ -325,7 +325,7 @@ pub enum Goal<'tcx> {
325325
CannotProve,
326326
}
327327

328-
pub type Goals<'tcx> = &'tcx Slice<Goal<'tcx>>;
328+
pub type Goals<'tcx> = &'tcx List<Goal<'tcx>>;
329329

330330
impl<'tcx> DomainGoal<'tcx> {
331331
pub fn into_goal(self) -> Goal<'tcx> {
@@ -357,7 +357,7 @@ pub enum Clause<'tcx> {
357357
}
358358

359359
/// Multiple clauses.
360-
pub type Clauses<'tcx> = &'tcx Slice<Clause<'tcx>>;
360+
pub type Clauses<'tcx> = &'tcx List<Clause<'tcx>>;
361361

362362
/// A "program clause" has the form `D :- G1, ..., Gn`. It is saying
363363
/// that the domain goal `D` is true if `G1...Gn` are provable. This

src/librustc/traits/structural_impls.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ EnumLiftImpl! {
620620
}
621621
}
622622

623-
impl<'tcx> TypeFoldable<'tcx> for &'tcx ty::Slice<traits::Goal<'tcx>> {
623+
impl<'tcx> TypeFoldable<'tcx> for &'tcx ty::List<traits::Goal<'tcx>> {
624624
fn super_fold_with<'gcx: 'tcx, F: TypeFolder<'gcx, 'tcx>>(&self, folder: &mut F) -> Self {
625625
let v = self.iter()
626626
.map(|t| t.fold_with(folder))
@@ -658,7 +658,7 @@ EnumTypeFoldableImpl! {
658658
}
659659
}
660660

661-
impl<'tcx> TypeFoldable<'tcx> for &'tcx ty::Slice<traits::Clause<'tcx>> {
661+
impl<'tcx> TypeFoldable<'tcx> for &'tcx ty::List<traits::Clause<'tcx>> {
662662
fn super_fold_with<'gcx: 'tcx, F: TypeFolder<'gcx, 'tcx>>(&self, folder: &mut F) -> Self {
663663
let v = self.iter()
664664
.map(|t| t.fold_with(folder))

src/librustc/ty/codec.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ pub fn decode_region<'a, 'tcx, D>(decoder: &mut D) -> Result<ty::Region<'tcx>, D
212212

213213
#[inline]
214214
pub fn decode_ty_slice<'a, 'tcx, D>(decoder: &mut D)
215-
-> Result<&'tcx ty::Slice<Ty<'tcx>>, D::Error>
215+
-> Result<&'tcx ty::List<Ty<'tcx>>, D::Error>
216216
where D: TyDecoder<'a, 'tcx>,
217217
'tcx: 'a,
218218
{
@@ -232,7 +232,7 @@ pub fn decode_adt_def<'a, 'tcx, D>(decoder: &mut D)
232232

233233
#[inline]
234234
pub fn decode_existential_predicate_slice<'a, 'tcx, D>(decoder: &mut D)
235-
-> Result<&'tcx ty::Slice<ty::ExistentialPredicate<'tcx>>, D::Error>
235+
-> Result<&'tcx ty::List<ty::ExistentialPredicate<'tcx>>, D::Error>
236236
where D: TyDecoder<'a, 'tcx>,
237237
'tcx: 'a,
238238
{
@@ -366,10 +366,10 @@ macro_rules! implement_ty_decoder {
366366
}
367367
}
368368

369-
impl<$($typaram),*> SpecializedDecoder<&'tcx ty::Slice<ty::Ty<'tcx>>>
369+
impl<$($typaram),*> SpecializedDecoder<&'tcx ty::List<ty::Ty<'tcx>>>
370370
for $DecoderName<$($typaram),*> {
371371
fn specialized_decode(&mut self)
372-
-> Result<&'tcx ty::Slice<ty::Ty<'tcx>>, Self::Error> {
372+
-> Result<&'tcx ty::List<ty::Ty<'tcx>>, Self::Error> {
373373
decode_ty_slice(self)
374374
}
375375
}
@@ -381,10 +381,10 @@ macro_rules! implement_ty_decoder {
381381
}
382382
}
383383

384-
impl<$($typaram),*> SpecializedDecoder<&'tcx ty::Slice<ty::ExistentialPredicate<'tcx>>>
384+
impl<$($typaram),*> SpecializedDecoder<&'tcx ty::List<ty::ExistentialPredicate<'tcx>>>
385385
for $DecoderName<$($typaram),*> {
386386
fn specialized_decode(&mut self)
387-
-> Result<&'tcx ty::Slice<ty::ExistentialPredicate<'tcx>>, Self::Error> {
387+
-> Result<&'tcx ty::List<ty::ExistentialPredicate<'tcx>>, Self::Error> {
388388
decode_existential_predicate_slice(self)
389389
}
390390
}

0 commit comments

Comments
 (0)