aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_ty/src')
-rw-r--r--crates/ra_hir_ty/src/tests/macros.rs4
-rw-r--r--crates/ra_hir_ty/src/tests/regression.rs29
2 files changed, 31 insertions, 2 deletions
diff --git a/crates/ra_hir_ty/src/tests/macros.rs b/crates/ra_hir_ty/src/tests/macros.rs
index 29e38a06c..07398ddcc 100644
--- a/crates/ra_hir_ty/src/tests/macros.rs
+++ b/crates/ra_hir_ty/src/tests/macros.rs
@@ -269,7 +269,7 @@ fn test() { S.foo()<|>; }
269} 269}
270 270
271#[test] 271#[test]
272fn infer_impl_items_generated_by_macros() { 272fn infer_assoc_items_generated_by_macros() {
273 let t = type_at( 273 let t = type_at(
274 r#" 274 r#"
275//- /main.rs 275//- /main.rs
@@ -288,7 +288,7 @@ fn test() { S.foo()<|>; }
288} 288}
289 289
290#[test] 290#[test]
291fn infer_impl_items_generated_by_macros_chain() { 291fn infer_assoc_items_generated_by_macros_chain() {
292 let t = type_at( 292 let t = type_at(
293 r#" 293 r#"
294//- /main.rs 294//- /main.rs
diff --git a/crates/ra_hir_ty/src/tests/regression.rs b/crates/ra_hir_ty/src/tests/regression.rs
index 8a1292c7a..115ad8328 100644
--- a/crates/ra_hir_ty/src/tests/regression.rs
+++ b/crates/ra_hir_ty/src/tests/regression.rs
@@ -535,6 +535,35 @@ fn foo(b: Bar) {
535} 535}
536 536
537#[test] 537#[test]
538fn issue_4235_name_conflicts() {
539 assert_snapshot!(
540 infer(r#"
541struct FOO {}
542static FOO:FOO = FOO {};
543
544impl FOO {
545 fn foo(&self) {}
546}
547
548fn main() {
549 let a = &FOO;
550 a.foo();
551}
552"#), @r###"
553 32..38 'FOO {}': FOO
554 64..68 'self': &FOO
555 70..72 '{}': ()
556 86..120 '{ ...o(); }': ()
557 96..97 'a': &FOO
558 100..104 '&FOO': &FOO
559 101..104 'FOO': FOO
560 110..111 'a': &FOO
561 110..117 'a.foo()': ()
562"###
563 );
564}
565
566#[test]
538fn issue_4053_diesel_where_clauses() { 567fn issue_4053_diesel_where_clauses() {
539 assert_snapshot!( 568 assert_snapshot!(
540 infer(r#" 569 infer(r#"