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).
This commit is contained in:
Josh Triplett
2026-10-07 17:22:58 -07:00
parent 8d1a764304
commit 611e0fdb82
17 changed files with 18 additions and 18 deletions

View File

@@ -5703,9 +5703,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"

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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"

View File

@@ -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

View File

@@ -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]

View File

@@ -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

View File

@@ -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