File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
rust/ql/lib/codeql/rust/internal Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -383,6 +383,8 @@ private module CertainTypeInference {
383383 result = inferRefNodeType ( n ) and
384384 path .isEmpty ( )
385385 or
386+ result = inferLogicalOperationType ( n , path )
387+ or
386388 result = inferTupleRootType ( n ) and
387389 path .isEmpty ( )
388390 or
@@ -440,11 +442,10 @@ private module CertainTypeInference {
440442}
441443
442444private Type inferLogicalOperationType ( AstNode n , TypePath path ) {
443- exists ( Builtins:: BuiltinType t , BinaryLogicalOperation be |
445+ exists ( Builtins:: Bool t , BinaryLogicalOperation be |
444446 n = [ be , be .getLhs ( ) , be .getRhs ( ) ] and
445447 path .isEmpty ( ) and
446- result = TStruct ( t ) and
447- t instanceof Builtins:: Bool
448+ result = TStruct ( t )
448449 )
449450}
450451
@@ -2381,8 +2382,6 @@ private module Cached {
23812382 (
23822383 result = inferAnnotatedType ( n , path )
23832384 or
2384- result = inferLogicalOperationType ( n , path )
2385- or
23862385 result = inferAssignmentOperationType ( n , path )
23872386 or
23882387 result = inferTypeEquality ( n , path )
You can’t perform that action at this time.
0 commit comments