Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump smallvec to 1.0 #66086

Merged
merged 1 commit into from
Nov 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
56 changes: 31 additions & 25 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ name = "arena"
version = "0.0.0"
dependencies = [
"rustc_data_structures",
"smallvec",
"smallvec 1.0.0",
]

[[package]]
Expand Down Expand Up @@ -486,7 +486,7 @@ dependencies = [
"regex-syntax",
"semver",
"serde",
"smallvec",
"smallvec 0.6.10",
"toml",
"unicode-normalization",
"url 2.1.0",
Expand Down Expand Up @@ -654,7 +654,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]]
Expand Down Expand Up @@ -2391,7 +2391,7 @@ dependencies = [
"libc",
"rand 0.6.1",
"rustc_version",
"smallvec",
"smallvec 0.6.10",
"winapi 0.3.6",
]

Expand All @@ -2406,7 +2406,7 @@ dependencies = [
"libc",
"redox_syscall",
"rustc_version",
"smallvec",
"smallvec 0.6.10",
"winapi 0.3.6",
]

Expand Down Expand Up @@ -3134,7 +3134,7 @@ dependencies = [
"rustc_target",
"scoped-tls",
"serialize",
"smallvec",
"smallvec 1.0.0",
"syntax",
"syntax_pos",
]
Expand All @@ -3146,7 +3146,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]]
Expand Down Expand Up @@ -3175,7 +3175,7 @@ dependencies = [
"rustc-hash",
"rustc-rayon 0.2.0",
"rustc-rayon-core 0.2.0",
"smallvec",
"smallvec 0.6.10",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose this will end up automatically upgrading itself when this crate is auto-published?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but bumping the rustc-ap crates in rls/rustfmt still needs to happen manually.

"stable_deref_trait",
]

Expand Down Expand Up @@ -3203,7 +3203,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "457a5c204ae2fdaa5bdb5b196e58ca59896870d80445fe423063c9453496e3ea"
dependencies = [
"rustc-ap-serialize",
"smallvec",
"smallvec 0.6.10",
]

[[package]]
Expand Down Expand Up @@ -3249,7 +3249,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92679240e86f4583cc05f8dcf6439bdab87bac9e6555718469176de9bd52ba20"
dependencies = [
"indexmap",
"smallvec",
"smallvec 0.6.10",
]

[[package]]
Expand All @@ -3269,7 +3269,7 @@ dependencies = [
"rustc-ap-serialize",
"rustc-ap-syntax_pos",
"scoped-tls",
"smallvec",
"smallvec 0.6.10",
]

[[package]]
Expand Down Expand Up @@ -3392,7 +3392,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",
Expand All @@ -3403,7 +3403,7 @@ name = "rustc_apfloat"
version = "0.0.0"
dependencies = [
"bitflags",
"smallvec",
"smallvec 1.0.0",
]

[[package]]
Expand Down Expand Up @@ -3483,7 +3483,7 @@ dependencies = [
"rustc-rayon-core 0.3.0",
"rustc_index",
"serialize",
"smallvec",
"smallvec 1.0.0",
"stable_deref_trait",
]

Expand Down Expand Up @@ -3551,7 +3551,7 @@ name = "rustc_index"
version = "0.0.0"
dependencies = [
"serialize",
"smallvec",
"smallvec 1.0.0",
]

[[package]]
Expand All @@ -3578,7 +3578,7 @@ dependencies = [
"rustc_traits",
"rustc_typeck",
"serialize",
"smallvec",
"smallvec 1.0.0",
"syntax",
"syntax_expand",
"syntax_ext",
Expand Down Expand Up @@ -3649,7 +3649,7 @@ dependencies = [
"rustc_index",
"rustc_target",
"serialize",
"smallvec",
"smallvec 1.0.0",
"stable_deref_trait",
"syntax",
"syntax_expand",
Expand All @@ -3674,7 +3674,7 @@ dependencies = [
"rustc_lexer",
"rustc_target",
"serialize",
"smallvec",
"smallvec 1.0.0",
"syntax",
"syntax_pos",
]
Expand Down Expand Up @@ -3745,7 +3745,7 @@ dependencies = [
"rustc_data_structures",
"rustc_errors",
"rustc_metadata",
"smallvec",
"smallvec 1.0.0",
"syntax",
"syntax_expand",
"syntax_pos",
Expand Down Expand Up @@ -3798,7 +3798,7 @@ dependencies = [
"rustc",
"rustc_data_structures",
"rustc_target",
"smallvec",
"smallvec 1.0.0",
"syntax",
"syntax_pos",
]
Expand All @@ -3825,7 +3825,7 @@ dependencies = [
"rustc_errors",
"rustc_index",
"rustc_target",
"smallvec",
"smallvec 1.0.0",
"syntax",
"syntax_pos",
]
Expand Down Expand Up @@ -4069,7 +4069,7 @@ name = "serialize"
version = "0.0.0"
dependencies = [
"indexmap",
"smallvec",
"smallvec 1.0.0",
]

[[package]]
Expand Down Expand Up @@ -4133,6 +4133,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"
Expand Down Expand Up @@ -4358,7 +4364,7 @@ dependencies = [
"rustc_target",
"scoped-tls",
"serialize",
"smallvec",
"smallvec 1.0.0",
"syntax_pos",
]

Expand All @@ -4376,7 +4382,7 @@ dependencies = [
"rustc_target",
"scoped-tls",
"serialize",
"smallvec",
"smallvec 1.0.0",
"syntax",
"syntax_pos",
]
Expand All @@ -4390,7 +4396,7 @@ dependencies = [
"rustc_data_structures",
"rustc_errors",
"rustc_target",
"smallvec",
"smallvec 1.0.0",
"syntax",
"syntax_expand",
"syntax_pos",
Expand Down
2 changes: 1 addition & 1 deletion src/libarena/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
2 changes: 1 addition & 1 deletion src/librustc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion src/librustc/arena.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions src/librustc/ty/inhabitedness/def_id_forest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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) {
Expand All @@ -110,7 +110,7 @@ impl<'tcx> DefIdForest {
}

mem::swap(&mut next_ret, &mut ret.root_ids);
next_ret.drain();
next_ret.drain(..);
}
ret
}
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_apfloat/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
2 changes: 1 addition & 1 deletion src/librustc_data_structures/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_index/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
2 changes: 1 addition & 1 deletion src/librustc_interface/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_metadata/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_mir/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
2 changes: 1 addition & 1 deletion src/librustc_resolve/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
2 changes: 1 addition & 1 deletion src/librustc_traits/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
2 changes: 1 addition & 1 deletion src/librustc_typeck/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
2 changes: 1 addition & 1 deletion src/libserialize/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
2 changes: 1 addition & 1 deletion src/libsyntax/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
2 changes: 1 addition & 1 deletion src/libsyntax/tokenstream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax_expand/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }