diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-06-14 17:46:25 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-06-14 17:46:25 +0100 |
commit | 38ae18b7592f97a7058d97928307bccbd881a582 (patch) | |
tree | 5f6f59f48f05999495654bf2e4250e029e6f010f /crates/base_db/src | |
parent | 401d79ac0674ec62689949c3a531836420cb9beb (diff) | |
parent | 4768e5fb23c058eba90f0a1dcd6e9d5c0ecdee1b (diff) |
Merge #9272
9272: internal: move diagnostics to a dedicated crate r=matklad a=matklad
bors r+
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/base_db/src')
-rw-r--r-- | crates/base_db/src/fixture.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crates/base_db/src/fixture.rs b/crates/base_db/src/fixture.rs index da4afb5eb..1b17db102 100644 --- a/crates/base_db/src/fixture.rs +++ b/crates/base_db/src/fixture.rs | |||
@@ -24,6 +24,14 @@ pub trait WithFixture: Default + SourceDatabaseExt + 'static { | |||
24 | (db, fixture.files[0]) | 24 | (db, fixture.files[0]) |
25 | } | 25 | } |
26 | 26 | ||
27 | fn with_many_files(ra_fixture: &str) -> (Self, Vec<FileId>) { | ||
28 | let fixture = ChangeFixture::parse(ra_fixture); | ||
29 | let mut db = Self::default(); | ||
30 | fixture.change.apply(&mut db); | ||
31 | assert!(fixture.file_position.is_none()); | ||
32 | (db, fixture.files) | ||
33 | } | ||
34 | |||
27 | fn with_files(ra_fixture: &str) -> Self { | 35 | fn with_files(ra_fixture: &str) -> Self { |
28 | let fixture = ChangeFixture::parse(ra_fixture); | 36 | let fixture = ChangeFixture::parse(ra_fixture); |
29 | let mut db = Self::default(); | 37 | let mut db = Self::default(); |