about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-09-06 19:31:49 +0200
committerGitHub <noreply@github.com>2023-09-06 19:31:49 +0200
commit7498dca3115d5e8903205679003a9a0e50873ce5 (patch)
tree18c240fa34d1c71baf021af7fa7fdfbd3c937542
parent4a31cc859b376b853ab40961c26b99136a6a1e61 (diff)
parent2bba056187220659e3e64f7183494273e3c72e62 (diff)
downloadrust-7498dca3115d5e8903205679003a9a0e50873ce5.tar.gz
rust-7498dca3115d5e8903205679003a9a0e50873ce5.zip
Rollup merge of #115574 - Veykril:rustc_parse_format-dep, r=Nilstrieb
Replace `rustc_data_structures` dependency with `rustc_index` in `rustc_parse_format`

`rustc_data_structures` is only used for the `static_assert_size` macro, yet that is defined in `rustc_index` and merely re-exported. `rustc_index` is a lot more lightweight than `rustc_data_structures` which would make this a lot more reusable for rust-analyzer.
-rw-r--r--Cargo.lock2
-rw-r--r--compiler/rustc_parse_format/Cargo.toml2
-rw-r--r--compiler/rustc_parse_format/src/lib.rs2
3 files changed, 3 insertions, 3 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 35a9fdccf9c..4cb2a584e6a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4175,7 +4175,7 @@ dependencies = [
 name = "rustc_parse_format"
 version = "0.0.0"
 dependencies = [
- "rustc_data_structures",
+ "rustc_index",
  "rustc_lexer",
 ]
 
diff --git a/compiler/rustc_parse_format/Cargo.toml b/compiler/rustc_parse_format/Cargo.toml
index 72da398d3fc..14330353239 100644
--- a/compiler/rustc_parse_format/Cargo.toml
+++ b/compiler/rustc_parse_format/Cargo.toml
@@ -5,4 +5,4 @@ edition = "2021"
 
 [dependencies]
 rustc_lexer = { path = "../rustc_lexer" }
-rustc_data_structures = { path = "../rustc_data_structures" }
+rustc_index = { path = "../rustc_index", default-features = false }
diff --git a/compiler/rustc_parse_format/src/lib.rs b/compiler/rustc_parse_format/src/lib.rs
index 88452ccdf05..a6c7eb8d912 100644
--- a/compiler/rustc_parse_format/src/lib.rs
+++ b/compiler/rustc_parse_format/src/lib.rs
@@ -1011,7 +1011,7 @@ fn unescape_string(string: &str) -> Option<string::String> {
 
 // Assert a reasonable size for `Piece`
 #[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
-rustc_data_structures::static_assert_size!(Piece<'_>, 16);
+rustc_index::static_assert_size!(Piece<'_>, 16);
 
 #[cfg(test)]
 mod tests;