about summary refs log tree commit diff
path: root/src/libsyntax/diagnostics/plugin.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-08-14 15:09:37 +0000
committerbors <bors@rust-lang.org>2018-08-14 15:09:37 +0000
commit23f09bbed4ef12c5f9db198c22f50b608ea6c6d5 (patch)
tree547c1cea1a62ace01f8cef6c8120612596208083 /src/libsyntax/diagnostics/plugin.rs
parentf45f52532a394d2d607fc5693364ad820049376d (diff)
parente5e6375352636360add297c1f5a1f37ce71506e9 (diff)
downloadrust-23f09bbed4ef12c5f9db198c22f50b608ea6c6d5.tar.gz
rust-23f09bbed4ef12c5f9db198c22f50b608ea6c6d5.zip
Auto merge of #53085 - ljedrz:cleanup_syntax_structures, r=ljedrz
Move SmallVector and ThinVec out of libsyntax

- move `libsyntax::util::SmallVector` tests to `librustc_data_structures::small_vec`
- remove `libsyntax::util::SmallVector`
- move `libsyntax::util::thin_vec` to `librustc_data_structures::thin_vec`

Other than moving these data structures where they belong it allows modules using `SmallVector<T>` (`SmallVec<[T; 1]>`) to specify their own length (e.g. 8 or 32) independently from `libsyntax`.
Diffstat (limited to 'src/libsyntax/diagnostics/plugin.rs')
-rw-r--r--src/libsyntax/diagnostics/plugin.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/diagnostics/plugin.rs b/src/libsyntax/diagnostics/plugin.rs
index 72ce2740190..6a5a2a5e500 100644
--- a/src/libsyntax/diagnostics/plugin.rs
+++ b/src/libsyntax/diagnostics/plugin.rs
@@ -19,9 +19,9 @@ use ext::base::{ExtCtxt, MacEager, MacResult};
 use ext::build::AstBuilder;
 use parse::token;
 use ptr::P;
+use OneVector;
 use symbol::{keywords, Symbol};
 use tokenstream::{TokenTree};
-use util::small_vector::SmallVector;
 
 use diagnostics::metadata::output_metadata;
 
@@ -131,7 +131,7 @@ pub fn expand_register_diagnostic<'cx>(ecx: &'cx mut ExtCtxt,
     let sym = Ident::with_empty_ctxt(Symbol::gensym(&format!(
         "__register_diagnostic_{}", code
     )));
-    MacEager::items(SmallVector::many(vec![
+    MacEager::items(OneVector::many(vec![
         ecx.item_mod(
             span,
             span,
@@ -214,7 +214,7 @@ pub fn expand_build_diagnostic_array<'cx>(ecx: &'cx mut ExtCtxt,
         ),
     );
 
-    MacEager::items(SmallVector::many(vec![
+    MacEager::items(OneVector::many(vec![
         P(ast::Item {
             ident: *name,
             attrs: Vec::new(),