Skip to content

Commit ae2c322

Browse files
committed
Auto merge of #16150 - Veykril:text-fixture, r=Veykril
internal: Move out `WithFixture` into dev-dep only crate
2 parents 5daf090 + f49a2fe commit ae2c322

File tree

59 files changed

+189
-119
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+189
-119
lines changed

Cargo.lock

Lines changed: 23 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,9 @@ proc-macro-srv = { path = "./crates/proc-macro-srv", version = "0.0.0" }
7070
proc-macro-srv-cli = { path = "./crates/proc-macro-srv-cli", version = "0.0.0" }
7171
profile = { path = "./crates/profile", version = "0.0.0" }
7272
project-model = { path = "./crates/project-model", version = "0.0.0" }
73-
sourcegen = { path = "./crates/sourcegen", version = "0.0.0" }
7473
span = { path = "./crates/span", version = "0.0.0" }
7574
stdx = { path = "./crates/stdx", version = "0.0.0" }
7675
syntax = { path = "./crates/syntax", version = "0.0.0" }
77-
test-utils = { path = "./crates/test-utils", version = "0.0.0" }
7876
text-edit = { path = "./crates/text-edit", version = "0.0.0" }
7977
toolchain = { path = "./crates/toolchain", version = "0.0.0" }
8078
tt = { path = "./crates/tt", version = "0.0.0" }
@@ -84,6 +82,9 @@ rustc-dependencies = { path = "./crates/rustc-dependencies", version = "0.0.0" }
8482

8583
# local crates that aren't published to crates.io. These should not have versions.
8684
proc-macro-test = { path = "./crates/proc-macro-test" }
85+
sourcegen = { path = "./crates/sourcegen" }
86+
test-fixture = { path = "./crates/test-fixture" }
87+
test-utils = { path = "./crates/test-utils" }
8788

8889
# In-tree crates that are published separately and follow semver. See lib/README.md
8990
line-index = { version = "0.1.1" }
@@ -94,8 +95,11 @@ lsp-server = { version = "0.7.4" }
9495
anyhow = "1.0.75"
9596
bitflags = "2.4.1"
9697
cargo_metadata = "0.18.1"
98+
command-group = "2.0.1"
99+
crossbeam-channel = "0.5.8"
97100
dissimilar = "1.0.7"
98101
either = "1.9.0"
102+
expect-test = "1.4.0"
99103
hashbrown = { version = "0.14", features = [
100104
"inline-more",
101105
], default-features = false }
@@ -125,5 +129,6 @@ tracing-subscriber = { version = "0.3.18", default-features = false, features =
125129
triomphe = { version = "0.1.10", default-features = false, features = ["std"] }
126130
xshell = "0.2.5"
127131

132+
128133
# We need to freeze the version of the crate, as the raw-api feature is considered unstable
129134
dashmap = { version = "=5.5.3", features = ["raw-api"] }

crates/base-db/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,5 @@ cfg.workspace = true
2222
profile.workspace = true
2323
stdx.workspace = true
2424
syntax.workspace = true
25-
test-utils.workspace = true
2625
vfs.workspace = true
2726
span.workspace = true

crates/cfg/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ rust-version.workspace = true
1212
doctest = false
1313

1414
[dependencies]
15-
rustc-hash = "1.1.0"
15+
rustc-hash.workspace = true
1616

1717
# locals deps
1818
tt.workspace = true

crates/flycheck/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ doctest = false
1313

1414
[dependencies]
1515
cargo_metadata.workspace = true
16-
crossbeam-channel = "0.5.8"
16+
crossbeam-channel.workspace = true
1717
tracing.workspace = true
18-
rustc-hash = "1.1.0"
18+
rustc-hash.workspace = true
1919
serde_json.workspace = true
2020
serde.workspace = true
21-
command-group = "2.0.1"
21+
command-group.workspace = true
2222

2323
# local deps
2424
paths.workspace = true

crates/hir-def/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ indexmap.workspace = true
2323
itertools.workspace = true
2424
la-arena.workspace = true
2525
once_cell = "1.17.0"
26-
rustc-hash = "1.1.0"
26+
rustc-hash.workspace = true
2727
tracing.workspace = true
2828
smallvec.workspace = true
2929
hashbrown.workspace = true
@@ -46,10 +46,11 @@ span.workspace = true
4646

4747

4848
[dev-dependencies]
49-
expect-test = "1.4.0"
49+
expect-test.workspace = true
5050

5151
# local deps
5252
test-utils.workspace = true
53+
test-fixture.workspace = true
5354

5455
[features]
5556
in-rust-tree = ["rustc-dependencies/in-rust-tree"]

crates/hir-def/src/body/scope.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,9 @@ fn compute_expr_scopes(expr: ExprId, body: &Body, scopes: &mut ExprScopes, scope
268268
#[cfg(test)]
269269
mod tests {
270270
use base_db::{FileId, SourceDatabase};
271-
use hir_expand::{fixture::WithFixture, name::AsName, InFile};
271+
use hir_expand::{name::AsName, InFile};
272272
use syntax::{algo::find_node_at_offset, ast, AstNode};
273+
use test_fixture::WithFixture;
273274
use test_utils::{assert_eq_text, extract_offset};
274275

275276
use crate::{db::DefDatabase, test_db::TestDB, FunctionId, ModuleDefId};

crates/hir-def/src/body/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ mod block;
22

33
use base_db::SourceDatabase;
44
use expect_test::{expect, Expect};
5-
use hir_expand::fixture::WithFixture;
5+
use test_fixture::WithFixture;
66

77
use crate::{test_db::TestDB, ModuleDefId};
88

crates/hir-def/src/find_path.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,8 +585,9 @@ fn find_local_import_locations(
585585

586586
#[cfg(test)]
587587
mod tests {
588-
use hir_expand::{db::ExpandDatabase, fixture::WithFixture};
588+
use hir_expand::db::ExpandDatabase;
589589
use syntax::ast::AstNode;
590+
use test_fixture::WithFixture;
590591

591592
use crate::test_db::TestDB;
592593

crates/hir-def/src/import_map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ pub fn search_dependencies(
475475
mod tests {
476476
use base_db::{SourceDatabase, Upcast};
477477
use expect_test::{expect, Expect};
478-
use hir_expand::fixture::WithFixture;
478+
use test_fixture::WithFixture;
479479

480480
use crate::{db::DefDatabase, test_db::TestDB, ItemContainerId, Lookup};
481481

0 commit comments

Comments
 (0)