From 0729913525a55cad3ffe9876c1eb05f7b880d22d Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Mon, 21 Jun 2021 15:14:28 +0200 Subject: Various keyword completion fixes --- crates/ide_completion/src/tests/type_pos.rs | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'crates/ide_completion/src/tests') diff --git a/crates/ide_completion/src/tests/type_pos.rs b/crates/ide_completion/src/tests/type_pos.rs index 2bfecdd08..1ab47b27e 100644 --- a/crates/ide_completion/src/tests/type_pos.rs +++ b/crates/ide_completion/src/tests/type_pos.rs @@ -23,7 +23,6 @@ macro_rules! makro {} #[test] fn record_field_ty() { - // FIXME: pub shouldnt show up here check_with( r#" struct Foo<'lt, T, const C: usize> { @@ -31,8 +30,6 @@ struct Foo<'lt, T, const C: usize> { } "#, expect![[r#" - kw pub(crate) - kw pub sp Self tp T tt Trait @@ -42,7 +39,7 @@ struct Foo<'lt, T, const C: usize> { md module st Foo<…> st Unit - ma makro!(…) macro_rules! makro + ma makro!(…) macro_rules! makro bt u32 "#]], ) @@ -50,12 +47,13 @@ struct Foo<'lt, T, const C: usize> { #[test] fn tuple_struct_field() { - // FIXME: pub should show up here check_with( r#" struct Foo<'lt, T, const C: usize>(f$0); "#, expect![[r#" + kw pub(crate) + kw pub sp Self tp T tt Trait @@ -65,7 +63,7 @@ struct Foo<'lt, T, const C: usize>(f$0); md module st Foo<…> st Unit - ma makro!(…) macro_rules! makro + ma makro!(…) macro_rules! makro bt u32 "#]], ) @@ -73,13 +71,11 @@ struct Foo<'lt, T, const C: usize>(f$0); #[test] fn fn_return_type() { - // FIXME: return shouldnt show up here check_with( r#" fn x<'lt, T, const C: usize>() -> $0 "#, expect![[r#" - kw return tp T tt Trait en Enum @@ -95,7 +91,6 @@ fn x<'lt, T, const C: usize>() -> $0 #[test] fn body_type_pos() { - // FIXME: return shouldnt show up here check_with( r#" fn foo<'lt, T, const C: usize>() { @@ -104,7 +99,6 @@ fn foo<'lt, T, const C: usize>() { } "#, expect![[r#" - kw return tp T tt Trait en Enum @@ -136,7 +130,6 @@ fn foo<'lt, T, const C: usize>() { #[test] fn completes_types_and_const_in_arg_list() { - // FIXME: return shouldnt show up here // FIXME: we should complete the lifetime here for now check_with( r#" @@ -147,7 +140,6 @@ trait Trait2 { fn foo<'lt, T: Trait2<$0>, const CONST_PARAM: usize>(_: T) {} "#, expect![[r#" - kw return ta Foo = type Foo; tp T cp CONST_PARAM -- cgit v1.2.3