Skip to content

Commit 96cba8b

Browse files
committed
Rust: Add inconsistency check for type mentions without a root type
1 parent bf2cfab commit 96cba8b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

shared/typeinference/codeql/typeinference/internal/TypeInference.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1314,6 +1314,10 @@ module Make1<LocationSig Location, InputSig1<Location> Input1> {
13141314
getTypeParameterId(tp1) = getTypeParameterId(tp2) and
13151315
tp1 != tp2
13161316
}
1317+
1318+
query predicate illFormedTypeMention(TypeMention tm) {
1319+
not exists(tm.resolveTypeAt(TypePath::nil())) and exists(tm.getLocation())
1320+
}
13171321
}
13181322
}
13191323
}

0 commit comments

Comments
 (0)