@@ -9,6 +9,7 @@ private import TypeMention
99private import typeinference.FunctionType
1010private import typeinference.FunctionOverloading as FunctionOverloading
1111private import typeinference.BlanketImplementation as BlanketImplementation
12+ private import codeql.rust.internal.CachedStages
1213private import codeql.typeinference.internal.TypeInference
1314private import codeql.rust.frameworks.stdlib.Stdlib
1415private import codeql.rust.frameworks.stdlib.Builtins as Builtins
@@ -419,9 +420,10 @@ module CertainTypeInference {
419420 * Holds if `n` has complete and certain type information and if `n` has the
420421 * resulting type at `path`.
421422 */
422- pragma [ nomagic ]
423+ cached
423424 Type inferCertainType ( AstNode n , TypePath path ) {
424- result = inferAnnotatedType ( n , path )
425+ result = inferAnnotatedType ( n , path ) and
426+ Stages:: TypeInferenceStage:: ref ( )
425427 or
426428 result = inferCertainCallExprType ( n , path )
427429 or
@@ -3407,8 +3409,6 @@ private Type inferCastExprType(CastExpr ce, TypePath path) {
34073409
34083410cached
34093411private module Cached {
3410- private import codeql.rust.internal.CachedStages
3411-
34123412 /** Holds if `receiver` is the receiver of a method call with an implicit dereference. */
34133413 cached
34143414 predicate receiverHasImplicitDeref ( AstNode receiver ) {
0 commit comments