aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_ty')
-rw-r--r--crates/ra_hir_ty/src/tests/regression.rs31
1 files changed, 31 insertions, 0 deletions
diff --git a/crates/ra_hir_ty/src/tests/regression.rs b/crates/ra_hir_ty/src/tests/regression.rs
index 115ad8328..c2168222e 100644
--- a/crates/ra_hir_ty/src/tests/regression.rs
+++ b/crates/ra_hir_ty/src/tests/regression.rs
@@ -564,6 +564,37 @@ fn main() {
564} 564}
565 565
566#[test] 566#[test]
567fn issue_4465_dollar_crate_at_type() {
568 assert_snapshot!(
569 infer(r#"
570pub struct Foo {}
571pub fn anything<T>() -> T {
572 loop {}
573}
574macro_rules! foo {
575 () => {{
576 let r: $crate::Foo = anything();
577 r
578 }};
579}
580fn main() {
581 let _a = foo!();
582}
583"#), @r###"
584 45..60 '{ loop {} }': T
585 51..58 'loop {}': !
586 56..58 '{}': ()
587 !0..31 '{letr:...g();r}': Foo
588 !4..5 'r': Foo
589 !18..26 'anything': fn anything<Foo>() -> Foo
590 !18..28 'anything()': Foo
591 !29..30 'r': Foo
592 164..188 '{ ...!(); }': ()
593 174..176 '_a': Foo
594"###);
595}
596
597#[test]
567fn issue_4053_diesel_where_clauses() { 598fn issue_4053_diesel_where_clauses() {
568 assert_snapshot!( 599 assert_snapshot!(
569 infer(r#" 600 infer(r#"