diff options
Diffstat (limited to 'crates/completion/src/completions/qualified_path.rs')
-rw-r--r-- | crates/completion/src/completions/qualified_path.rs | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/crates/completion/src/completions/qualified_path.rs b/crates/completion/src/completions/qualified_path.rs index bc23bea3f..1300f00b2 100644 --- a/crates/completion/src/completions/qualified_path.rs +++ b/crates/completion/src/completions/qualified_path.rs | |||
@@ -199,22 +199,22 @@ use self::{foo::*, bar<|>}; | |||
199 | check_builtin( | 199 | check_builtin( |
200 | r#"fn main() { let _: <|> = 92; }"#, | 200 | r#"fn main() { let _: <|> = 92; }"#, |
201 | expect![[r#" | 201 | expect![[r#" |
202 | bt u32 | ||
202 | bt bool | 203 | bt bool |
203 | bt char | 204 | bt u8 |
205 | bt isize | ||
206 | bt u16 | ||
207 | bt u64 | ||
208 | bt u128 | ||
204 | bt f32 | 209 | bt f32 |
205 | bt f64 | ||
206 | bt i128 | 210 | bt i128 |
207 | bt i16 | 211 | bt i16 |
208 | bt i32 | 212 | bt str |
209 | bt i64 | 213 | bt i64 |
214 | bt char | ||
215 | bt f64 | ||
216 | bt i32 | ||
210 | bt i8 | 217 | bt i8 |
211 | bt isize | ||
212 | bt str | ||
213 | bt u128 | ||
214 | bt u16 | ||
215 | bt u32 | ||
216 | bt u64 | ||
217 | bt u8 | ||
218 | bt usize | 218 | bt usize |
219 | "#]], | 219 | "#]], |
220 | ); | 220 | ); |
@@ -279,8 +279,8 @@ struct Spam; | |||
279 | use crate::Sp<|> | 279 | use crate::Sp<|> |
280 | "#, | 280 | "#, |
281 | expect![[r#" | 281 | expect![[r#" |
282 | st Spam | ||
283 | md foo | 282 | md foo |
283 | st Spam | ||
284 | "#]], | 284 | "#]], |
285 | ); | 285 | ); |
286 | } | 286 | } |
@@ -296,8 +296,8 @@ struct Spam; | |||
296 | use crate::{Sp<|>}; | 296 | use crate::{Sp<|>}; |
297 | "#, | 297 | "#, |
298 | expect![[r#" | 298 | expect![[r#" |
299 | st Spam | ||
300 | md foo | 299 | md foo |
300 | st Spam | ||
301 | "#]], | 301 | "#]], |
302 | ); | 302 | ); |
303 | } | 303 | } |
@@ -330,8 +330,8 @@ enum E { Foo, Bar(i32) } | |||
330 | fn foo() { let _ = E::<|> } | 330 | fn foo() { let _ = E::<|> } |
331 | "#, | 331 | "#, |
332 | expect![[r#" | 332 | expect![[r#" |
333 | ev Bar(…) (i32) | ||
334 | ev Foo () | 333 | ev Foo () |
334 | ev Bar(…) (i32) | ||
335 | "#]], | 335 | "#]], |
336 | ); | 336 | ); |
337 | } | 337 | } |
@@ -353,10 +353,10 @@ impl S { | |||
353 | fn foo() { let _ = S::<|> } | 353 | fn foo() { let _ = S::<|> } |
354 | "#, | 354 | "#, |
355 | expect![[r#" | 355 | expect![[r#" |
356 | ct C const C: i32 = 42; | ||
357 | ta T type T = i32; | ||
358 | fn a() fn a() | 356 | fn a() fn a() |
359 | me b(…) fn b(&self) | 357 | me b(…) fn b(&self) |
358 | ct C const C: i32 = 42; | ||
359 | ta T type T = i32; | ||
360 | "#]], | 360 | "#]], |
361 | ); | 361 | ); |
362 | } | 362 | } |
@@ -381,9 +381,9 @@ mod m { | |||
381 | fn foo() { let _ = S::<|> } | 381 | fn foo() { let _ = S::<|> } |
382 | "#, | 382 | "#, |
383 | expect![[r#" | 383 | expect![[r#" |
384 | fn public_method() pub(crate) fn public_method() | ||
384 | ct PUBLIC_CONST pub(crate) const PUBLIC_CONST: u32 = 1; | 385 | ct PUBLIC_CONST pub(crate) const PUBLIC_CONST: u32 = 1; |
385 | ta PublicType pub(crate) type PublicType = u32; | 386 | ta PublicType pub(crate) type PublicType = u32; |
386 | fn public_method() pub(crate) fn public_method() | ||
387 | "#]], | 387 | "#]], |
388 | ); | 388 | ); |
389 | } | 389 | } |
@@ -503,14 +503,14 @@ trait Sub: Super { | |||
503 | fn foo<T: Sub>() { T::<|> } | 503 | fn foo<T: Sub>() { T::<|> } |
504 | "#, | 504 | "#, |
505 | expect![[r#" | 505 | expect![[r#" |
506 | ct C2 const C2: (); | ||
507 | ct CONST const CONST: u8; | ||
508 | ta SubTy type SubTy; | 506 | ta SubTy type SubTy; |
509 | ta Ty type Ty; | 507 | ta Ty type Ty; |
510 | fn func() fn func() | 508 | ct C2 const C2: (); |
511 | me method(…) fn method(&self) | ||
512 | fn subfunc() fn subfunc() | 509 | fn subfunc() fn subfunc() |
513 | me submethod(…) fn submethod(&self) | 510 | me submethod(…) fn submethod(&self) |
511 | ct CONST const CONST: u8; | ||
512 | fn func() fn func() | ||
513 | me method(…) fn method(&self) | ||
514 | "#]], | 514 | "#]], |
515 | ); | 515 | ); |
516 | } | 516 | } |
@@ -543,12 +543,12 @@ impl<T> Sub for Wrap<T> { | |||
543 | } | 543 | } |
544 | "#, | 544 | "#, |
545 | expect![[r#" | 545 | expect![[r#" |
546 | ct C2 const C2: () = (); | ||
547 | ct CONST const CONST: u8 = 0; | ||
548 | ta SubTy type SubTy; | 546 | ta SubTy type SubTy; |
549 | ta Ty type Ty; | 547 | ta Ty type Ty; |
548 | ct CONST const CONST: u8 = 0; | ||
550 | fn func() fn func() | 549 | fn func() fn func() |
551 | me method(…) fn method(&self) | 550 | me method(…) fn method(&self) |
551 | ct C2 const C2: () = (); | ||
552 | fn subfunc() fn subfunc() | 552 | fn subfunc() fn subfunc() |
553 | me submethod(…) fn submethod(&self) | 553 | me submethod(…) fn submethod(&self) |
554 | "#]], | 554 | "#]], |
@@ -567,8 +567,8 @@ impl T { fn bar() {} } | |||
567 | fn main() { T::<|>; } | 567 | fn main() { T::<|>; } |
568 | "#, | 568 | "#, |
569 | expect![[r#" | 569 | expect![[r#" |
570 | fn bar() fn bar() | ||
571 | fn foo() fn foo() | 570 | fn foo() fn foo() |
571 | fn bar() fn bar() | ||
572 | "#]], | 572 | "#]], |
573 | ); | 573 | ); |
574 | } | 574 | } |
@@ -583,9 +583,9 @@ macro_rules! foo { () => {} } | |||
583 | fn main() { let _ = crate::<|> } | 583 | fn main() { let _ = crate::<|> } |
584 | "#, | 584 | "#, |
585 | expect![[r##" | 585 | expect![[r##" |
586 | fn main() fn main() | ||
586 | ma foo!(…) #[macro_export] | 587 | ma foo!(…) #[macro_export] |
587 | macro_rules! foo | 588 | macro_rules! foo |
588 | fn main() fn main() | ||
589 | "##]], | 589 | "##]], |
590 | ); | 590 | ); |
591 | } | 591 | } |
@@ -603,8 +603,8 @@ mod a { | |||
603 | } | 603 | } |
604 | "#, | 604 | "#, |
605 | expect![[r#" | 605 | expect![[r#" |
606 | ct A | ||
607 | md b | 606 | md b |
607 | ct A | ||
608 | "#]], | 608 | "#]], |
609 | ); | 609 | ); |
610 | } | 610 | } |
@@ -628,8 +628,8 @@ mod p { | |||
628 | "#, | 628 | "#, |
629 | expect![[r#" | 629 | expect![[r#" |
630 | ct RIGHT_CONST | 630 | ct RIGHT_CONST |
631 | st RightType | ||
632 | fn right_fn() fn wrong_fn() | 631 | fn right_fn() fn wrong_fn() |
632 | st RightType | ||
633 | "#]], | 633 | "#]], |
634 | ); | 634 | ); |
635 | 635 | ||
@@ -675,8 +675,8 @@ fn main() { m!(self::f<|>); } | |||
675 | fn foo() {} | 675 | fn foo() {} |
676 | "#, | 676 | "#, |
677 | expect![[r#" | 677 | expect![[r#" |
678 | fn foo() fn foo() | ||
679 | fn main() fn main() | 678 | fn main() fn main() |
679 | fn foo() fn foo() | ||
680 | "#]], | 680 | "#]], |
681 | ); | 681 | ); |
682 | } | 682 | } |
@@ -747,8 +747,8 @@ fn main() { | |||
747 | } | 747 | } |
748 | "#, | 748 | "#, |
749 | expect![[r#" | 749 | expect![[r#" |
750 | fn foo(…) fn foo(a: i32, b: i32) | ||
751 | fn main() fn main() | 750 | fn main() fn main() |
751 | fn foo(…) fn foo(a: i32, b: i32) | ||
752 | "#]], | 752 | "#]], |
753 | ); | 753 | ); |
754 | } | 754 | } |