Deprecate name OwnedSlice and don't use it

This commit is contained in:
Vadim Petrochenkov 2015-12-16 21:44:33 +03:00
parent 09d4a436a7
commit 0d298f9904
22 changed files with 96 additions and 114 deletions

View file

@ -50,7 +50,6 @@ use codemap::{Span, Spanned, DUMMY_SP, ExpnId};
use abi::Abi;
use ext::base;
use ext::tt::macro_parser;
use owned_slice::OwnedSlice;
use parse::token::InternedString;
use parse::token;
use parse::lexer;
@ -261,8 +260,8 @@ impl PathParameters {
pub fn none() -> PathParameters {
AngleBracketedParameters(AngleBracketedParameterData {
lifetimes: Vec::new(),
types: OwnedSlice::empty(),
bindings: OwnedSlice::empty(),
types: P::empty(),
bindings: P::empty(),
})
}
@ -334,10 +333,10 @@ pub struct AngleBracketedParameterData {
/// The lifetime parameters for this path segment.
pub lifetimes: Vec<Lifetime>,
/// The type parameters for this path segment, if present.
pub types: OwnedSlice<P<Ty>>,
pub types: P<[P<Ty>]>,
/// Bindings (equality constraints) on associated types, if present.
/// E.g., `Foo<A=Bar>`.
pub bindings: OwnedSlice<P<TypeBinding>>,
pub bindings: P<[P<TypeBinding>]>,
}
impl AngleBracketedParameterData {
@ -394,7 +393,7 @@ pub enum TraitBoundModifier {
Maybe,
}
pub type TyParamBounds = OwnedSlice<TyParamBound>;
pub type TyParamBounds = P<[TyParamBound]>;
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct TyParam {
@ -410,7 +409,7 @@ pub struct TyParam {
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct Generics {
pub lifetimes: Vec<LifetimeDef>,
pub ty_params: OwnedSlice<TyParam>,
pub ty_params: P<[TyParam]>,
pub where_clause: WhereClause,
}
@ -430,7 +429,7 @@ impl Default for Generics {
fn default() -> Generics {
Generics {
lifetimes: Vec::new(),
ty_params: OwnedSlice::empty(),
ty_params: P::empty(),
where_clause: WhereClause {
id: DUMMY_NODE_ID,
predicates: Vec::new(),
@ -466,7 +465,7 @@ pub struct WhereBoundPredicate {
/// The type being bounded
pub bounded_ty: P<Ty>,
/// Trait and lifetime bounds (`Clone+Send+'static`)
pub bounds: OwnedSlice<TyParamBound>,
pub bounds: TyParamBounds,
}
/// A lifetime predicate, e.g. `'a: 'b+'c`