aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/tests
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2020-01-03 13:57:11 +0000
committerFlorian Diebold <[email protected]>2020-01-03 13:57:11 +0000
commit67240c8d915110fa0ad7392bb9a56e18e3bcf234 (patch)
tree7116d577e93d9265f584f708a31e720e9abb5e29 /crates/ra_hir_ty/src/tests
parent15d94cbffcb07fa910d715b2acef88109ae24d39 (diff)
Fix #2705
The `-` turned into a `+` during a refactoring. The original issue was caused by `Read` resolving wrongly to a trait without type parameters instead of a struct with one parameter; this only fixes the crash, not the wrong resolution.
Diffstat (limited to 'crates/ra_hir_ty/src/tests')
-rw-r--r--crates/ra_hir_ty/src/tests/regression.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/crates/ra_hir_ty/src/tests/regression.rs b/crates/ra_hir_ty/src/tests/regression.rs
index 8b3aa8564..13c5f62e4 100644
--- a/crates/ra_hir_ty/src/tests/regression.rs
+++ b/crates/ra_hir_ty/src/tests/regression.rs
@@ -365,3 +365,20 @@ fn issue_2669() {
365 "### 365 "###
366 ) 366 )
367} 367}
368
369#[test]
370fn issue_2705() {
371 assert_snapshot!(
372 infer(r#"
373trait Trait {}
374fn test() {
375 <Trait<u32>>::foo()
376}
377"#),
378 @r###"
379 [26; 53) '{ ...oo() }': ()
380 [32; 49) '<Trait...>::foo': {unknown}
381 [32; 51) '<Trait...:foo()': ()
382 "###
383 );
384}