Skip to content

Commit 14b45cf

Browse files
committed
Rust: Add inconsistency check for type mentions without a root type
1 parent c4bbfbc commit 14b45cf

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
@@ -1342,6 +1342,10 @@ module Make1<LocationSig Location, InputSig1<Location> Input1> {
13421342
getTypeParameterId(tp1) = getTypeParameterId(tp2) and
13431343
tp1 != tp2
13441344
}
1345+
1346+
query predicate illFormedTypeMention(TypeMention tm) {
1347+
not exists(tm.resolveTypeAt(TypePath::nil())) and exists(tm.getLocation())
1348+
}
13451349
}
13461350
}
13471351
}

0 commit comments

Comments
 (0)