aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/ty.rs')
-rw-r--r--crates/ra_hir/src/ty.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ra_hir/src/ty.rs b/crates/ra_hir/src/ty.rs
index 67fcc5346..31ea45706 100644
--- a/crates/ra_hir/src/ty.rs
+++ b/crates/ra_hir/src/ty.rs
@@ -29,6 +29,8 @@ use ra_arena::map::ArenaMap;
29use join_to_string::join; 29use join_to_string::join;
30use rustc_hash::FxHashMap; 30use rustc_hash::FxHashMap;
31 31
32use test_utils::tested_by;
33
32use crate::{ 34use crate::{
33 Module, Function, Struct, StructField, Enum, EnumVariant, Path, Name, ImplBlock, 35 Module, Function, Struct, StructField, Enum, EnumVariant, Path, Name, ImplBlock,
34 FnSignature, FnScopes, ModuleDef, AdtDef, 36 FnSignature, FnScopes, ModuleDef, AdtDef,
@@ -1020,6 +1022,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
1020 Ty::Infer(tv) => { 1022 Ty::Infer(tv) => {
1021 let inner = tv.to_inner(); 1023 let inner = tv.to_inner();
1022 if tv_stack.contains(&inner) { 1024 if tv_stack.contains(&inner) {
1025 tested_by!(type_var_cycles_resolve_as_possible);
1023 // recursive type 1026 // recursive type
1024 return tv.fallback_value(); 1027 return tv.fallback_value();
1025 } 1028 }
@@ -1062,6 +1065,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
1062 Ty::Infer(tv) => { 1065 Ty::Infer(tv) => {
1063 let inner = tv.to_inner(); 1066 let inner = tv.to_inner();
1064 if tv_stack.contains(&inner) { 1067 if tv_stack.contains(&inner) {
1068 tested_by!(type_var_cycles_resolve_completely);
1065 // recursive type 1069 // recursive type
1066 return tv.fallback_value(); 1070 return tv.fallback_value();
1067 } 1071 }