bump smallvec to 1.0

This commit is contained in:
Ralf Jung 2019-11-04 15:59:09 +01:00
parent ab6e47851b
commit 90b8d34c9f
19 changed files with 53 additions and 47 deletions

View file

@ -10,4 +10,4 @@ path = "lib.rs"
[dependencies]
rustc_data_structures = { path = "../librustc_data_structures" }
smallvec = { version = "0.6.7", features = ["union", "may_dangle"] }
smallvec = { version = "1.0", features = ["union", "may_dangle"] }

View file

@ -39,5 +39,5 @@ parking_lot = "0.9"
byteorder = { version = "1.3" }
chalk-engine = { version = "0.9.0", default-features=false }
rustc_fs_util = { path = "../librustc_fs_util" }
smallvec = { version = "0.6.8", features = ["union", "may_dangle"] }
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
measureme = "0.4"

View file

@ -304,7 +304,7 @@ impl DropArena {
// Move the content to the arena by copying it and then forgetting
// the content of the SmallVec
vec.as_ptr().copy_to_nonoverlapping(start_ptr, len);
mem::forget(vec.drain());
mem::forget(vec.drain(..));
// Record the destructors after doing the allocation as that may panic
// and would cause `object`'s destuctor to run twice if it was recorded before

View file

@ -76,19 +76,19 @@ impl<'tcx> DefIdForest {
break;
}
for id in ret.root_ids.drain() {
for id in ret.root_ids.drain(..) {
if next_forest.contains(tcx, id) {
next_ret.push(id);
} else {
old_ret.push(id);
}
}
ret.root_ids.extend(old_ret.drain());
ret.root_ids.extend(old_ret.drain(..));
next_ret.extend(next_forest.root_ids.into_iter().filter(|&id| ret.contains(tcx, id)));
mem::swap(&mut next_ret, &mut ret.root_ids);
next_ret.drain();
next_ret.drain(..);
}
ret
}
@ -101,7 +101,7 @@ impl<'tcx> DefIdForest {
let mut ret = DefIdForest::empty();
let mut next_ret = SmallVec::new();
for next_forest in iter {
next_ret.extend(ret.root_ids.drain().filter(|&id| !next_forest.contains(tcx, id)));
next_ret.extend(ret.root_ids.drain(..).filter(|&id| !next_forest.contains(tcx, id)));
for id in next_forest.root_ids {
if !next_ret.contains(&id) {
@ -110,7 +110,7 @@ impl<'tcx> DefIdForest {
}
mem::swap(&mut next_ret, &mut ret.root_ids);
next_ret.drain();
next_ret.drain(..);
}
ret
}

View file

@ -10,4 +10,4 @@ path = "lib.rs"
[dependencies]
bitflags = "1.2.1"
smallvec = { version = "0.6.7", features = ["union", "may_dangle"] }
smallvec = { version = "1.0", features = ["union", "may_dangle"] }

View file

@ -23,7 +23,7 @@ stable_deref_trait = "1.0.0"
rayon = { version = "0.3.0", package = "rustc-rayon" }
rayon-core = { version = "0.3.0", package = "rustc-rayon-core" }
rustc-hash = "1.0.1"
smallvec = { version = "0.6.7", features = ["union", "may_dangle"] }
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
rustc_index = { path = "../librustc_index", package = "rustc_index" }
[dependencies.parking_lot]

View file

@ -11,4 +11,4 @@ doctest = false
[dependencies]
rustc_serialize = { path = "../libserialize", package = "serialize" }
smallvec = { version = "0.6.7", features = ["union", "may_dangle"] }
smallvec = { version = "1.0", features = ["union", "may_dangle"] }

View file

@ -12,7 +12,7 @@ doctest = false
[dependencies]
log = "0.4"
rayon = { version = "0.3.0", package = "rustc-rayon" }
smallvec = { version = "0.6.7", features = ["union", "may_dangle"] }
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
syntax = { path = "../libsyntax" }
syntax_ext = { path = "../libsyntax_ext" }
syntax_expand = { path = "../libsyntax_expand" }

