diff --git a/Cargo.lock b/Cargo.lock index 873f5da053787..a6dca2048d4e8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -68,7 +68,7 @@ name = "arena" version = "0.0.0" dependencies = [ "rustc_data_structures", - "smallvec", + "smallvec 1.0.0", ] [[package]] @@ -487,7 +487,7 @@ dependencies = [ "regex-syntax", "semver", "serde", - "smallvec", + "smallvec 0.6.10", "toml", "unicode-normalization", "url 2.1.0", @@ -655,7 +655,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f0ed1a4de2235cabda8558ff5840bffb97fcb64c97827f354a451307df5f72b" dependencies = [ "crossbeam-utils 0.6.5", - "smallvec", + "smallvec 0.6.10", ] [[package]] @@ -2392,7 +2392,7 @@ dependencies = [ "libc", "rand 0.6.1", "rustc_version", - "smallvec", + "smallvec 0.6.10", "winapi 0.3.6", ] @@ -2407,7 +2407,7 @@ dependencies = [ "libc", "redox_syscall", "rustc_version", - "smallvec", + "smallvec 0.6.10", "winapi 0.3.6", ] @@ -3135,7 +3135,7 @@ dependencies = [ "rustc_target", "scoped-tls", "serialize", - "smallvec", + "smallvec 1.0.0", "syntax", "syntax_pos", ] @@ -3147,7 +3147,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a623fd4805842e9bd0bb6e6dace63efede0ee22de4522a0b03b7c3d15a22f009" dependencies = [ "rustc-ap-rustc_data_structures", - "smallvec", + "smallvec 0.6.10", ] [[package]] @@ -3176,7 +3176,7 @@ dependencies = [ "rustc-hash", "rustc-rayon 0.2.0", "rustc-rayon-core 0.2.0", - "smallvec", + "smallvec 0.6.10", "stable_deref_trait", ] @@ -3204,7 +3204,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "457a5c204ae2fdaa5bdb5b196e58ca59896870d80445fe423063c9453496e3ea" dependencies = [ "rustc-ap-serialize", - "smallvec", + "smallvec 0.6.10", ] [[package]] @@ -3250,7 +3250,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92679240e86f4583cc05f8dcf6439bdab87bac9e6555718469176de9bd52ba20" dependencies = [ "indexmap", - "smallvec", + "smallvec 0.6.10", ] [[package]] @@ -3270,7 +3270,7 @@ dependencies = [ "rustc-ap-serialize", "rustc-ap-syntax_pos", "scoped-tls", - "smallvec", + "smallvec 0.6.10", ] [[package]] @@ -3393,7 +3393,7 @@ dependencies = [ "crossbeam-utils 0.6.5", "serde", "serde_json", - "smallvec", + "smallvec 0.6.10", "syn 0.15.35", "url 2.1.0", "winapi 0.3.6", @@ -3404,7 +3404,7 @@ name = "rustc_apfloat" version = "0.0.0" dependencies = [ "bitflags", - "smallvec", + "smallvec 1.0.0", ] [[package]] @@ -3484,7 +3484,7 @@ dependencies = [ "rustc-rayon-core 0.3.0", "rustc_index", "serialize", - "smallvec", + "smallvec 1.0.0", "stable_deref_trait", ] @@ -3552,7 +3552,7 @@ name = "rustc_index" version = "0.0.0" dependencies = [ "serialize", - "smallvec", + "smallvec 1.0.0", ] [[package]] @@ -3579,7 +3579,7 @@ dependencies = [ "rustc_traits", "rustc_typeck", "serialize", - "smallvec", + "smallvec 1.0.0", "syntax", "syntax_expand", "syntax_ext", @@ -3650,7 +3650,7 @@ dependencies = [ "rustc_index", "rustc_target", "serialize", - "smallvec", + "smallvec 1.0.0", "stable_deref_trait", "syntax", "syntax_expand", @@ -3675,7 +3675,7 @@ dependencies = [ "rustc_lexer", "rustc_target", "serialize", - "smallvec", + "smallvec 1.0.0", "syntax", "syntax_pos", ] @@ -3746,7 +3746,7 @@ dependencies = [ "rustc_data_structures", "rustc_errors", "rustc_metadata", - "smallvec", + "smallvec 1.0.0", "syntax", "syntax_expand", "syntax_pos", @@ -3799,7 +3799,7 @@ dependencies = [ "rustc", "rustc_data_structures", "rustc_target", - "smallvec", + "smallvec 1.0.0", "syntax", "syntax_pos", ] @@ -3826,7 +3826,7 @@ dependencies = [ "rustc_errors", "rustc_index", "rustc_target", - "smallvec", + "smallvec 1.0.0", "syntax", "syntax_pos", ] @@ -4070,7 +4070,7 @@ name = "serialize" version = "0.0.0" dependencies = [ "indexmap", - "smallvec", + "smallvec 1.0.0", ] [[package]] @@ -4134,6 +4134,12 @@ version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7" +[[package]] +name = "smallvec" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ecf3b85f68e8abaa7555aa5abdb1153079387e60b718283d732f03897fcfc86" + [[package]] name = "socket2" version = "0.3.8" @@ -4359,7 +4365,7 @@ dependencies = [ "rustc_target", "scoped-tls", "serialize", - "smallvec", + "smallvec 1.0.0", "syntax_pos", ] @@ -4377,7 +4383,7 @@ dependencies = [ "rustc_target", "scoped-tls", "serialize", - "smallvec", + "smallvec 1.0.0", "syntax", "syntax_pos", ] @@ -4391,7 +4397,7 @@ dependencies = [ "rustc_data_structures", "rustc_errors", "rustc_target", - "smallvec", + "smallvec 1.0.0", "syntax", "syntax_expand", "syntax_pos", diff --git a/src/libarena/Cargo.toml b/src/libarena/Cargo.toml index 2643912f6d7d6..5158aab8b7dc5 100644 --- a/src/libarena/Cargo.toml +++ b/src/libarena/Cargo.toml @@ -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"] } diff --git a/src/librustc/Cargo.toml b/src/librustc/Cargo.toml index de67f46eba643..92b94af75d750 100644 --- a/src/librustc/Cargo.toml +++ b/src/librustc/Cargo.toml @@ -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" diff --git a/src/librustc/arena.rs b/src/librustc/arena.rs index 3daf0fc9df7a0..9b13a910c6174 100644 --- a/src/librustc/arena.rs +++ b/src/librustc/arena.rs @@ -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 diff --git a/src/librustc/ty/inhabitedness/def_id_forest.rs b/src/librustc/ty/inhabitedness/def_id_forest.rs index 63cc60d80aada..227fbf967c0d7 100644 --- a/src/librustc/ty/inhabitedness/def_id_forest.rs +++ b/src/librustc/ty/inhabitedness/def_id_forest.rs @@ -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 } diff --git a/src/librustc_apfloat/Cargo.toml b/src/librustc_apfloat/Cargo.toml index 4fc15f99e484e..726965e1e7180 100644 --- a/src/librustc_apfloat/Cargo.toml +++ b/src/librustc_apfloat/Cargo.toml @@ -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"] } diff --git a/src/librustc_data_structures/Cargo.toml b/src/librustc_data_structures/Cargo.toml index 065c8436ae06a..e79b3a81b9654 100644 --- a/src/librustc_data_structures/Cargo.toml +++ b/src/librustc_data_structures/Cargo.toml @@ -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] diff --git a/src/librustc_index/Cargo.toml b/src/librustc_index/Cargo.toml index b1ebc95e4881b..1435297f27ada 100644 --- a/src/librustc_index/Cargo.toml +++ b/src/librustc_index/Cargo.toml @@ -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"] } diff --git a/src/librustc_interface/Cargo.toml b/src/librustc_interface/Cargo.toml index 0d8d765a572c2..98e4f974a9f23 100644 --- a/src/librustc_interface/Cargo.toml +++ b/src/librustc_interface/Cargo.toml @@ -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" } diff --git a/src/librustc_metadata/Cargo.toml b/src/librustc_metadata/Cargo.toml index 18192e35f8a20..5bc047e001b67 100644 --- a/src/librustc_metadata/Cargo.toml +++ b/src/librustc_metadata/Cargo.toml @@ -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" } diff --git a/src/librustc_mir/Cargo.toml b/src/librustc_mir/Cargo.toml index f0cdcf2136bfa..8c62640353a9e 100644 --- a/src/librustc_mir/Cargo.toml +++ b/src/librustc_mir/Cargo.toml @@ -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"] } diff --git a/src/librustc_resolve/Cargo.toml b/src/librustc_resolve/Cargo.toml index 08ce7fd520e30..33b2bd36b7ded 100644 --- a/src/librustc_resolve/Cargo.toml +++ b/src/librustc_resolve/Cargo.toml @@ -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"] } diff --git a/src/librustc_traits/Cargo.toml b/src/librustc_traits/Cargo.toml index b86a3a5e9639b..a9b184a7b3068 100644 --- a/src/librustc_traits/Cargo.toml +++ b/src/librustc_traits/Cargo.toml @@ -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"] } diff --git a/src/librustc_typeck/Cargo.toml b/src/librustc_typeck/Cargo.toml index a6644258be280..60a7a2f45989c 100644 --- a/src/librustc_typeck/Cargo.toml +++ b/src/librustc_typeck/Cargo.toml @@ -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" } diff --git a/src/libserialize/Cargo.toml b/src/libserialize/Cargo.toml index c302bcf95dcad..96a0d51bc716d 100644 --- a/src/libserialize/Cargo.toml +++ b/src/libserialize/Cargo.toml @@ -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"] } diff --git a/src/libsyntax/Cargo.toml b/src/libsyntax/Cargo.toml index 3ce47e6a7b8cd..b1839cc05cd1f 100644 --- a/src/libsyntax/Cargo.toml +++ b/src/libsyntax/Cargo.toml @@ -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"] } diff --git a/src/libsyntax/tokenstream.rs b/src/libsyntax/tokenstream.rs index 7e0582797c7ac..a51d208704ade 100644 --- a/src/libsyntax/tokenstream.rs +++ b/src/libsyntax/tokenstream.rs @@ -243,7 +243,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 diff --git a/src/libsyntax_expand/Cargo.toml b/src/libsyntax_expand/Cargo.toml index f063753f59943..d98b9457a625f 100644 --- a/src/libsyntax_expand/Cargo.toml +++ b/src/libsyntax_expand/Cargo.toml @@ -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" } diff --git a/src/libsyntax_ext/Cargo.toml b/src/libsyntax_ext/Cargo.toml index 440873f3c2b2d..703d51e1c4c3b 100644 --- a/src/libsyntax_ext/Cargo.toml +++ b/src/libsyntax_ext/Cargo.toml @@ -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" }