From 72b9a4fbd3c12f3250b9157a1d44230e04ec8b22 Mon Sep 17 00:00:00 2001 From: Kevaundray Wedderburn Date: Wed, 6 Jan 2021 20:15:48 +0000 Subject: Change <|> to $0 - Rebase --- crates/assists/src/handlers/flip_trait_bound.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'crates/assists/src/handlers/flip_trait_bound.rs') diff --git a/crates/assists/src/handlers/flip_trait_bound.rs b/crates/assists/src/handlers/flip_trait_bound.rs index 92ee42181..d419d263e 100644 --- a/crates/assists/src/handlers/flip_trait_bound.rs +++ b/crates/assists/src/handlers/flip_trait_bound.rs @@ -11,7 +11,7 @@ use crate::{AssistContext, AssistId, AssistKind, Assists}; // Flips two trait bounds. // // ``` -// fn foo Copy>() { } +// fn foo() { } // ``` // -> // ``` @@ -52,19 +52,19 @@ mod tests { #[test] fn flip_trait_bound_assist_available() { - check_assist_target(flip_trait_bound, "struct S where T: A <|>+ B + C { }", "+") + check_assist_target(flip_trait_bound, "struct S where T: A $0+ B + C { }", "+") } #[test] fn flip_trait_bound_not_applicable_for_single_trait_bound() { - check_assist_not_applicable(flip_trait_bound, "struct S where T: <|>A { }") + check_assist_not_applicable(flip_trait_bound, "struct S where T: $0A { }") } #[test] fn flip_trait_bound_works_for_struct() { check_assist( flip_trait_bound, - "struct S where T: A <|>+ B { }", + "struct S where T: A $0+ B { }", "struct S where T: B + A { }", ) } @@ -73,21 +73,21 @@ mod tests { fn flip_trait_bound_works_for_trait_impl() { check_assist( flip_trait_bound, - "impl X for S where T: A +<|> B { }", + "impl X for S where T: A +$0 B { }", "impl X for S where T: B + A { }", ) } #[test] fn flip_trait_bound_works_for_fn() { - check_assist(flip_trait_bound, "fn f+ B>(t: T) { }", "fn f(t: T) { }") + check_assist(flip_trait_bound, "fn f(t: T) { }", "fn f(t: T) { }") } #[test] fn flip_trait_bound_works_for_fn_where_clause() { check_assist( flip_trait_bound, - "fn f(t: T) where T: A +<|> B { }", + "fn f(t: T) where T: A +$0 B { }", "fn f(t: T) where T: B + A { }", ) } @@ -96,7 +96,7 @@ mod tests { fn flip_trait_bound_works_for_lifetime() { check_assist( flip_trait_bound, - "fn f(t: T) where T: A <|>+ 'static { }", + "fn f(t: T) where T: A $0+ 'static { }", "fn f(t: T) where T: 'static + A { }", ) } @@ -105,7 +105,7 @@ mod tests { fn flip_trait_bound_works_for_complex_bounds() { check_assist( flip_trait_bound, - "struct S where T: A <|>+ b_mod::B + C { }", + "struct S where T: A $0+ b_mod::B + C { }", "struct S where T: b_mod::B + A + C { }", ) } @@ -114,7 +114,7 @@ mod tests { fn flip_trait_bound_works_for_long_bounds() { check_assist( flip_trait_bound, - "struct S where T: A + B + C + D + E + F +<|> G + H + I + J { }", + "struct S where T: A + B + C + D + E + F +$0 G + H + I + J { }", "struct S where T: A + B + C + D + E + G + F + H + I + J { }", ) } -- cgit v1.2.3