mirror of
https://github.com/allankoechke/rust.git
synced 2026-11-30 11:05:36 +00:00
Auto merge of #163959 - joshtriplett:upgrade-thin-vec, r=nnethercote
Upgrade `thin-vec` to 0.2.21, including fix for `.collect()` capacity This includes https://github.com/mozilla/thin-vec/pull/99 , which makes thin-vec respect size_hint when collecting. In particular, this causes collections of 1-3 items to not be grown to a capacity of 4. The compiler has a lot of `TinyVec`s in the 1-3 range, so this substantially helps memory, and seems neutral on instructions. For aws-sdk-ec2 full check, this saves 30.69 MiB max-rss (0.55% of peak RSS). --- Merging this avoids the need to work around it in other work (e.g. by replacing `.collect()` with something calling `ThinVec::with_capacity(...)` first).
This commit is contained in:
@@ -5704,9 +5704,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "thin-vec"
|
||||
version = "0.2.19"
|
||||
version = "0.2.21"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "79def32ffcd477db1ff26f76dab9e3a91f0bd42a85ca96577089b24623056f9d"
|
||||
checksum = "d6a4b9ba8738cb4a4f399d37e266becfd475e75eb73425b87a05a2f2039ba63e"
|
||||
|
||||
[[package]]
|
||||
name = "thiserror"
|
||||
|
||||
@@ -15,6 +15,6 @@ rustc_macros = { path = "../rustc_macros" }
|
||||
rustc_serialize = { path = "../rustc_serialize" }
|
||||
rustc_span = { path = "../rustc_span" }
|
||||
smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
|
||||
thin-vec = "0.2.19"
|
||||
thin-vec = "0.2.21"
|
||||
tracing = "0.1"
|
||||
# tidy-alphabetical-end
|
||||
|
||||
@@ -24,6 +24,6 @@ rustc_session = { path = "../rustc_session" }
|
||||
rustc_span = { path = "../rustc_span" }
|
||||
rustc_target = { path = "../rustc_target" }
|
||||
smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
|
||||
thin-vec = "0.2.19"
|
||||
thin-vec = "0.2.21"
|
||||
tracing = "0.1"
|
||||
# tidy-alphabetical-end
|
||||
|
||||
@@ -12,5 +12,5 @@ rustc_span = { path = "../rustc_span" }
|
||||
|
||||
[dev-dependencies]
|
||||
# tidy-alphabetical-start
|
||||
thin-vec = "0.2.19"
|
||||
thin-vec = "0.2.21"
|
||||
# tidy-alphabetical-end
|
||||
|
||||
@@ -15,6 +15,6 @@ rustc_serialize = { path = "../rustc_serialize" }
|
||||
rustc_span = { path = "../rustc_span" }
|
||||
rustc_structures = { path = "../rustc_structures" }
|
||||
smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
|
||||
thin-vec = "0.2.18"
|
||||
thin-vec = "0.2.21"
|
||||
tracing = "0.1"
|
||||
# tidy-alphabetical-end
|
||||
|
||||
@@ -21,5 +21,5 @@ rustc_session = { path = "../rustc_session" }
|
||||
rustc_span = { path = "../rustc_span" }
|
||||
rustc_structures = { path = "../rustc_structures" }
|
||||
rustc_target = { path = "../rustc_target" }
|
||||
thin-vec = "0.2.19"
|
||||
thin-vec = "0.2.21"
|
||||
# tidy-alphabetical-end
|
||||
|
||||
@@ -29,7 +29,7 @@ rustc_session = { path = "../rustc_session" }
|
||||
rustc_span = { path = "../rustc_span" }
|
||||
rustc_target = { path = "../rustc_target" }
|
||||
smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
|
||||
thin-vec = "0.2.19"
|
||||
thin-vec = "0.2.21"
|
||||
tracing = "0.1"
|
||||
# tidy-alphabetical-end
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ smallvec = { version = "1.8.1", features = [
|
||||
"may_dangle",
|
||||
] }
|
||||
tempfile = "3.2"
|
||||
thin-vec = "0.2.19"
|
||||
thin-vec = "0.2.21"
|
||||
tracing = "0.1"
|
||||
# tidy-alphabetical-end
|
||||
|
||||
|
||||
@@ -29,6 +29,6 @@ rustc_session = { path = "../rustc_session" }
|
||||
rustc_span = { path = "../rustc_span" }
|
||||
rustc_structures = { path = "../rustc_structures" }
|
||||
smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
|
||||
thin-vec = "0.2.19"
|
||||
thin-vec = "0.2.21"
|
||||
tracing = "0.1"
|
||||
# tidy-alphabetical-end
|
||||
|
||||
@@ -17,6 +17,6 @@ rustc_middle = { path = "../rustc_middle" }
|
||||
rustc_span = { path = "../rustc_span" }
|
||||
rustc_type_ir = { path = "../rustc_type_ir" }
|
||||
smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
|
||||
thin-vec = "0.2.19"
|
||||
thin-vec = "0.2.21"
|
||||
tracing = "0.1"
|
||||
# tidy-alphabetical-end
|
||||
|
||||
@@ -34,7 +34,7 @@ rustc_target = { path = "../rustc_target" }
|
||||
rustc_thread_pool = { path = "../rustc_thread_pool" }
|
||||
rustc_type_ir = { path = "../rustc_type_ir" }
|
||||
smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
|
||||
thin-vec = "0.2.19"
|
||||
thin-vec = "0.2.21"
|
||||
tracing = "0.1"
|
||||
# tidy-alphabetical-end
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ rustc_index = { path = "../rustc_index", default-features = false }
|
||||
rustc_macros = { path = "../rustc_macros", optional = true }
|
||||
rustc_type_ir = { path = "../rustc_type_ir", default-features = false }
|
||||
rustc_type_ir_macros = { path = "../rustc_type_ir_macros" }
|
||||
thin-vec = "0.2.19"
|
||||
thin-vec = "0.2.21"
|
||||
tracing = "0.1"
|
||||
# tidy-alphabetical-end
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ rustc_lint_defs = { path = "../rustc_lint_defs" }
|
||||
rustc_macros = { path = "../rustc_macros" }
|
||||
rustc_session = { path = "../rustc_session" }
|
||||
rustc_span = { path = "../rustc_span" }
|
||||
thin-vec = "0.2.19"
|
||||
thin-vec = "0.2.21"
|
||||
tracing = "0.1"
|
||||
unicode-normalization = "0.1.25"
|
||||
unicode-width = "0.2.2"
|
||||
|
||||
@@ -29,6 +29,6 @@ rustc_session = { path = "../rustc_session" }
|
||||
rustc_span = { path = "../rustc_span" }
|
||||
rustc_structures = { path = "../rustc_structures" }
|
||||
smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
|
||||
thin-vec = "0.2.19"
|
||||
thin-vec = "0.2.21"
|
||||
tracing = "0.1"
|
||||
# tidy-alphabetical-end
|
||||
|
||||
@@ -8,7 +8,7 @@ edition = "2024"
|
||||
indexmap = "2.0.0"
|
||||
rustc_hashes = { path = "../rustc_hashes" }
|
||||
smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
|
||||
thin-vec = "0.2.19"
|
||||
thin-vec = "0.2.21"
|
||||
# tidy-alphabetical-end
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
@@ -24,6 +24,6 @@ rustc_span = { path = "../rustc_span" }
|
||||
rustc_structures = { path = "../rustc_structures" }
|
||||
rustc_transmute = { path = "../rustc_transmute", features = ["rustc"] }
|
||||
smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
|
||||
thin-vec = "0.2.19"
|
||||
thin-vec = "0.2.21"
|
||||
tracing = "0.1"
|
||||
# tidy-alphabetical-end
|
||||
|
||||
@@ -23,7 +23,7 @@ rustc_type_ir_macros = { path = "../rustc_type_ir_macros" }
|
||||
smallvec = { version = "1.8.1", default-features = false, features = [
|
||||
"const_generics",
|
||||
] }
|
||||
thin-vec = "0.2.19"
|
||||
thin-vec = "0.2.21"
|
||||
tracing = "0.1"
|
||||
# tidy-alphabetical-end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user