diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-11-06 07:03:08 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-06 07:03:08 +0100 |
| commit | 167b8fedd615becb4e614ae0635a0e488cce70c4 (patch) | |
| tree | 21d9dbb2693a5ea4f8fc08b7241021dd1e14b92c /src | |
| parent | 98cbe179032726052d672334bb1a82cd4f604072 (diff) | |
| parent | 90b8d34c9f0d17c948801f676a96800e8b038508 (diff) | |
| download | rust-167b8fedd615becb4e614ae0635a0e488cce70c4.tar.gz rust-167b8fedd615becb4e614ae0635a0e488cce70c4.zip | |
Rollup merge of #66086 - RalfJung:smallvec, r=nagisa
bump smallvec to 1.0 This includes https://github.com/servo/rust-smallvec/pull/162, fixing an unsoundness in smallvec. See https://github.com/servo/rust-smallvec/pull/175 for the 1.0 release announcement. Cc @mbrubeck @emilio
Diffstat (limited to 'src')
| -rw-r--r-- | src/libarena/Cargo.toml | 2 | ||||
| -rw-r--r-- | src/librustc/Cargo.toml | 2 | ||||
| -rw-r--r-- | src/librustc/arena.rs | 2 | ||||
| -rw-r--r-- | src/librustc/ty/inhabitedness/def_id_forest.rs | 10 | ||||
| -rw-r--r-- | src/librustc_apfloat/Cargo.toml | 2 | ||||
| -rw-r--r-- | src/librustc_data_structures/Cargo.toml | 2 | ||||
| -rw-r--r-- | src/librustc_index/Cargo.toml | 2 | ||||
| -rw-r--r-- | src/librustc_interface/Cargo.toml | 2 | ||||
| -rw-r--r-- | src/librustc_metadata/Cargo.toml | 2 | ||||
| -rw-r--r-- | src/librustc_mir/Cargo.toml | 2 | ||||
| -rw-r--r-- | src/librustc_resolve/Cargo.toml | 2 | ||||
| -rw-r--r-- | src/librustc_traits/Cargo.toml | 2 | ||||
| -rw-r--r-- | src/librustc_typeck/Cargo.toml | 2 | ||||
| -rw-r--r-- | src/libserialize/Cargo.toml | 2 | ||||
| -rw-r--r-- | src/libsyntax/Cargo.toml | 2 | ||||
| -rw-r--r-- | src/libsyntax/tokenstream.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax_expand/Cargo.toml | 2 | ||||
| -rw-r--r-- | src/libsyntax_ext/Cargo.toml | 2 |
18 files changed, 22 insertions, 22 deletions
diff --git a/src/libarena/Cargo.toml b/src/libarena/Cargo.toml index 2643912f6d7..5158aab8b7d 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 de67f46eba6..92b94af75d7 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 3daf0fc9df7..9b13a910c61 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 63cc60d80aa..227fbf967c0 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 4fc15f99e48..726965e1e71 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 065c8436ae0..e79b3a81b96 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 b1ebc95e488..1435297f27a 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 0d8d765a572..98e4f974a9f 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 18192e35f8a..5bc047e001b 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 f0cdcf2136b..8c62640353a 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 08ce7fd520e..33b2bd36b7d 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 b86a3a5e963..a9b184a7b30 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 a6644258be2..60a7a2f4598 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 c302bcf95dc..96a0d51bc71 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 3ce47e6a7b8..b1839cc05cd 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 7e0582797c7..a51d208704a 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 f063753f599..d98b9457a62 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 440873f3c2b..703d51e1c4c 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" } |
