diff options
| author | bors <bors@rust-lang.org> | 2025-03-23 10:00:10 +0000 | 
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-03-23 10:00:10 +0000 | 
| commit | 97fc1f62d8c3f9b725b827540389a8874501c96e (patch) | |
| tree | 6d5d93bad75ecbd733c9b908b32b49708e27a2bb /compiler | |
| parent | 60a3084f64607e86dd7715d72f11764cd500c364 (diff) | |
| parent | 5950c862bd3c2c410197d17d173cade26d38f041 (diff) | |
| download | rust-97fc1f62d8c3f9b725b827540389a8874501c96e.tar.gz rust-97fc1f62d8c3f9b725b827540389a8874501c96e.zip | |
Auto merge of #138602 - Veykril:push-purxoytpktpu, r=SparrowLii
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. This allows the crate to built without having to wait for `syn` (pulled in by `rustc_index_macros`) Alternatively we could inline the macro, though from the looks of it that will run into trouble with `rustc_randomized_layouts`
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_parse_format/Cargo.toml | 4 | ||||
| -rw-r--r-- | compiler/rustc_parse_format/src/lib.rs | 2 | 
2 files changed, 4 insertions, 2 deletions
| diff --git a/compiler/rustc_parse_format/Cargo.toml b/compiler/rustc_parse_format/Cargo.toml index d6c3bd9877c..289e062fb5e 100644 --- a/compiler/rustc_parse_format/Cargo.toml +++ b/compiler/rustc_parse_format/Cargo.toml @@ -8,5 +8,7 @@ edition = "2024" rustc_lexer = { path = "../rustc_lexer" } # tidy-alphabetical-end -[target.'cfg(target_pointer_width = "64")'.dependencies] +[target.'cfg(target_pointer_width = "64")'.dev-dependencies] +# tidy-alphabetical-start rustc_index = { path = "../rustc_index", default-features = false } +# tidy-alphabetical-end diff --git a/compiler/rustc_parse_format/src/lib.rs b/compiler/rustc_parse_format/src/lib.rs index 5b8a2fe52d3..97931742985 100644 --- a/compiler/rustc_parse_format/src/lib.rs +++ b/compiler/rustc_parse_format/src/lib.rs @@ -1105,7 +1105,7 @@ fn unescape_string(string: &str) -> Option<String> { } // Assert a reasonable size for `Piece` -#[cfg(target_pointer_width = "64")] +#[cfg(all(test, target_pointer_width = "64"))] rustc_index::static_assert_size!(Piece<'_>, 16); #[cfg(test)] | 
