aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2019-02-24 16:29:07 +0000
committerFlorian Diebold <[email protected]>2019-02-24 19:54:04 +0000
commitc3c09795614f31f988edc9cb051ce024d1996d89 (patch)
treeb22232818d8d8ad8fff5b11b1656e2602115cd55 /crates/ra_hir
parent5d72b96988587699e0a1c62c08bd76d2a7fed100 (diff)
Add test for recursive type aliases
Diffstat (limited to 'crates/ra_hir')
-rw-r--r--crates/ra_hir/src/ty/tests.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/crates/ra_hir/src/ty/tests.rs b/crates/ra_hir/src/ty/tests.rs
index 490c087f9..642259225 100644
--- a/crates/ra_hir/src/ty/tests.rs
+++ b/crates/ra_hir/src/ty/tests.rs
@@ -762,6 +762,20 @@ fn test(x: Foo, y: Bar<&str>, z: Baz<i8, u8>) {
762} 762}
763 763
764#[test] 764#[test]
765#[should_panic] // we currently can't handle this
766fn recursive_type_alias() {
767 check_inference(
768 "recursive_type_alias",
769 r#"
770struct A<X> {};
771type Foo = Foo;
772type Bar = A<Bar>;
773fn test(x: Foo) {}
774"#,
775 )
776}
777
778#[test]
765fn no_panic_on_field_of_enum() { 779fn no_panic_on_field_of_enum() {
766 check_inference( 780 check_inference(
767 "no_panic_on_field_of_enum", 781 "no_panic_on_field_of_enum",