Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit b221c9b

Browse files
committed
hir: Don't allocate for intrinsic inputs
This isn't exactly a hot path, but it does allocate for data with a statically known length. `arrayvec` is already in the crate graph, so use it here to avoid any allocation.
1 parent 25cdf1f commit b221c9b

File tree

3 files changed

+231
-199
lines changed

3 files changed

+231
-199
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3740,6 +3740,7 @@ dependencies = [
37403740
name = "rustc_hir_analysis"
37413741
version = "0.0.0"
37423742
dependencies = [
3743+
"arrayvec",
37433744
"itertools",
37443745
"rustc_abi",
37453746
"rustc_arena",

compiler/rustc_hir_analysis/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ doctest = false
99

1010
[dependencies]
1111
# tidy-alphabetical-start
12+
arrayvec = { version = "0.7", default-features = false }
1213
itertools = "0.12"
1314
rustc_abi = { path = "../rustc_abi" }
1415
rustc_arena = { path = "../rustc_arena" }

0 commit comments

Comments
 (0)