Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide_completion/src/tests/attribute.rs')
| -rw-r--r-- | crates/ide_completion/src/tests/attribute.rs | 144 |
1 files changed, 72 insertions, 72 deletions
diff --git a/crates/ide_completion/src/tests/attribute.rs b/crates/ide_completion/src/tests/attribute.rs index 2d2a1b867a..5a9c48a327 100644 --- a/crates/ide_completion/src/tests/attribute.rs +++ b/crates/ide_completion/src/tests/attribute.rs @@ -17,6 +17,10 @@ fn proc_macros() { struct Foo; "#, expect![[r#" + md proc_macros + kw self:: + kw super:: + kw crate:: at allow(…) at cfg(…) at cfg_attr(…) @@ -32,10 +36,6 @@ struct Foo; at derive(…) at repr(…) at non_exhaustive - kw self - kw super - kw crate - md proc_macros "#]], ) } @@ -78,15 +78,15 @@ fn with_existing_attr() { check( r#"#[no_mangle] #[$0] mcall!();"#, expect![[r#" + kw self:: + kw super:: + kw crate:: at allow(…) at cfg(…) at cfg_attr(…) at deny(…) at forbid(…) at warn(…) - kw self - kw super - kw crate "#]], ) } @@ -96,6 +96,9 @@ fn attr_on_source_file() { check( r#"#![$0]"#, expect![[r#" + kw self:: + kw super:: + kw crate:: at allow(…) at cfg(…) at cfg_attr(…) @@ -116,9 +119,6 @@ fn attr_on_source_file() { at recursion_limit = "…" at type_length_limit = … at windows_subsystem = "…" - kw self - kw super - kw crate "#]], ); } @@ -128,6 +128,9 @@ fn attr_on_module() { check( r#"#[$0] mod foo;"#, expect![[r#" + kw self:: + kw super:: + kw crate:: at allow(…) at cfg(…) at cfg_attr(…) @@ -142,14 +145,14 @@ fn attr_on_module() { at no_mangle at macro_use at path = "…" - kw self - kw super - kw crate "#]], ); check( r#"mod foo {#![$0]}"#, expect![[r#" + kw self:: + kw super:: + kw crate:: at allow(…) at cfg(…) at cfg_attr(…) @@ -163,9 +166,6 @@ fn attr_on_module() { at must_use at no_mangle at no_implicit_prelude - kw self - kw super - kw crate "#]], ); } @@ -175,6 +175,9 @@ fn attr_on_macro_rules() { check( r#"#[$0] macro_rules! foo {}"#, expect![[r#" + kw self:: + kw super:: + kw crate:: at allow(…) at cfg(…) at cfg_attr(…) @@ -189,9 +192,6 @@ fn attr_on_macro_rules() { at no_mangle at macro_export at macro_use - kw self - kw super - kw crate "#]], ); } @@ -201,6 +201,9 @@ fn attr_on_macro_def() { check( r#"#[$0] macro foo {}"#, expect![[r#" + kw self:: + kw super:: + kw crate:: at allow(…) at cfg(…) at cfg_attr(…) @@ -213,9 +216,6 @@ fn attr_on_macro_def() { at doc(alias = "…") at must_use at no_mangle - kw self - kw super - kw crate "#]], ); } @@ -225,6 +225,9 @@ fn attr_on_extern_crate() { check( r#"#[$0] extern crate foo;"#, expect![[r#" + kw self:: + kw super:: + kw crate:: at allow(…) at cfg(…) at cfg_attr(…) @@ -238,9 +241,6 @@ fn attr_on_extern_crate() { at must_use at no_mangle at macro_use - kw self - kw super - kw crate "#]], ); } @@ -250,6 +250,9 @@ fn attr_on_use() { check( r#"#[$0] use foo;"#, expect![[r#" + kw self:: + kw super:: + kw crate:: at allow(…) at cfg(…) at cfg_attr(…) @@ -262,9 +265,6 @@ fn attr_on_use() { at doc(alias = "…") at must_use at no_mangle - kw self - kw super - kw crate "#]], ); } @@ -274,6 +274,9 @@ fn attr_on_type_alias() { check( r#"#[$0] type foo = ();"#, expect![[r#" + kw self:: + kw super:: + kw crate:: at allow(…) at cfg(…) at cfg_attr(…) @@ -286,9 +289,6 @@ fn attr_on_type_alias() { at doc(alias = "…") at must_use at no_mangle - kw self - kw super - kw crate "#]], ); } @@ -302,6 +302,11 @@ fn attr_on_struct() { struct Foo; "#, expect![[r#" + md core + at derive pub macro derive + kw self:: + kw super:: + kw crate:: at allow(…) at cfg(…) at cfg_attr(…) @@ -317,11 +322,6 @@ struct Foo; at derive(…) at repr(…) at non_exhaustive - kw self - kw super - kw crate - md core - at derive pub macro derive "#]], ); } @@ -331,6 +331,9 @@ fn attr_on_enum() { check( r#"#[$0] enum Foo {}"#, expect![[r#" + kw self:: + kw super:: + kw crate:: at allow(…) at cfg(…) at cfg_attr(…) @@ -346,9 +349,6 @@ fn attr_on_enum() { at derive(…) at repr(…) at non_exhaustive - kw self - kw super - kw crate "#]], ); } @@ -358,6 +358,9 @@ fn attr_on_const() { check( r#"#[$0] const FOO: () = ();"#, expect![[r#" + kw self:: + kw super:: + kw crate:: at allow(…) at cfg(…) at cfg_attr(…) @@ -370,9 +373,6 @@ fn attr_on_const() { at doc(alias = "…") at must_use at no_mangle - kw self - kw super - kw crate "#]], ); } @@ -382,6 +382,9 @@ fn attr_on_static() { check( r#"#[$0] static FOO: () = ()"#, expect![[r#" + kw self:: + kw super:: + kw crate:: at allow(…) at cfg(…) at cfg_attr(…) @@ -399,9 +402,6 @@ fn attr_on_static() { at link_section = "…" at global_allocator at used - kw self - kw super - kw crate "#]], ); } @@ -411,6 +411,9 @@ fn attr_on_trait() { check( r#"#[$0] trait Foo {}"#, expect![[r#" + kw self:: + kw super:: + kw crate:: at allow(…) at cfg(…) at cfg_attr(…) @@ -424,9 +427,6 @@ fn attr_on_trait() { at must_use at no_mangle at must_use - kw self - kw super - kw crate "#]], ); } @@ -436,6 +436,9 @@ fn attr_on_impl() { check( r#"#[$0] impl () {}"#, expect![[r#" + kw self:: + kw super:: + kw crate:: at allow(…) at cfg(…) at cfg_attr(…) @@ -449,14 +452,14 @@ fn attr_on_impl() { at must_use at no_mangle at automatically_derived - kw self - kw super - kw crate "#]], ); check( r#"impl () {#![$0]}"#, expect![[r#" + kw self:: + kw super:: + kw crate:: at allow(…) at cfg(…) at cfg_attr(…) @@ -469,9 +472,6 @@ fn attr_on_impl() { at doc(alias = "…") at must_use at no_mangle - kw self - kw super - kw crate "#]], ); } @@ -481,6 +481,9 @@ fn attr_on_extern_block() { check( r#"#[$0] extern {}"#, expect![[r#" + kw self:: + kw super:: + kw crate:: at allow(…) at cfg(…) at cfg_attr(…) @@ -494,14 +497,14 @@ fn attr_on_extern_block() { at must_use at no_mangle at link - kw self - kw super - kw crate "#]], ); check( r#"extern {#![$0]}"#, expect![[r#" + kw self:: + kw super:: + kw crate:: at allow(…) at cfg(…) at cfg_attr(…) @@ -515,9 +518,6 @@ fn attr_on_extern_block() { at must_use at no_mangle at link - kw self - kw super - kw crate "#]], ); } @@ -527,6 +527,9 @@ fn attr_on_variant() { check( r#"enum Foo { #[$0] Bar }"#, expect![[r#" + kw self:: + kw super:: + kw crate:: at allow(…) at cfg(…) at cfg_attr(…) @@ -534,9 +537,6 @@ fn attr_on_variant() { at forbid(…) at warn(…) at non_exhaustive - kw self - kw super - kw crate "#]], ); } @@ -546,6 +546,9 @@ fn attr_on_fn() { check( r#"#[$0] fn main() {}"#, expect![[r#" + kw self:: + kw super:: + kw crate:: at allow(…) at cfg(…) at cfg_attr(…) @@ -573,9 +576,6 @@ fn attr_on_fn() { at target_feature = "…" at test at track_caller - kw self - kw super - kw crate "#]], ); } @@ -586,15 +586,15 @@ fn attr_on_expr() { check( r#"fn main() { #[$0] foo() }"#, expect![[r#" + kw self:: + kw super:: + kw crate:: at allow(…) at cfg(…) at cfg_attr(…) at deny(…) at forbid(…) at warn(…) - kw self - kw super - kw crate "#]], ); } @@ -604,6 +604,9 @@ fn attr_in_source_file_end() { check( r#"#[$0]"#, expect![[r#" + kw self:: + kw super:: + kw crate:: at allow(…) at automatically_derived at cfg(…) @@ -640,9 +643,6 @@ fn attr_in_source_file_end() { at track_caller at used at warn(…) - kw self - kw super - kw crate "#]], ); } |