mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-02 04:48:13 +00:00
Merge pull request #18951 from Veykril/push-zpvunsvlpuxt
Add missing `#[rust_analyzer::rust_fixture]` annotations
This commit is contained in:
commit
132a2a03c4
12 changed files with 149 additions and 51 deletions
|
|
@ -1244,8 +1244,8 @@ use ::ext::foo::Foo;
|
|||
|
||||
fn check_with_config(
|
||||
path: &str,
|
||||
ra_fixture_before: &str,
|
||||
ra_fixture_after: &str,
|
||||
#[rust_analyzer::rust_fixture] ra_fixture_before: &str,
|
||||
#[rust_analyzer::rust_fixture] ra_fixture_after: &str,
|
||||
config: &InsertUseConfig,
|
||||
) {
|
||||
let (db, file_id, pos) = if ra_fixture_before.contains(CURSOR_MARKER) {
|
||||
|
|
@ -1277,8 +1277,8 @@ fn check_with_config(
|
|||
|
||||
fn check(
|
||||
path: &str,
|
||||
ra_fixture_before: &str,
|
||||
ra_fixture_after: &str,
|
||||
#[rust_analyzer::rust_fixture] ra_fixture_before: &str,
|
||||
#[rust_analyzer::rust_fixture] ra_fixture_after: &str,
|
||||
granularity: ImportGranularity,
|
||||
) {
|
||||
check_with_config(
|
||||
|
|
@ -1295,19 +1295,35 @@ fn check(
|
|||
)
|
||||
}
|
||||
|
||||
fn check_crate(path: &str, ra_fixture_before: &str, ra_fixture_after: &str) {
|
||||
fn check_crate(
|
||||
path: &str,
|
||||
#[rust_analyzer::rust_fixture] ra_fixture_before: &str,
|
||||
#[rust_analyzer::rust_fixture] ra_fixture_after: &str,
|
||||
) {
|
||||
check(path, ra_fixture_before, ra_fixture_after, ImportGranularity::Crate)
|
||||
}
|
||||
|
||||
fn check_module(path: &str, ra_fixture_before: &str, ra_fixture_after: &str) {
|
||||
fn check_module(
|
||||
path: &str,
|
||||
#[rust_analyzer::rust_fixture] ra_fixture_before: &str,
|
||||
#[rust_analyzer::rust_fixture] ra_fixture_after: &str,
|
||||
) {
|
||||
check(path, ra_fixture_before, ra_fixture_after, ImportGranularity::Module)
|
||||
}
|
||||
|
||||
fn check_none(path: &str, ra_fixture_before: &str, ra_fixture_after: &str) {
|
||||
fn check_none(
|
||||
path: &str,
|
||||
#[rust_analyzer::rust_fixture] ra_fixture_before: &str,
|
||||
#[rust_analyzer::rust_fixture] ra_fixture_after: &str,
|
||||
) {
|
||||
check(path, ra_fixture_before, ra_fixture_after, ImportGranularity::Item)
|
||||
}
|
||||
|
||||
fn check_one(path: &str, ra_fixture_before: &str, ra_fixture_after: &str) {
|
||||
fn check_one(
|
||||
path: &str,
|
||||
#[rust_analyzer::rust_fixture] ra_fixture_before: &str,
|
||||
#[rust_analyzer::rust_fixture] ra_fixture_after: &str,
|
||||
) {
|
||||
check(path, ra_fixture_before, ra_fixture_after, ImportGranularity::One)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue