aboutsummaryrefslogtreecommitdiff
path: root/crates/completion/src/completions
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2021-01-14 15:25:19 +0000
committerAleksey Kladov <[email protected]>2021-01-14 15:25:19 +0000
commit8dc68ecdfcc764c7c0dcf5fcedcb51b092d99620 (patch)
treef0f93d744416a1114b34472b91574afe3be14147 /crates/completion/src/completions
parent865e05b5b47d3e27e8fe4458662e751e492a0f51 (diff)
Introduce more appropriate assertion mechanism
rust-analyzer is a long-running program, so we *should* handle assertion failures. See also https://www.sqlite.org/assert.html.
Diffstat (limited to 'crates/completion/src/completions')
-rw-r--r--crates/completion/src/completions/qualified_path.rs3
-rw-r--r--crates/completion/src/completions/unqualified_path.rs6
2 files changed, 3 insertions, 6 deletions
diff --git a/crates/completion/src/completions/qualified_path.rs b/crates/completion/src/completions/qualified_path.rs
index fa9e6e810..33df26761 100644
--- a/crates/completion/src/completions/qualified_path.rs
+++ b/crates/completion/src/completions/qualified_path.rs
@@ -590,8 +590,7 @@ fn main() { let _ = crate::$0 }
590 "#, 590 "#,
591 expect![[r##" 591 expect![[r##"
592 fn main() fn main() 592 fn main() fn main()
593 ma foo!(…) #[macro_export] 593 ma foo!(…) #[macro_export] macro_rules! foo
594 macro_rules! foo
595 "##]], 594 "##]],
596 ); 595 );
597 } 596 }
diff --git a/crates/completion/src/completions/unqualified_path.rs b/crates/completion/src/completions/unqualified_path.rs
index 7ba99447d..53e1391f3 100644
--- a/crates/completion/src/completions/unqualified_path.rs
+++ b/crates/completion/src/completions/unqualified_path.rs
@@ -540,8 +540,7 @@ mod macros {
540"#, 540"#,
541 expect![[r##" 541 expect![[r##"
542 fn f() fn f() 542 fn f() fn f()
543 ma concat!(…) #[macro_export] 543 ma concat!(…) #[macro_export] macro_rules! concat
544 macro_rules! concat
545 md std 544 md std
546 "##]], 545 "##]],
547 ); 546 );
@@ -597,8 +596,7 @@ fn main() { let v = $0 }
597"#, 596"#,
598 expect![[r##" 597 expect![[r##"
599 md m1 598 md m1
600 ma baz!(…) #[macro_export] 599 ma baz!(…) #[macro_export] macro_rules! baz
601 macro_rules! baz
602 fn main() fn main() 600 fn main() fn main()
603 md m2 601 md m2
604 ma bar!(…) macro_rules! bar 602 ma bar!(…) macro_rules! bar