Skip to content

Commit 7fdb7bd

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 493c38b commit 7fdb7bd

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
@@ -6,6 +6,10 @@ edition = "2024"
66
[dependencies]
77
# tidy-alphabetical-start
88
literal-escaper = { path = "../../library/literal-escaper" }
9-
rustc_index = { path = "../rustc_index", default-features = false }
109
rustc_lexer = { path = "../rustc_lexer" }
1110
# tidy-alphabetical-end
11+
12+
[dev-dependencies]
13+
# tidy-alphabetical-start
14+
rustc_index = { path = "../rustc_index", default-features = false }
15+
# tidy-alphabetical-end

compiler/rustc_parse_format/src/lib.rs

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

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

11121112
#[cfg(test)]

0 commit comments

Comments
 (0)