View file

@ -13,7 +13,7 @@ doctest = false
flate2 = "1.0"
log = "0.4"
memmap = "0.6"
smallvec = { version = "0.6.7", features = ["union", "may_dangle"] }
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
rustc = { path = "../librustc" }
rustc_data_structures = { path = "../librustc_data_structures" }
errors = { path = "../librustc_errors", package = "rustc_errors" }

View file

@ -26,4 +26,4 @@ rustc_serialize = { path = "../libserialize", package = "serialize" }
syntax = { path = "../libsyntax" }
syntax_pos = { path = "../libsyntax_pos" }
rustc_apfloat = { path = "../librustc_apfloat" }
smallvec = { version = "0.6.7", features = ["union", "may_dangle"] }
smallvec = { version = "1.0", features = ["union", "may_dangle"] }

View file

@ -21,4 +21,4 @@ errors = { path = "../librustc_errors", package = "rustc_errors" }
syntax_pos = { path = "../libsyntax_pos" }
rustc_data_structures = { path = "../librustc_data_structures" }
rustc_metadata = { path = "../librustc_metadata" }
smallvec = { version = "0.6.7", features = ["union", "may_dangle"] }
smallvec = { version = "1.0", features = ["union", "may_dangle"] }

View file

@ -16,4 +16,4 @@ rustc_target = { path = "../librustc_target" }
syntax = { path = "../libsyntax" }
syntax_pos = { path = "../libsyntax_pos" }
chalk-engine = { version = "0.9.0", default-features=false }
smallvec = { version = "0.6.7", features = ["union", "may_dangle"] }
smallvec = { version = "1.0", features = ["union", "may_dangle"] }

View file

@ -17,7 +17,7 @@ rustc = { path = "../librustc" }
rustc_data_structures = { path = "../librustc_data_structures" }
errors = { path = "../librustc_errors", package = "rustc_errors" }
rustc_target = { path = "../librustc_target" }
smallvec = { version = "0.6.7", features = ["union", "may_dangle"] }
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
syntax = { path = "../libsyntax" }
syntax_pos = { path = "../libsyntax_pos" }
rustc_index = { path = "../librustc_index" }

View file

@ -10,4 +10,4 @@ path = "lib.rs"
[dependencies]
indexmap = "1"
smallvec = { version = "0.6.7", features = ["union", "may_dangle"] }
smallvec = { version = "1.0", features = ["union", "may_dangle"] }

View file

@ -21,4 +21,4 @@ rustc_data_structures = { path = "../librustc_data_structures" }
rustc_index = { path = "../librustc_index" }
rustc_lexer = { path = "../librustc_lexer" }
rustc_target = { path = "../librustc_target" }
smallvec = { version = "0.6.7", features = ["union", "may_dangle"] }
smallvec = { version = "1.0", features = ["union", "may_dangle"] }

View file

@ -253,7 +253,7 @@ impl TokenStream {
// Get the first stream. If it's `None`, create an empty
// stream.
let mut iter = streams.drain();
let mut iter = streams.drain(..);
let mut first_stream_lrc = iter.next().unwrap().0;
// Append the elements to the first stream, after reserving

View file

@ -22,5 +22,5 @@ rustc_data_structures = { path = "../librustc_data_structures" }
rustc_index = { path = "../librustc_index" }
rustc_lexer = { path = "../librustc_lexer" }
rustc_target = { path = "../librustc_target" }
smallvec = { version = "0.6.7", features = ["union", "may_dangle"] }
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
syntax = { path = "../libsyntax" }

View file

@ -15,7 +15,7 @@ fmt_macros = { path = "../libfmt_macros" }
log = "0.4"
rustc_data_structures = { path = "../librustc_data_structures" }
rustc_target = { path = "../librustc_target" }
smallvec = { version = "0.6.7", features = ["union", "may_dangle"] }
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
syntax = { path = "../libsyntax" }
syntax_expand = { path = "../libsyntax_expand" }
syntax_pos = { path = "../libsyntax_pos" }