Skip to content

Commit e9b8cc6

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 10bcdad commit e9b8cc6

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

compiler/rustc_parse_format/Cargo.toml

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ edition = "2024"
55

66
[dependencies]
77
# tidy-alphabetical-start
8-
rustc_index = { path = "../rustc_index", default-features = false }
98
rustc_lexer = { path = "../rustc_lexer" }
109
# tidy-alphabetical-end
10+
11+
[dev-dependencies]
12+
# tidy-alphabetical-start
13+
rustc_index = { path = "../rustc_index", default-features = false }
14+
# tidy-alphabetical-end

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)