Skip to content
/ rust Public
forked from rust-lang/rust

Commit 5950c86

Browse files
committed
Slim rustc_parse_format dependencies down
`rustc_index` is only used for its size assertion macro, so demote it to a dev-dependency gated under testing instead
1 parent f08d5c0 commit 5950c86

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Diff for: compiler/rustc_parse_format/Cargo.toml

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,7 @@ edition = "2024"
88
rustc_lexer = { path = "../rustc_lexer" }
99
# tidy-alphabetical-end
1010

11-
[target.'cfg(target_pointer_width = "64")'.dependencies]
11+
[target.'cfg(target_pointer_width = "64")'.dev-dependencies]
12+
# tidy-alphabetical-start
1213
rustc_index = { path = "../rustc_index", default-features = false }
14+
# tidy-alphabetical-end

Diff for: compiler/rustc_parse_format/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1105,7 +1105,7 @@ fn unescape_string(string: &str) -> Option<String> {
11051105
}
11061106

11071107
// Assert a reasonable size for `Piece`
1108-
#[cfg(target_pointer_width = "64")]
1108+
#[cfg(all(test, target_pointer_width = "64"))]
11091109
rustc_index::static_assert_size!(Piece<'_>, 16);
11101110

11111111
#[cfg(test)]

0 commit comments

Comments
 (0)