mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Rust: make AssocItem and ExternItem subclasses of Item
This commit is contained in:
@@ -164,13 +164,11 @@ named_crates(
|
||||
| @asm_option
|
||||
| @asm_piece
|
||||
| @asm_reg_spec
|
||||
| @assoc_item
|
||||
| @assoc_item_list
|
||||
| @attr
|
||||
| @callable
|
||||
| @closure_binder
|
||||
| @expr
|
||||
| @extern_item
|
||||
| @extern_item_list
|
||||
| @field_list
|
||||
| @format_args_arg
|
||||
@@ -349,13 +347,6 @@ asm_reg_spec_identifiers(
|
||||
int identifier: @name_ref ref
|
||||
);
|
||||
|
||||
@assoc_item =
|
||||
@const
|
||||
| @function
|
||||
| @macro_call
|
||||
| @type_alias
|
||||
;
|
||||
|
||||
assoc_item_lists(
|
||||
unique int id: @assoc_item_list
|
||||
);
|
||||
@@ -448,13 +439,6 @@ closure_binder_generic_param_lists(
|
||||
| @yield_expr
|
||||
;
|
||||
|
||||
@extern_item =
|
||||
@function
|
||||
| @macro_call
|
||||
| @static
|
||||
| @type_alias
|
||||
;
|
||||
|
||||
extern_item_lists(
|
||||
unique int id: @extern_item_list
|
||||
);
|
||||
@@ -1911,19 +1895,16 @@ infer_type_reprs(
|
||||
|
||||
@item =
|
||||
@adt
|
||||
| @const
|
||||
| @assoc_item
|
||||
| @extern_block
|
||||
| @extern_crate
|
||||
| @function
|
||||
| @extern_item
|
||||
| @impl
|
||||
| @macro_call
|
||||
| @macro_def
|
||||
| @macro_rules
|
||||
| @module
|
||||
| @static
|
||||
| @trait
|
||||
| @trait_alias
|
||||
| @type_alias
|
||||
| @use
|
||||
;
|
||||
|
||||
@@ -2718,6 +2699,13 @@ adt_derive_macro_expansions(
|
||||
int derive_macro_expansion: @macro_items ref
|
||||
);
|
||||
|
||||
@assoc_item =
|
||||
@const
|
||||
| @function
|
||||
| @macro_call
|
||||
| @type_alias
|
||||
;
|
||||
|
||||
block_exprs(
|
||||
unique int id: @block_expr
|
||||
);
|
||||
@@ -2775,68 +2763,6 @@ call_expr_functions(
|
||||
int function: @expr ref
|
||||
);
|
||||
|
||||
consts(
|
||||
unique int id: @const
|
||||
);
|
||||
|
||||
#keyset[id, index]
|
||||
const_attrs(
|
||||
int id: @const ref,
|
||||
int index: int ref,
|
||||
int attr: @attr ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
const_bodies(
|
||||
int id: @const ref,
|
||||
int body: @expr ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
const_generic_param_lists(
|
||||
int id: @const ref,
|
||||
int generic_param_list: @generic_param_list ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
const_is_const(
|
||||
int id: @const ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
const_is_default(
|
||||
int id: @const ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
const_names(
|
||||
int id: @const ref,
|
||||
int name: @name ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
const_type_reprs(
|
||||
int id: @const ref,
|
||||
int type_repr: @type_repr ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
const_visibilities(
|
||||
int id: @const ref,
|
||||
int visibility: @visibility ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
const_where_clauses(
|
||||
int id: @const ref,
|
||||
int where_clause: @where_clause ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
const_has_implementation(
|
||||
int id: @const ref
|
||||
);
|
||||
|
||||
extern_blocks(
|
||||
unique int id: @extern_block
|
||||
);
|
||||
@@ -2894,81 +2820,12 @@ extern_crate_visibilities(
|
||||
int visibility: @visibility ref
|
||||
);
|
||||
|
||||
functions(
|
||||
unique int id: @function
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
function_abis(
|
||||
int id: @function ref,
|
||||
int abi: @abi ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
function_bodies(
|
||||
int id: @function ref,
|
||||
int body: @block_expr ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
function_generic_param_lists(
|
||||
int id: @function ref,
|
||||
int generic_param_list: @generic_param_list ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
function_is_async(
|
||||
int id: @function ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
function_is_const(
|
||||
int id: @function ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
function_is_default(
|
||||
int id: @function ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
function_is_gen(
|
||||
int id: @function ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
function_is_unsafe(
|
||||
int id: @function ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
function_names(
|
||||
int id: @function ref,
|
||||
int name: @name ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
function_ret_types(
|
||||
int id: @function ref,
|
||||
int ret_type: @ret_type_repr ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
function_visibilities(
|
||||
int id: @function ref,
|
||||
int visibility: @visibility ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
function_where_clauses(
|
||||
int id: @function ref,
|
||||
int where_clause: @where_clause ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
function_has_implementation(
|
||||
int id: @function ref
|
||||
);
|
||||
@extern_item =
|
||||
@function
|
||||
| @macro_call
|
||||
| @static
|
||||
| @type_alias
|
||||
;
|
||||
|
||||
impls(
|
||||
unique int id: @impl
|
||||
@@ -3044,35 +2901,6 @@ looping_expr_loop_bodies(
|
||||
int loop_body: @block_expr ref
|
||||
);
|
||||
|
||||
macro_calls(
|
||||
unique int id: @macro_call
|
||||
);
|
||||
|
||||
#keyset[id, index]
|
||||
macro_call_attrs(
|
||||
int id: @macro_call ref,
|
||||
int index: int ref,
|
||||
int attr: @attr ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
macro_call_paths(
|
||||
int id: @macro_call ref,
|
||||
int path: @path ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
macro_call_token_trees(
|
||||
int id: @macro_call ref,
|
||||
int token_tree: @token_tree ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
macro_call_macro_call_expansions(
|
||||
int id: @macro_call ref,
|
||||
int macro_call_expansion: @ast_node ref
|
||||
);
|
||||
|
||||
macro_defs(
|
||||
unique int id: @macro_def
|
||||
);
|
||||
@@ -3203,56 +3031,6 @@ path_pats(
|
||||
unique int id: @path_pat
|
||||
);
|
||||
|
||||
statics(
|
||||
unique int id: @static
|
||||
);
|
||||
|
||||
#keyset[id, index]
|
||||
static_attrs(
|
||||
int id: @static ref,
|
||||
int index: int ref,
|
||||
int attr: @attr ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
static_bodies(
|
||||
int id: @static ref,
|
||||
int body: @expr ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
static_is_mut(
|
||||
int id: @static ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
static_is_static(
|
||||
int id: @static ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
static_is_unsafe(
|
||||
int id: @static ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
static_names(
|
||||
int id: @static ref,
|
||||
int name: @name ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
static_type_reprs(
|
||||
int id: @static ref,
|
||||
int type_repr: @type_repr ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
static_visibilities(
|
||||
int id: @static ref,
|
||||
int visibility: @visibility ref
|
||||
);
|
||||
|
||||
struct_exprs(
|
||||
unique int id: @struct_expr
|
||||
);
|
||||
@@ -3382,58 +3160,6 @@ tuple_struct_pat_fields(
|
||||
int field: @pat ref
|
||||
);
|
||||
|
||||
type_aliases(
|
||||
unique int id: @type_alias
|
||||
);
|
||||
|
||||
#keyset[id, index]
|
||||
type_alias_attrs(
|
||||
int id: @type_alias ref,
|
||||
int index: int ref,
|
||||
int attr: @attr ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
type_alias_generic_param_lists(
|
||||
int id: @type_alias ref,
|
||||
int generic_param_list: @generic_param_list ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
type_alias_is_default(
|
||||
int id: @type_alias ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
type_alias_names(
|
||||
int id: @type_alias ref,
|
||||
int name: @name ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
type_alias_type_reprs(
|
||||
int id: @type_alias ref,
|
||||
int type_repr: @type_repr ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
type_alias_type_bound_lists(
|
||||
int id: @type_alias ref,
|
||||
int type_bound_list: @type_bound_list ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
type_alias_visibilities(
|
||||
int id: @type_alias ref,
|
||||
int visibility: @visibility ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
type_alias_where_clauses(
|
||||
int id: @type_alias ref,
|
||||
int where_clause: @where_clause ref
|
||||
);
|
||||
|
||||
uses(
|
||||
unique int id: @use
|
||||
);
|
||||
@@ -3457,6 +3183,68 @@ use_visibilities(
|
||||
int visibility: @visibility ref
|
||||
);
|
||||
|
||||
consts(
|
||||
unique int id: @const
|
||||
);
|
||||
|
||||
#keyset[id, index]
|
||||
const_attrs(
|
||||
int id: @const ref,
|
||||
int index: int ref,
|
||||
int attr: @attr ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
const_bodies(
|
||||
int id: @const ref,
|
||||
int body: @expr ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
const_generic_param_lists(
|
||||
int id: @const ref,
|
||||
int generic_param_list: @generic_param_list ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
const_is_const(
|
||||
int id: @const ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
const_is_default(
|
||||
int id: @const ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
const_names(
|
||||
int id: @const ref,
|
||||
int name: @name ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
const_type_reprs(
|
||||
int id: @const ref,
|
||||
int type_repr: @type_repr ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
const_visibilities(
|
||||
int id: @const ref,
|
||||
int visibility: @visibility ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
const_where_clauses(
|
||||
int id: @const ref,
|
||||
int where_clause: @where_clause ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
const_has_implementation(
|
||||
int id: @const ref
|
||||
);
|
||||
|
||||
enums(
|
||||
unique int id: @enum
|
||||
);
|
||||
@@ -3521,6 +3309,82 @@ for_expr_pats(
|
||||
int pat: @pat ref
|
||||
);
|
||||
|
||||
functions(
|
||||
unique int id: @function
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
function_abis(
|
||||
int id: @function ref,
|
||||
int abi: @abi ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
function_bodies(
|
||||
int id: @function ref,
|
||||
int body: @block_expr ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
function_generic_param_lists(
|
||||
int id: @function ref,
|
||||
int generic_param_list: @generic_param_list ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
function_is_async(
|
||||
int id: @function ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
function_is_const(
|
||||
int id: @function ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
function_is_default(
|
||||
int id: @function ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
function_is_gen(
|
||||
int id: @function ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
function_is_unsafe(
|
||||
int id: @function ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
function_names(
|
||||
int id: @function ref,
|
||||
int name: @name ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
function_ret_types(
|
||||
int id: @function ref,
|
||||
int ret_type: @ret_type_repr ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
function_visibilities(
|
||||
int id: @function ref,
|
||||
int visibility: @visibility ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
function_where_clauses(
|
||||
int id: @function ref,
|
||||
int where_clause: @where_clause ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
function_has_implementation(
|
||||
int id: @function ref
|
||||
);
|
||||
|
||||
loop_exprs(
|
||||
unique int id: @loop_expr
|
||||
);
|
||||
@@ -3532,6 +3396,85 @@ loop_expr_attrs(
|
||||
int attr: @attr ref
|
||||
);
|
||||
|
||||
macro_calls(
|
||||
unique int id: @macro_call
|
||||
);
|
||||
|
||||
#keyset[id, index]
|
||||
macro_call_attrs(
|
||||
int id: @macro_call ref,
|
||||
int index: int ref,
|
||||
int attr: @attr ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
macro_call_paths(
|
||||
int id: @macro_call ref,
|
||||
int path: @path ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
macro_call_token_trees(
|
||||
int id: @macro_call ref,
|
||||
int token_tree: @token_tree ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
macro_call_macro_call_expansions(
|
||||
int id: @macro_call ref,
|
||||
int macro_call_expansion: @ast_node ref
|
||||
);
|
||||
|
||||
statics(
|
||||
unique int id: @static
|
||||
);
|
||||
|
||||
#keyset[id, index]
|
||||
static_attrs(
|
||||
int id: @static ref,
|
||||
int index: int ref,
|
||||
int attr: @attr ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
static_bodies(
|
||||
int id: @static ref,
|
||||
int body: @expr ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
static_is_mut(
|
||||
int id: @static ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
static_is_static(
|
||||
int id: @static ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
static_is_unsafe(
|
||||
int id: @static ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
static_names(
|
||||
int id: @static ref,
|
||||
int name: @name ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
static_type_reprs(
|
||||
int id: @static ref,
|
||||
int type_repr: @type_repr ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
static_visibilities(
|
||||
int id: @static ref,
|
||||
int visibility: @visibility ref
|
||||
);
|
||||
|
||||
structs(
|
||||
unique int id: @struct
|
||||
);
|
||||
@@ -3573,6 +3516,58 @@ struct_where_clauses(
|
||||
int where_clause: @where_clause ref
|
||||
);
|
||||
|
||||
type_aliases(
|
||||
unique int id: @type_alias
|
||||
);
|
||||
|
||||
#keyset[id, index]
|
||||
type_alias_attrs(
|
||||
int id: @type_alias ref,
|
||||
int index: int ref,
|
||||
int attr: @attr ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
type_alias_generic_param_lists(
|
||||
int id: @type_alias ref,
|
||||
int generic_param_list: @generic_param_list ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
type_alias_is_default(
|
||||
int id: @type_alias ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
type_alias_names(
|
||||
int id: @type_alias ref,
|
||||
int name: @name ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
type_alias_type_reprs(
|
||||
int id: @type_alias ref,
|
||||
int type_repr: @type_repr ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
type_alias_type_bound_lists(
|
||||
int id: @type_alias ref,
|
||||
int type_bound_list: @type_bound_list ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
type_alias_visibilities(
|
||||
int id: @type_alias ref,
|
||||
int visibility: @visibility ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
type_alias_where_clauses(
|
||||
int id: @type_alias ref,
|
||||
int where_clause: @where_clause ref
|
||||
);
|
||||
|
||||
unions(
|
||||
unique int id: @union
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user