From 6a6098d4c31f6b54c8768e32f24182645ac077d6 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 22 Jun 2020 17:30:23 +0200 Subject: Remove RelativePathBuf from fixture The paths in fixture are not really relative (the default one is `/main.rs`), so it doesn't make sense to use `RelativePathBuf` here. --- crates/ra_assists/src/handlers/add_from_impl_for_enum.rs | 2 +- crates/ra_assists/src/handlers/extract_struct_from_enum_variant.rs | 2 +- crates/ra_assists/src/handlers/fill_match_arms.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ra_assists/src') diff --git a/crates/ra_assists/src/handlers/add_from_impl_for_enum.rs b/crates/ra_assists/src/handlers/add_from_impl_for_enum.rs index 776bddf91..b0e56e1b5 100644 --- a/crates/ra_assists/src/handlers/add_from_impl_for_enum.rs +++ b/crates/ra_assists/src/handlers/add_from_impl_for_enum.rs @@ -128,7 +128,7 @@ impl From for A { fn check_not_applicable(ra_fixture: &str) { let fixture = - format!("//- main.rs crate:main deps:core\n{}\n{}", ra_fixture, FamousDefs::FIXTURE); + format!("//- /main.rs crate:main deps:core\n{}\n{}", ra_fixture, FamousDefs::FIXTURE); check_assist_not_applicable(add_from_impl_for_enum, &fixture) } diff --git a/crates/ra_assists/src/handlers/extract_struct_from_enum_variant.rs b/crates/ra_assists/src/handlers/extract_struct_from_enum_variant.rs index 44db7917a..43b4584b4 100644 --- a/crates/ra_assists/src/handlers/extract_struct_from_enum_variant.rs +++ b/crates/ra_assists/src/handlers/extract_struct_from_enum_variant.rs @@ -301,7 +301,7 @@ fn another_fn() { fn check_not_applicable(ra_fixture: &str) { let fixture = - format!("//- main.rs crate:main deps:core\n{}\n{}", ra_fixture, FamousDefs::FIXTURE); + format!("//- /main.rs crate:main deps:core\n{}\n{}", ra_fixture, FamousDefs::FIXTURE); check_assist_not_applicable(extract_struct_from_enum_variant, &fixture) } diff --git a/crates/ra_assists/src/handlers/fill_match_arms.rs b/crates/ra_assists/src/handlers/fill_match_arms.rs index 569efb768..3c12c1daa 100644 --- a/crates/ra_assists/src/handlers/fill_match_arms.rs +++ b/crates/ra_assists/src/handlers/fill_match_arms.rs @@ -765,7 +765,7 @@ fn foo(opt: Option) { } }"#; let before = - &format!("//- main.rs crate:main deps:core\n{}{}", before, FamousDefs::FIXTURE); + &format!("//- /main.rs crate:main deps:core\n{}{}", before, FamousDefs::FIXTURE); check_assist( fill_match_arms, -- cgit v1.2.3