diff options
| author | ljedrz <ljedrz@gmail.com> | 2018-08-05 12:04:56 +0200 |
|---|---|---|
| committer | ljedrz <ljedrz@gmail.com> | 2018-08-13 22:11:57 +0200 |
| commit | e5e6375352636360add297c1f5a1f37ce71506e9 (patch) | |
| tree | 9274f6f905ccbcfe493fbc161838084f977a180a /src/libsyntax_ext | |
| parent | d5a448b3f47b22c9cb010198bdcc49d4392b090b (diff) | |
| download | rust-e5e6375352636360add297c1f5a1f37ce71506e9.tar.gz rust-e5e6375352636360add297c1f5a1f37ce71506e9.zip | |
Move SmallVec and ThinVec out of libsyntax
Diffstat (limited to 'src/libsyntax_ext')
| -rw-r--r-- | src/libsyntax_ext/asm.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax_ext/concat_idents.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax_ext/deriving/debug.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax_ext/deriving/generic/mod.rs | 3 | ||||
| -rw-r--r-- | src/libsyntax_ext/global_asm.rs | 6 |
5 files changed, 14 insertions, 7 deletions
diff --git a/src/libsyntax_ext/asm.rs b/src/libsyntax_ext/asm.rs index 4ebb1fcb653..026ddccd7be 100644 --- a/src/libsyntax_ext/asm.rs +++ b/src/libsyntax_ext/asm.rs @@ -12,6 +12,8 @@ // use self::State::*; +use rustc_data_structures::thin_vec::ThinVec; + use syntax::ast; use syntax::ext::base; use syntax::ext::base::*; @@ -263,6 +265,6 @@ pub fn expand_asm<'cx>(cx: &'cx mut ExtCtxt, ctxt: cx.backtrace(), })), span: sp, - attrs: ast::ThinVec::new(), + attrs: ThinVec::new(), })) } diff --git a/src/libsyntax_ext/concat_idents.rs b/src/libsyntax_ext/concat_idents.rs index a3c5c3df66e..c8cc11e4354 100644 --- a/src/libsyntax_ext/concat_idents.rs +++ b/src/libsyntax_ext/concat_idents.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +use rustc_data_structures::thin_vec::ThinVec; + use syntax::ast; use syntax::ext::base::*; use syntax::ext::base; @@ -68,7 +70,7 @@ pub fn expand_syntax_ext<'cx>(cx: &'cx mut ExtCtxt, id: ast::DUMMY_NODE_ID, node: ast::ExprKind::Path(None, ast::Path::from_ident(self.ident)), span: self.ident.span, - attrs: ast::ThinVec::new(), + attrs: ThinVec::new(), })) } diff --git a/src/libsyntax_ext/deriving/debug.rs b/src/libsyntax_ext/deriving/debug.rs index c2a7dea3316..df9c351ef1c 100644 --- a/src/libsyntax_ext/deriving/debug.rs +++ b/src/libsyntax_ext/deriving/debug.rs @@ -12,6 +12,8 @@ use deriving::path_std; use deriving::generic::*; use deriving::generic::ty::*; +use rustc_data_structures::thin_vec::ThinVec; + use syntax::ast::{self, Ident}; use syntax::ast::{Expr, MetaItem}; use syntax::ext::base::{Annotatable, ExtCtxt}; @@ -139,7 +141,7 @@ fn stmt_let_undescore(cx: &mut ExtCtxt, sp: Span, expr: P<ast::Expr>) -> ast::St init: Some(expr), id: ast::DUMMY_NODE_ID, span: sp, - attrs: ast::ThinVec::new(), + attrs: ThinVec::new(), }); ast::Stmt { id: ast::DUMMY_NODE_ID, diff --git a/src/libsyntax_ext/deriving/generic/mod.rs b/src/libsyntax_ext/deriving/generic/mod.rs index f5e607fc23d..2e0ba65dc65 100644 --- a/src/libsyntax_ext/deriving/generic/mod.rs +++ b/src/libsyntax_ext/deriving/generic/mod.rs @@ -191,6 +191,7 @@ use std::cell::RefCell; use std::iter; use std::vec; +use rustc_data_structures::thin_vec::ThinVec; use rustc_target::spec::abi::Abi; use syntax::ast::{self, BinOpKind, EnumDef, Expr, Generics, Ident, PatKind}; use syntax::ast::{VariantData, GenericParamKind, GenericArg}; @@ -1624,7 +1625,7 @@ impl<'a> TraitDef<'a> { ident: ident.unwrap(), pat, is_shorthand: false, - attrs: ast::ThinVec::new(), + attrs: ThinVec::new(), }, } }) diff --git a/src/libsyntax_ext/global_asm.rs b/src/libsyntax_ext/global_asm.rs index 40ecd6e1519..7290b701e4d 100644 --- a/src/libsyntax_ext/global_asm.rs +++ b/src/libsyntax_ext/global_asm.rs @@ -18,6 +18,8 @@ /// LLVM's `module asm "some assembly here"`. All of LLVM's caveats /// therefore apply. +use rustc_data_structures::small_vec::OneVector; + use syntax::ast; use syntax::codemap::respan; use syntax::ext::base; @@ -28,8 +30,6 @@ use syntax::symbol::Symbol; use syntax_pos::Span; use syntax::tokenstream; -use syntax::util::small_vector::SmallVector; - pub const MACRO: &'static str = "global_asm"; pub fn expand_global_asm<'cx>(cx: &'cx mut ExtCtxt, @@ -52,7 +52,7 @@ pub fn expand_global_asm<'cx>(cx: &'cx mut ExtCtxt, None => return DummyResult::any(sp), }; - MacEager::items(SmallVector::one(P(ast::Item { + MacEager::items(OneVector::one(P(ast::Item { ident: ast::Ident::with_empty_ctxt(Symbol::intern("")), attrs: Vec::new(), id: ast::DUMMY_NODE_ID, |
