aboutsummaryrefslogtreecommitdiff
path: root/crates/completion/src/completions/attribute.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-01-07 12:27:17 +0000
committerGitHub <[email protected]>2021-01-07 12:27:17 +0000
commit7967ce85cfc5fc2b1996425b44f2a45d0841c8ff (patch)
tree4495b9de7ea6c8e9dd9fd347d42517e9dee511fa /crates/completion/src/completions/attribute.rs
parentc3e9fb183bc287d83b97b776edc87c54d18d1a73 (diff)
parent72b9a4fbd3c12f3250b9157a1d44230e04ec8b22 (diff)
Merge #7184
7184: Changes Cursor Marker To $0 r=matklad a=kevaundray Co-authored-by: Kevaundray Wedderburn <[email protected]>
Diffstat (limited to 'crates/completion/src/completions/attribute.rs')
-rw-r--r--crates/completion/src/completions/attribute.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/completion/src/completions/attribute.rs b/crates/completion/src/completions/attribute.rs
index 17276b5a4..10739750c 100644
--- a/crates/completion/src/completions/attribute.rs
+++ b/crates/completion/src/completions/attribute.rs
@@ -413,7 +413,7 @@ mod tests {
413 fn empty_derive_completion() { 413 fn empty_derive_completion() {
414 check( 414 check(
415 r#" 415 r#"
416#[derive(<|>)] 416#[derive($0)]
417struct Test {} 417struct Test {}
418 "#, 418 "#,
419 expect![[r#" 419 expect![[r#"
@@ -434,7 +434,7 @@ struct Test {}
434 fn no_completion_for_incorrect_derive() { 434 fn no_completion_for_incorrect_derive() {
435 check( 435 check(
436 r#" 436 r#"
437#[derive{<|>)] 437#[derive{$0)]
438struct Test {} 438struct Test {}
439"#, 439"#,
440 expect![[r#""#]], 440 expect![[r#""#]],
@@ -445,7 +445,7 @@ struct Test {}
445 fn derive_with_input_completion() { 445 fn derive_with_input_completion() {
446 check( 446 check(
447 r#" 447 r#"
448#[derive(serde::Serialize, PartialEq, <|>)] 448#[derive(serde::Serialize, PartialEq, $0)]
449struct Test {} 449struct Test {}
450"#, 450"#,
451 expect![[r#" 451 expect![[r#"
@@ -464,7 +464,7 @@ struct Test {}
464 #[test] 464 #[test]
465 fn test_attribute_completion() { 465 fn test_attribute_completion() {
466 check( 466 check(
467 r#"#[<|>]"#, 467 r#"#[$0]"#,
468 expect![[r#" 468 expect![[r#"
469 at allow(…) 469 at allow(…)
470 at automatically_derived 470 at automatically_derived
@@ -504,13 +504,13 @@ struct Test {}
504 504
505 #[test] 505 #[test]
506 fn test_attribute_completion_inside_nested_attr() { 506 fn test_attribute_completion_inside_nested_attr() {
507 check(r#"#[cfg(<|>)]"#, expect![[]]) 507 check(r#"#[cfg($0)]"#, expect![[]])
508 } 508 }
509 509
510 #[test] 510 #[test]
511 fn test_inner_attribute_completion() { 511 fn test_inner_attribute_completion() {
512 check( 512 check(
513 r"#![<|>]", 513 r"#![$0]",
514 expect![[r#" 514 expect![[r#"
515 at allow(…) 515 at allow(…)
516 at automatically_derived 516 at automatically_derived