From 2c3c728e0aea90f80b6d066f97e59663371e91c5 Mon Sep 17 00:00:00 2001 From: Conrad Ludgate Date: Tue, 2 Mar 2021 15:26:36 +0000 Subject: [PATCH] chore: remove redundant tests --- .../src/handlers/add_turbo_fish.rs | 30 ------------------- 1 file changed, 30 deletions(-) diff --git a/crates/ide_assists/src/handlers/add_turbo_fish.rs b/crates/ide_assists/src/handlers/add_turbo_fish.rs index f18e3edf9f..a08b55ebbf 100644 --- a/crates/ide_assists/src/handlers/add_turbo_fish.rs +++ b/crates/ide_assists/src/handlers/add_turbo_fish.rs @@ -37,7 +37,6 @@ pub(crate) fn add_turbo_fish(acc: &mut Assists, ctx: &AssistContext) -> Option<( let next_token = ident.next_token()?; if next_token.kind() == T![::] { mark::hit!(add_turbo_fish_one_fish_is_enough); - mark::hit!(add_type_ascription_turbofished); return None; } let name_ref = ast::NameRef::cast(ident.parent())?; @@ -52,7 +51,6 @@ pub(crate) fn add_turbo_fish(acc: &mut Assists, ctx: &AssistContext) -> Option<( let generics = hir::GenericDef::Function(fun).params(ctx.sema.db); if generics.is_empty() { mark::hit!(add_turbo_fish_non_generic); - mark::hit!(add_type_ascription_non_generic); return None; } @@ -250,20 +248,6 @@ fn main() { ); } - #[test] - fn add_type_ascription_turbofished() { - mark::check!(add_type_ascription_turbofished); - check_assist_not_applicable( - add_turbo_fish, - r#" -fn make() -> T {} -fn main() { - let x = make$0::<()>(); -} -"#, - ); - } - #[test] fn add_type_ascription_already_typed() { mark::check!(add_type_ascription_already_typed); @@ -280,20 +264,6 @@ fn make() -> T {} fn main() { let x: () = make::<${0:_}>(); } -"#, - ); - } - - #[test] - fn add_type_ascription_non_generic() { - mark::check!(add_type_ascription_non_generic); - check_assist_not_applicable( - add_turbo_fish, - r#" -fn make() -> () {} -fn main() { - let x = make$0(); -} "#, ); }