aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/tests.rs
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2019-11-30 11:48:51 +0000
committerFlorian Diebold <[email protected]>2019-11-30 11:57:32 +0000
commit1c622e9fed97de7711da7b5bffec0fa4b19d7500 (patch)
tree0471718f620bfdcb207387f6ae58bdfa5ca47e4e /crates/ra_hir_ty/src/tests.rs
parent3ca40f7c08718a44c6d08d2cbe060244340e7157 (diff)
Add cycle recovery for type aliases
Diffstat (limited to 'crates/ra_hir_ty/src/tests.rs')
-rw-r--r--crates/ra_hir_ty/src/tests.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/ra_hir_ty/src/tests.rs b/crates/ra_hir_ty/src/tests.rs
index 552eb8f75..c856d6afd 100644
--- a/crates/ra_hir_ty/src/tests.rs
+++ b/crates/ra_hir_ty/src/tests.rs
@@ -2154,7 +2154,6 @@ fn test(x: Foo, y: Bar<&str>, z: Baz<i8, u8>) {
2154} 2154}
2155 2155
2156#[test] 2156#[test]
2157#[should_panic] // we currently can't handle this
2158fn recursive_type_alias() { 2157fn recursive_type_alias() {
2159 assert_snapshot!( 2158 assert_snapshot!(
2160 infer(r#" 2159 infer(r#"
@@ -2163,7 +2162,10 @@ type Foo = Foo;
2163type Bar = A<Bar>; 2162type Bar = A<Bar>;
2164fn test(x: Foo) {} 2163fn test(x: Foo) {}
2165"#), 2164"#),
2166 @"" 2165 @r###"
2166 [59; 60) 'x': {unknown}
2167 [67; 69) '{}': ()
2168 "###
2167 ) 2169 )
2168} 2170}
2169 2171