Rust: rename getTy -> getTypeRepr

This commit is contained in:
Paolo Tranquilli
2024-12-03 11:17:08 +01:00
parent 8287cdd7b3
commit db18d1046b
116 changed files with 707 additions and 667 deletions

View File

@@ -2,10 +2,10 @@
import codeql.rust.elements
import TestUtils
from ArrayTypeRepr x, string hasConstArg, string hasTy
from ArrayTypeRepr x, string hasConstArg, string hasElementTypeRepr
where
toBeTested(x) and
not x.isUnknown() and
(if x.hasConstArg() then hasConstArg = "yes" else hasConstArg = "no") and
if x.hasTy() then hasTy = "yes" else hasTy = "no"
select x, "hasConstArg:", hasConstArg, "hasTy:", hasTy
if x.hasElementTypeRepr() then hasElementTypeRepr = "yes" else hasElementTypeRepr = "no"
select x, "hasConstArg:", hasConstArg, "hasElementTypeRepr:", hasElementTypeRepr

View File

@@ -4,4 +4,4 @@ import TestUtils
from ArrayTypeRepr x
where toBeTested(x) and not x.isUnknown()
select x, x.getTy()
select x, x.getElementTypeRepr()

View File

@@ -4,7 +4,7 @@ import TestUtils
from
AssocTypeArg x, string hasConstArg, string hasGenericArgList, string hasNameRef,
string hasParamList, string hasRetType, string hasReturnTypeSyntax, string hasTy,
string hasParamList, string hasRetType, string hasReturnTypeSyntax, string hasTypeRepr,
string hasTypeBoundList
where
toBeTested(x) and
@@ -15,8 +15,8 @@ where
(if x.hasParamList() then hasParamList = "yes" else hasParamList = "no") and
(if x.hasRetType() then hasRetType = "yes" else hasRetType = "no") and
(if x.hasReturnTypeSyntax() then hasReturnTypeSyntax = "yes" else hasReturnTypeSyntax = "no") and
(if x.hasTy() then hasTy = "yes" else hasTy = "no") and
(if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no") and
if x.hasTypeBoundList() then hasTypeBoundList = "yes" else hasTypeBoundList = "no"
select x, "hasConstArg:", hasConstArg, "hasGenericArgList:", hasGenericArgList, "hasNameRef:",
hasNameRef, "hasParamList:", hasParamList, "hasRetType:", hasRetType, "hasReturnTypeSyntax:",
hasReturnTypeSyntax, "hasTy:", hasTy, "hasTypeBoundList:", hasTypeBoundList
hasReturnTypeSyntax, "hasTypeRepr:", hasTypeRepr, "hasTypeBoundList:", hasTypeBoundList

View File

@@ -4,4 +4,4 @@ import TestUtils
from AssocTypeArg x
where toBeTested(x) and not x.isUnknown()
select x, x.getTy()
select x, x.getTypeRepr()

View File

@@ -1 +1 @@
| gen_cast_expr.rs:5:5:5:16 | value as u64 | getNumberOfAttrs: | 0 | hasExpr: | yes | hasTy: | yes |
| gen_cast_expr.rs:5:5:5:16 | value as u64 | getNumberOfAttrs: | 0 | hasExpr: | yes | hasTypeRepr: | yes |

View File

@@ -2,11 +2,11 @@
import codeql.rust.elements
import TestUtils
from CastExpr x, int getNumberOfAttrs, string hasExpr, string hasTy
from CastExpr x, int getNumberOfAttrs, string hasExpr, string hasTypeRepr
where
toBeTested(x) and
not x.isUnknown() and
getNumberOfAttrs = x.getNumberOfAttrs() and
(if x.hasExpr() then hasExpr = "yes" else hasExpr = "no") and
if x.hasTy() then hasTy = "yes" else hasTy = "no"
select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr, "hasTy:", hasTy
if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no"
select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr, "hasTypeRepr:", hasTypeRepr

View File

@@ -4,4 +4,4 @@ import TestUtils
from CastExpr x
where toBeTested(x) and not x.isUnknown()
select x, x.getTy()
select x, x.getTypeRepr()

View File

@@ -4,7 +4,7 @@ import TestUtils
from
Const x, string hasExtendedCanonicalPath, string hasCrateOrigin, int getNumberOfAttrs,
string hasBody, string isConst, string isDefault, string hasName, string hasTy,
string hasBody, string isConst, string isDefault, string hasName, string hasTypeRepr,
string hasVisibility
where
toBeTested(x) and
@@ -20,8 +20,8 @@ where
(if x.isConst() then isConst = "yes" else isConst = "no") and
(if x.isDefault() then isDefault = "yes" else isDefault = "no") and
(if x.hasName() then hasName = "yes" else hasName = "no") and
(if x.hasTy() then hasTy = "yes" else hasTy = "no") and
(if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no") and
if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no"
select x, "hasExtendedCanonicalPath:", hasExtendedCanonicalPath, "hasCrateOrigin:", hasCrateOrigin,
"getNumberOfAttrs:", getNumberOfAttrs, "hasBody:", hasBody, "isConst:", isConst, "isDefault:",
isDefault, "hasName:", hasName, "hasTy:", hasTy, "hasVisibility:", hasVisibility
isDefault, "hasName:", hasName, "hasTypeRepr:", hasTypeRepr, "hasVisibility:", hasVisibility

View File

@@ -4,4 +4,4 @@ import TestUtils
from Const x
where toBeTested(x) and not x.isUnknown()
select x, x.getTy()
select x, x.getTypeRepr()

View File

@@ -4,7 +4,7 @@ import TestUtils
from
ConstParam x, int getNumberOfAttrs, string hasDefaultVal, string isConst, string hasName,
string hasTy
string hasTypeRepr
where
toBeTested(x) and
not x.isUnknown() and
@@ -12,6 +12,6 @@ where
(if x.hasDefaultVal() then hasDefaultVal = "yes" else hasDefaultVal = "no") and
(if x.isConst() then isConst = "yes" else isConst = "no") and
(if x.hasName() then hasName = "yes" else hasName = "no") and
if x.hasTy() then hasTy = "yes" else hasTy = "no"
if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no"
select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasDefaultVal:", hasDefaultVal, "isConst:",
isConst, "hasName:", hasName, "hasTy:", hasTy
isConst, "hasName:", hasName, "hasTypeRepr:", hasTypeRepr

View File

@@ -4,4 +4,4 @@ import TestUtils
from ConstParam x
where toBeTested(x) and not x.isUnknown()
select x, x.getTy()
select x, x.getTypeRepr()

View File

@@ -2,10 +2,10 @@
import codeql.rust.elements
import TestUtils
from ForTypeRepr x, string hasGenericParamList, string hasTy
from ForTypeRepr x, string hasGenericParamList, string hasTypeRepr
where
toBeTested(x) and
not x.isUnknown() and
(if x.hasGenericParamList() then hasGenericParamList = "yes" else hasGenericParamList = "no") and
if x.hasTy() then hasTy = "yes" else hasTy = "no"
select x, "hasGenericParamList:", hasGenericParamList, "hasTy:", hasTy
if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no"
select x, "hasGenericParamList:", hasGenericParamList, "hasTypeRepr:", hasTypeRepr

View File

@@ -4,4 +4,4 @@ import TestUtils
from ForTypeRepr x
where toBeTested(x) and not x.isUnknown()
select x, x.getTy()
select x, x.getTypeRepr()

View File

@@ -1,6 +1,6 @@
| gen_let_stmt.rs:5:5:5:15 | let ... = 42 | getNumberOfAttrs: | 0 | hasInitializer: | yes | hasLetElse: | no | hasPat: | yes | hasTy: | no |
| gen_let_stmt.rs:6:5:6:20 | let ... = 42 | getNumberOfAttrs: | 0 | hasInitializer: | yes | hasLetElse: | no | hasPat: | yes | hasTy: | yes |
| gen_let_stmt.rs:7:5:7:15 | let ... | getNumberOfAttrs: | 0 | hasInitializer: | no | hasLetElse: | no | hasPat: | yes | hasTy: | yes |
| gen_let_stmt.rs:8:5:8:10 | let ... | getNumberOfAttrs: | 0 | hasInitializer: | no | hasLetElse: | no | hasPat: | yes | hasTy: | no |
| gen_let_stmt.rs:9:5:9:24 | let ... = ... | getNumberOfAttrs: | 0 | hasInitializer: | yes | hasLetElse: | no | hasPat: | yes | hasTy: | no |
| gen_let_stmt.rs:10:5:12:6 | let ... = ... else {...} | getNumberOfAttrs: | 0 | hasInitializer: | yes | hasLetElse: | yes | hasPat: | yes | hasTy: | no |
| gen_let_stmt.rs:5:5:5:15 | let ... = 42 | getNumberOfAttrs: | 0 | hasInitializer: | yes | hasLetElse: | no | hasPat: | yes | hasTypeRepr: | no |
| gen_let_stmt.rs:6:5:6:20 | let ... = 42 | getNumberOfAttrs: | 0 | hasInitializer: | yes | hasLetElse: | no | hasPat: | yes | hasTypeRepr: | yes |
| gen_let_stmt.rs:7:5:7:15 | let ... | getNumberOfAttrs: | 0 | hasInitializer: | no | hasLetElse: | no | hasPat: | yes | hasTypeRepr: | yes |
| gen_let_stmt.rs:8:5:8:10 | let ... | getNumberOfAttrs: | 0 | hasInitializer: | no | hasLetElse: | no | hasPat: | yes | hasTypeRepr: | no |
| gen_let_stmt.rs:9:5:9:24 | let ... = ... | getNumberOfAttrs: | 0 | hasInitializer: | yes | hasLetElse: | no | hasPat: | yes | hasTypeRepr: | no |
| gen_let_stmt.rs:10:5:12:6 | let ... = ... else {...} | getNumberOfAttrs: | 0 | hasInitializer: | yes | hasLetElse: | yes | hasPat: | yes | hasTypeRepr: | no |

View File

@@ -4,7 +4,7 @@ import TestUtils
from
LetStmt x, int getNumberOfAttrs, string hasInitializer, string hasLetElse, string hasPat,
string hasTy
string hasTypeRepr
where
toBeTested(x) and
not x.isUnknown() and
@@ -12,6 +12,6 @@ where
(if x.hasInitializer() then hasInitializer = "yes" else hasInitializer = "no") and
(if x.hasLetElse() then hasLetElse = "yes" else hasLetElse = "no") and
(if x.hasPat() then hasPat = "yes" else hasPat = "no") and
if x.hasTy() then hasTy = "yes" else hasTy = "no"
if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no"
select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasInitializer:", hasInitializer, "hasLetElse:",
hasLetElse, "hasPat:", hasPat, "hasTy:", hasTy
hasLetElse, "hasPat:", hasPat, "hasTypeRepr:", hasTypeRepr

View File

@@ -4,4 +4,4 @@ import TestUtils
from LetStmt x
where toBeTested(x) and not x.isUnknown()
select x, x.getTy()
select x, x.getTypeRepr()

View File

@@ -1 +1 @@
| gen_offset_of_expr.rs:5:5:5:38 | OffsetOfExpr | getNumberOfAttrs: | 0 | getNumberOfFields: | 1 | hasTy: | yes |
| gen_offset_of_expr.rs:5:5:5:38 | OffsetOfExpr | getNumberOfAttrs: | 0 | getNumberOfFields: | 1 | hasTypeRepr: | yes |

View File

@@ -2,12 +2,12 @@
import codeql.rust.elements
import TestUtils
from OffsetOfExpr x, int getNumberOfAttrs, int getNumberOfFields, string hasTy
from OffsetOfExpr x, int getNumberOfAttrs, int getNumberOfFields, string hasTypeRepr
where
toBeTested(x) and
not x.isUnknown() and
getNumberOfAttrs = x.getNumberOfAttrs() and
getNumberOfFields = x.getNumberOfFields() and
if x.hasTy() then hasTy = "yes" else hasTy = "no"
select x, "getNumberOfAttrs:", getNumberOfAttrs, "getNumberOfFields:", getNumberOfFields, "hasTy:",
hasTy
if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no"
select x, "getNumberOfAttrs:", getNumberOfAttrs, "getNumberOfFields:", getNumberOfFields,
"hasTypeRepr:", hasTypeRepr

View File

@@ -4,4 +4,4 @@ import TestUtils
from OffsetOfExpr x
where toBeTested(x) and not x.isUnknown()
select x, x.getTy()
select x, x.getTypeRepr()

View File

@@ -1 +1 @@
| gen_param.rs:5:12:5:15 | ...: T | getNumberOfAttrs: | 0 | hasTy: | yes | hasPat: | yes |
| gen_param.rs:5:12:5:15 | ...: T | getNumberOfAttrs: | 0 | hasTypeRepr: | yes | hasPat: | yes |

View File

@@ -2,11 +2,11 @@
import codeql.rust.elements
import TestUtils
from Param x, int getNumberOfAttrs, string hasTy, string hasPat
from Param x, int getNumberOfAttrs, string hasTypeRepr, string hasPat
where
toBeTested(x) and
not x.isUnknown() and
getNumberOfAttrs = x.getNumberOfAttrs() and
(if x.hasTy() then hasTy = "yes" else hasTy = "no") and
(if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no") and
if x.hasPat() then hasPat = "yes" else hasPat = "no"
select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasTy:", hasTy, "hasPat:", hasPat
select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasTypeRepr:", hasTypeRepr, "hasPat:", hasPat

View File

@@ -4,4 +4,4 @@ import TestUtils
from Param x
where toBeTested(x) and not x.isUnknown()
select x, x.getTy()
select x, x.getTypeRepr()

View File

@@ -2,9 +2,9 @@
import codeql.rust.elements
import TestUtils
from ParenTypeRepr x, string hasTy
from ParenTypeRepr x, string hasTypeRepr
where
toBeTested(x) and
not x.isUnknown() and
if x.hasTy() then hasTy = "yes" else hasTy = "no"
select x, "hasTy:", hasTy
if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no"
select x, "hasTypeRepr:", hasTypeRepr

View File

@@ -4,4 +4,4 @@ import TestUtils
from ParenTypeRepr x
where toBeTested(x) and not x.isUnknown()
select x, x.getTy()
select x, x.getTypeRepr()

View File

@@ -1,26 +1,26 @@
| gen_path.rs:5:9:5:18 | some_crate | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no |
| gen_path.rs:5:21:5:31 | some_module | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no |
| gen_path.rs:5:34:5:42 | some_item | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no |
| gen_path.rs:6:5:6:7 | foo | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no |
| gen_path.rs:6:10:6:12 | bar | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no |
| gen_path_expr.rs:5:13:5:20 | variable | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no |
| gen_path_expr.rs:6:13:6:15 | foo | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no |
| gen_path_expr.rs:6:18:6:20 | bar | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no |
| gen_path_expr.rs:7:13:7:15 | <...> | hasGenericArgList: | no | hasNameRef: | no | hasParamList: | no | hasPathType: | yes | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | yes |
| gen_path_expr.rs:7:14:7:14 | T | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no |
| gen_path_expr.rs:7:14:7:14 | T | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no |
| gen_path_expr.rs:7:18:7:20 | foo | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no |
| gen_path_expr.rs:8:13:8:31 | <...> | hasGenericArgList: | no | hasNameRef: | no | hasParamList: | no | hasPathType: | yes | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | yes |
| gen_path_expr.rs:8:14:8:21 | TypeRepr | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no |
| gen_path_expr.rs:8:14:8:21 | TypeRepr | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no |
| gen_path_expr.rs:8:34:8:36 | foo | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no |
| gen_path_pat.rs:5:11:5:11 | x | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no |
| gen_path_pat.rs:6:9:6:11 | Foo | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no |
| gen_path_pat.rs:6:14:6:16 | Bar | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no |
| gen_path_type_repr.rs:5:14:5:16 | std | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no |
| gen_path_type_repr.rs:5:19:5:29 | collections | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no |
| gen_path_type_repr.rs:5:32:5:48 | HashMap::<...> | hasGenericArgList: | yes | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no |
| gen_path_type_repr.rs:5:40:5:42 | i32 | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no |
| gen_path_type_repr.rs:5:45:5:47 | i32 | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no |
| gen_path_type_repr.rs:6:14:6:14 | X | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no |
| gen_path_type_repr.rs:6:17:6:20 | Item | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no |
| gen_path.rs:5:9:5:18 | some_crate | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no |
| gen_path.rs:5:21:5:31 | some_module | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no |
| gen_path.rs:5:34:5:42 | some_item | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no |
| gen_path.rs:6:5:6:7 | foo | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no |
| gen_path.rs:6:10:6:12 | bar | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no |
| gen_path_expr.rs:5:13:5:20 | variable | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no |
| gen_path_expr.rs:6:13:6:15 | foo | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no |
| gen_path_expr.rs:6:18:6:20 | bar | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no |
| gen_path_expr.rs:7:13:7:15 | <...> | hasGenericArgList: | no | hasNameRef: | no | hasParamList: | no | hasPathType: | yes | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | yes |
| gen_path_expr.rs:7:14:7:14 | T | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no |
| gen_path_expr.rs:7:14:7:14 | T | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no |
| gen_path_expr.rs:7:18:7:20 | foo | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no |
| gen_path_expr.rs:8:13:8:31 | <...> | hasGenericArgList: | no | hasNameRef: | no | hasParamList: | no | hasPathType: | yes | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | yes |
| gen_path_expr.rs:8:14:8:21 | TypeRepr | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no |
| gen_path_expr.rs:8:14:8:21 | TypeRepr | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no |
| gen_path_expr.rs:8:34:8:36 | foo | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no |
| gen_path_pat.rs:5:11:5:11 | x | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no |
| gen_path_pat.rs:6:9:6:11 | Foo | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no |
| gen_path_pat.rs:6:14:6:16 | Bar | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no |
| gen_path_type_repr.rs:5:14:5:16 | std | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no |
| gen_path_type_repr.rs:5:19:5:29 | collections | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no |
| gen_path_type_repr.rs:5:32:5:48 | HashMap::<...> | hasGenericArgList: | yes | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no |
| gen_path_type_repr.rs:5:40:5:42 | i32 | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no |
| gen_path_type_repr.rs:5:45:5:47 | i32 | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no |
| gen_path_type_repr.rs:6:14:6:14 | X | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no |
| gen_path_type_repr.rs:6:17:6:20 | Item | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no |

View File

@@ -4,7 +4,7 @@ import TestUtils
from
PathSegment x, string hasGenericArgList, string hasNameRef, string hasParamList,
string hasPathType, string hasRetType, string hasReturnTypeSyntax, string hasTy
string hasPathType, string hasRetType, string hasReturnTypeSyntax, string hasTypeRepr
where
toBeTested(x) and
not x.isUnknown() and
@@ -14,7 +14,7 @@ where
(if x.hasPathType() then hasPathType = "yes" else hasPathType = "no") and
(if x.hasRetType() then hasRetType = "yes" else hasRetType = "no") and
(if x.hasReturnTypeSyntax() then hasReturnTypeSyntax = "yes" else hasReturnTypeSyntax = "no") and
if x.hasTy() then hasTy = "yes" else hasTy = "no"
if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no"
select x, "hasGenericArgList:", hasGenericArgList, "hasNameRef:", hasNameRef, "hasParamList:",
hasParamList, "hasPathType:", hasPathType, "hasRetType:", hasRetType, "hasReturnTypeSyntax:",
hasReturnTypeSyntax, "hasTy:", hasTy
hasReturnTypeSyntax, "hasTypeRepr:", hasTypeRepr

View File

@@ -4,4 +4,4 @@ import TestUtils
from PathSegment x
where toBeTested(x) and not x.isUnknown()
select x, x.getTy()
select x, x.getTypeRepr()

View File

@@ -2,11 +2,11 @@
import codeql.rust.elements
import TestUtils
from PtrTypeRepr x, string isConst, string isMut, string hasTy
from PtrTypeRepr x, string isConst, string isMut, string hasTypeRepr
where
toBeTested(x) and
not x.isUnknown() and
(if x.isConst() then isConst = "yes" else isConst = "no") and
(if x.isMut() then isMut = "yes" else isMut = "no") and
if x.hasTy() then hasTy = "yes" else hasTy = "no"
select x, "isConst:", isConst, "isMut:", isMut, "hasTy:", hasTy
if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no"
select x, "isConst:", isConst, "isMut:", isMut, "hasTypeRepr:", hasTypeRepr

View File

@@ -4,4 +4,4 @@ import TestUtils
from PtrTypeRepr x
where toBeTested(x) and not x.isUnknown()
select x, x.getTy()
select x, x.getTypeRepr()

View File

@@ -2,13 +2,13 @@
import codeql.rust.elements
import TestUtils
from RecordField x, int getNumberOfAttrs, string hasName, string hasTy, string hasVisibility
from RecordField x, int getNumberOfAttrs, string hasName, string hasTypeRepr, string hasVisibility
where
toBeTested(x) and
not x.isUnknown() and
getNumberOfAttrs = x.getNumberOfAttrs() and
(if x.hasName() then hasName = "yes" else hasName = "no") and
(if x.hasTy() then hasTy = "yes" else hasTy = "no") and
(if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no") and
if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no"
select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasName:", hasName, "hasTy:", hasTy,
select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasName:", hasName, "hasTypeRepr:", hasTypeRepr,
"hasVisibility:", hasVisibility

View File

@@ -4,4 +4,4 @@ import TestUtils
from RecordField x
where toBeTested(x) and not x.isUnknown()
select x, x.getTy()
select x, x.getTypeRepr()

View File

@@ -2,11 +2,11 @@
import codeql.rust.elements
import TestUtils
from RefTypeRepr x, string isMut, string hasLifetime, string hasTy
from RefTypeRepr x, string isMut, string hasLifetime, string hasTypeRepr
where
toBeTested(x) and
not x.isUnknown() and
(if x.isMut() then isMut = "yes" else isMut = "no") and
(if x.hasLifetime() then hasLifetime = "yes" else hasLifetime = "no") and
if x.hasTy() then hasTy = "yes" else hasTy = "no"
select x, "isMut:", isMut, "hasLifetime:", hasLifetime, "hasTy:", hasTy
if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no"
select x, "isMut:", isMut, "hasLifetime:", hasLifetime, "hasTypeRepr:", hasTypeRepr

View File

@@ -4,4 +4,4 @@ import TestUtils
from RefTypeRepr x
where toBeTested(x) and not x.isUnknown()
select x, x.getTy()
select x, x.getTypeRepr()

View File

@@ -1 +1,2 @@
| gen_ret_type_repr.rs:3:25:3:29 | RetTypeRepr | hasTy: | yes |
| gen_ret_type_repr.rs:3:25:3:29 | RetTypeRepr | hasTypeRepr: | yes |

View File

@@ -2,9 +2,9 @@
import codeql.rust.elements
import TestUtils
from RetTypeRepr x, string hasTy
from RetTypeRepr x, string hasTypeRepr
where
toBeTested(x) and
not x.isUnknown() and
if x.hasTy() then hasTy = "yes" else hasTy = "no"
select x, "hasTy:", hasTy
if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no"
select x, "hasTypeRepr:", hasTypeRepr

View File

@@ -4,4 +4,4 @@ import TestUtils
from RetTypeRepr x
where toBeTested(x) and not x.isUnknown()
select x, x.getTy()
select x, x.getTypeRepr()

View File

@@ -1 +1 @@
| gen_self_param.rs:5:13:5:21 | SelfParam | getNumberOfAttrs: | 0 | hasTy: | no | isMut: | yes | hasLifetime: | no | hasName: | yes |
| gen_self_param.rs:5:13:5:21 | SelfParam | getNumberOfAttrs: | 0 | hasTypeRepr: | no | isMut: | yes | hasLifetime: | no | hasName: | yes |

View File

@@ -3,14 +3,15 @@ import codeql.rust.elements
import TestUtils
from
SelfParam x, int getNumberOfAttrs, string hasTy, string isMut, string hasLifetime, string hasName
SelfParam x, int getNumberOfAttrs, string hasTypeRepr, string isMut, string hasLifetime,
string hasName
where
toBeTested(x) and
not x.isUnknown() and
getNumberOfAttrs = x.getNumberOfAttrs() and
(if x.hasTy() then hasTy = "yes" else hasTy = "no") and
(if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no") and
(if x.isMut() then isMut = "yes" else isMut = "no") and
(if x.hasLifetime() then hasLifetime = "yes" else hasLifetime = "no") and
if x.hasName() then hasName = "yes" else hasName = "no"
select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasTy:", hasTy, "isMut:", isMut, "hasLifetime:",
hasLifetime, "hasName:", hasName
select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasTypeRepr:", hasTypeRepr, "isMut:", isMut,
"hasLifetime:", hasLifetime, "hasName:", hasName

View File

@@ -4,4 +4,4 @@ import TestUtils
from SelfParam x
where toBeTested(x) and not x.isUnknown()
select x, x.getTy()
select x, x.getTypeRepr()

View File

@@ -2,9 +2,9 @@
import codeql.rust.elements
import TestUtils
from SliceTypeRepr x, string hasTy
from SliceTypeRepr x, string hasTypeRepr
where
toBeTested(x) and
not x.isUnknown() and
if x.hasTy() then hasTy = "yes" else hasTy = "no"
select x, "hasTy:", hasTy
if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no"
select x, "hasTypeRepr:", hasTypeRepr

View File

@@ -4,4 +4,4 @@ import TestUtils
from SliceTypeRepr x
where toBeTested(x) and not x.isUnknown()
select x, x.getTy()
select x, x.getTypeRepr()

View File

@@ -4,7 +4,8 @@ import TestUtils
from
Static x, string hasExtendedCanonicalPath, string hasCrateOrigin, int getNumberOfAttrs,
string hasBody, string isMut, string isStatic, string hasName, string hasTy, string hasVisibility
string hasBody, string isMut, string isStatic, string hasName, string hasTypeRepr,
string hasVisibility
where
toBeTested(x) and
not x.isUnknown() and
@@ -19,8 +20,8 @@ where
(if x.isMut() then isMut = "yes" else isMut = "no") and
(if x.isStatic() then isStatic = "yes" else isStatic = "no") and
(if x.hasName() then hasName = "yes" else hasName = "no") and
(if x.hasTy() then hasTy = "yes" else hasTy = "no") and
(if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no") and
if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no"
select x, "hasExtendedCanonicalPath:", hasExtendedCanonicalPath, "hasCrateOrigin:", hasCrateOrigin,
"getNumberOfAttrs:", getNumberOfAttrs, "hasBody:", hasBody, "isMut:", isMut, "isStatic:",
isStatic, "hasName:", hasName, "hasTy:", hasTy, "hasVisibility:", hasVisibility
isStatic, "hasName:", hasName, "hasTypeRepr:", hasTypeRepr, "hasVisibility:", hasVisibility

View File

@@ -4,4 +4,4 @@ import TestUtils
from Static x
where toBeTested(x) and not x.isUnknown()
select x, x.getTy()
select x, x.getTypeRepr()

View File

@@ -2,11 +2,12 @@
import codeql.rust.elements
import TestUtils
from TupleField x, int getNumberOfAttrs, string hasTy, string hasVisibility
from TupleField x, int getNumberOfAttrs, string hasTypeRepr, string hasVisibility
where
toBeTested(x) and
not x.isUnknown() and
getNumberOfAttrs = x.getNumberOfAttrs() and
(if x.hasTy() then hasTy = "yes" else hasTy = "no") and
(if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no") and
if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no"
select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasTy:", hasTy, "hasVisibility:", hasVisibility
select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasTypeRepr:", hasTypeRepr, "hasVisibility:",
hasVisibility

View File

@@ -4,4 +4,4 @@ import TestUtils
from TupleField x
where toBeTested(x) and not x.isUnknown()
select x, x.getTy()
select x, x.getTypeRepr()

View File

@@ -4,7 +4,7 @@ import TestUtils
from
TypeAlias x, string hasExtendedCanonicalPath, string hasCrateOrigin, int getNumberOfAttrs,
string hasGenericParamList, string isDefault, string hasName, string hasTy,
string hasGenericParamList, string isDefault, string hasName, string hasTypeRepr,
string hasTypeBoundList, string hasVisibility, string hasWhereClause
where
toBeTested(x) and
@@ -19,11 +19,11 @@ where
(if x.hasGenericParamList() then hasGenericParamList = "yes" else hasGenericParamList = "no") and
(if x.isDefault() then isDefault = "yes" else isDefault = "no") and
(if x.hasName() then hasName = "yes" else hasName = "no") and
(if x.hasTy() then hasTy = "yes" else hasTy = "no") and
(if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no") and
(if x.hasTypeBoundList() then hasTypeBoundList = "yes" else hasTypeBoundList = "no") and
(if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no") and
if x.hasWhereClause() then hasWhereClause = "yes" else hasWhereClause = "no"
select x, "hasExtendedCanonicalPath:", hasExtendedCanonicalPath, "hasCrateOrigin:", hasCrateOrigin,
"getNumberOfAttrs:", getNumberOfAttrs, "hasGenericParamList:", hasGenericParamList, "isDefault:",
isDefault, "hasName:", hasName, "hasTy:", hasTy, "hasTypeBoundList:", hasTypeBoundList,
"hasVisibility:", hasVisibility, "hasWhereClause:", hasWhereClause
isDefault, "hasName:", hasName, "hasTypeRepr:", hasTypeRepr, "hasTypeBoundList:",
hasTypeBoundList, "hasVisibility:", hasVisibility, "hasWhereClause:", hasWhereClause

View File

@@ -4,4 +4,4 @@ import TestUtils
from TypeAlias x
where toBeTested(x) and not x.isUnknown()
select x, x.getTy()
select x, x.getTypeRepr()

View File

@@ -2,9 +2,9 @@
import codeql.rust.elements
import TestUtils
from TypeArg x, string hasTy
from TypeArg x, string hasTypeRepr
where
toBeTested(x) and
not x.isUnknown() and
if x.hasTy() then hasTy = "yes" else hasTy = "no"
select x, "hasTy:", hasTy
if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no"
select x, "hasTypeRepr:", hasTypeRepr

View File

@@ -4,4 +4,4 @@ import TestUtils
from TypeArg x
where toBeTested(x) and not x.isUnknown()
select x, x.getTy()
select x, x.getTypeRepr()

View File

@@ -4,7 +4,7 @@ import TestUtils
from
TypeBound x, string hasGenericParamList, string isAsync, string isConst, string hasLifetime,
string hasTy
string hasTypeRepr
where
toBeTested(x) and
not x.isUnknown() and
@@ -12,6 +12,6 @@ where
(if x.isAsync() then isAsync = "yes" else isAsync = "no") and
(if x.isConst() then isConst = "yes" else isConst = "no") and
(if x.hasLifetime() then hasLifetime = "yes" else hasLifetime = "no") and
if x.hasTy() then hasTy = "yes" else hasTy = "no"
if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no"
select x, "hasGenericParamList:", hasGenericParamList, "isAsync:", isAsync, "isConst:", isConst,
"hasLifetime:", hasLifetime, "hasTy:", hasTy
"hasLifetime:", hasLifetime, "hasTypeRepr:", hasTypeRepr

View File

@@ -4,4 +4,4 @@ import TestUtils
from TypeBound x
where toBeTested(x) and not x.isUnknown()
select x, x.getTy()
select x, x.getTypeRepr()

View File

@@ -3,13 +3,14 @@ import codeql.rust.elements
import TestUtils
from
WherePred x, string hasGenericParamList, string hasLifetime, string hasTy, string hasTypeBoundList
WherePred x, string hasGenericParamList, string hasLifetime, string hasTypeRepr,
string hasTypeBoundList
where
toBeTested(x) and
not x.isUnknown() and
(if x.hasGenericParamList() then hasGenericParamList = "yes" else hasGenericParamList = "no") and
(if x.hasLifetime() then hasLifetime = "yes" else hasLifetime = "no") and
(if x.hasTy() then hasTy = "yes" else hasTy = "no") and
(if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no") and
if x.hasTypeBoundList() then hasTypeBoundList = "yes" else hasTypeBoundList = "no"
select x, "hasGenericParamList:", hasGenericParamList, "hasLifetime:", hasLifetime, "hasTy:", hasTy,
"hasTypeBoundList:", hasTypeBoundList
select x, "hasGenericParamList:", hasGenericParamList, "hasLifetime:", hasLifetime, "hasTypeRepr:",
hasTypeRepr, "hasTypeBoundList:", hasTypeBoundList

View File

@@ -4,4 +4,4 @@ import TestUtils
from WherePred x
where toBeTested(x) and not x.isUnknown()
select x, x.getTy()
select x, x.getTypeRepr()