Rust: run codegen

This commit is contained in:
Arthur Baars
2025-05-29 18:58:01 +02:00
parent 0dd0f9a22a
commit f0db47b571
431 changed files with 3484 additions and 1258 deletions

View File

@@ -1,4 +0,0 @@
// generated by codegen, do not edit
After a source file is added in this directory and codegen is run again, test queries
will appear and this file will be deleted

View File

@@ -0,0 +1,10 @@
// generated by codegen, do not edit
import codeql.rust.elements
import TestUtils
from UseBoundGenericArgs x, int getNumberOfUseBoundGenericArgs
where
toBeTested(x) and
not x.isUnknown() and
getNumberOfUseBoundGenericArgs = x.getNumberOfUseBoundGenericArgs()
select x, "getNumberOfUseBoundGenericArgs:", getNumberOfUseBoundGenericArgs

View File

@@ -0,0 +1,7 @@
// generated by codegen, do not edit
import codeql.rust.elements
import TestUtils
from UseBoundGenericArgs x, int index
where toBeTested(x) and not x.isUnknown()
select x, index, x.getUseBoundGenericArg(index)

View File

@@ -0,0 +1,9 @@
// generated by codegen, do not edit
fn test_use_bound_generic_args() -> () {
// A use<..> bound to control which generic parameters are captured by an impl Trait return type.
//
// For example:
pub fn hello<'a, T, const N: usize>() -> impl Sized + use<'a, T, N> {}
// ^^^^^^^^
}