Merge pull request #18951 from Veykril/push-zpvunsvlpuxt

Add missing `#[rust_analyzer::rust_fixture]` annotations
This commit is contained in:
Lukas Wirth 2025-01-16 10:21:22 +00:00 committed by GitHub
commit 132a2a03c4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 149 additions and 51 deletions

View file

@ -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)
}