@@ -268,12 +268,15 @@ private predicate isPanicMacroCall(MacroExpr me) {
268268 me .getMacroCall ( ) .resolveMacro ( ) .( MacroRules ) .getName ( ) .getText ( ) = "panic"
269269}
270270
271- private Type inferCertainStructExprType ( StructExpr se , TypePath path ) {
272- result = se .getPath ( ) .( TypeMention ) .getTypeAt ( path )
273- }
271+ /** Module for inferring certain type information. */
272+ module CertainTypeInference {
273+ Type inferCertainStructExprType ( StructExpr se , TypePath path ) {
274+ result = se .getPath ( ) .( TypeMention ) .getTypeAt ( path )
275+ }
274276
275- private Type inferCertainStructPatType ( StructPat sp , TypePath path ) {
276- result = sp .getPath ( ) .( TypeMention ) .getTypeAt ( path )
277+ Type inferCertainStructPatType ( StructPat sp , TypePath path ) {
278+ result = sp .getPath ( ) .( TypeMention ) .getTypeAt ( path )
279+ }
277280}
278281
279282private Type inferAssignmentOperationType ( AstNode n , TypePath path ) {
@@ -2993,9 +2996,9 @@ private module Input3 implements InputSig3 {
29932996 result = inferRefExprType ( n ) and
29942997 path .isEmpty ( )
29952998 or
2996- result = inferCertainStructExprType ( n , path )
2999+ result = CertainTypeInference :: inferCertainStructExprType ( n , path )
29973000 or
2998- result = inferCertainStructPatType ( n , path )
3001+ result = CertainTypeInference :: inferCertainStructPatType ( n , path )
29993002 or
30003003 result = inferRangeExprType ( n ) and
30013004 path .isEmpty ( )
0 commit comments