diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2015-12-16 21:44:33 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2015-12-18 00:52:56 +0300 |
| commit | 0d298f9904468b8f668cb9b505c19d64fdeb7633 (patch) | |
| tree | 7e65ebcb1ef74ec027cf31b2135b92f3a80e99ac /src/libsyntax/ast.rs | |
| parent | 09d4a436a748a39f13d2d6d6c6ba56a885bb0d0c (diff) | |
| download | rust-0d298f9904468b8f668cb9b505c19d64fdeb7633.tar.gz rust-0d298f9904468b8f668cb9b505c19d64fdeb7633.zip | |
Deprecate name `OwnedSlice` and don't use it
Diffstat (limited to 'src/libsyntax/ast.rs')
| -rw-r--r-- | src/libsyntax/ast.rs | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index de5595eebee..4b0ec8578c1 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -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` |
