From f0507ab7c697ba4bcd59dd2f673dfff5072e3e1a Mon Sep 17 00:00:00 2001 From: cynecx Date: Sun, 18 Apr 2021 20:18:48 +0200 Subject: hir_ty: cleanups and extend infinitely_recursive_macro_type test --- crates/hir_ty/src/tests/macros.rs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'crates/hir_ty/src/tests') diff --git a/crates/hir_ty/src/tests/macros.rs b/crates/hir_ty/src/tests/macros.rs index 8de1e229f..6588aa46c 100644 --- a/crates/hir_ty/src/tests/macros.rs +++ b/crates/hir_ty/src/tests/macros.rs @@ -1248,14 +1248,18 @@ fn macros_in_type_generics() { fn infinitely_recursive_macro_type() { check_infer( r#" - struct Bar(T); + struct Bar(T, X); macro_rules! Foo { () => { Foo!() } } + macro_rules! U32 { + () => { u32 } + } + type A = Foo!(); - type B = Bar; + type B = Bar; fn main() { let a: A; @@ -1263,9 +1267,9 @@ fn infinitely_recursive_macro_type() { } "#, expect![[r#" - 112..143 '{ ...: B; }': () - 122..123 'a': {unknown} - 136..137 'b': Bar<{unknown}> + 166..197 '{ ...: B; }': () + 176..177 'a': {unknown} + 190..191 'b': Bar<{unknown}, u32> "#]], ); } -- cgit v1.2.3