mirror of
https://github.com/github/codeql.git
synced 2026-05-04 13:15:21 +02:00
Merge branch 'main' into redsun82/rust-canonical-enum
This commit is contained in:
2
rust/extractor/src/generated/.generated.list
generated
2
rust/extractor/src/generated/.generated.list
generated
@@ -1,2 +1,2 @@
|
||||
mod.rs 4bcb9def847469aae9d8649461546b7c21ec97cf6e63d3cf394e339915ce65d7 4bcb9def847469aae9d8649461546b7c21ec97cf6e63d3cf394e339915ce65d7
|
||||
top.rs bc12e91ac724df9ca0c5d438067762d7e540bc20bde01c053af048b2a8391e2e bc12e91ac724df9ca0c5d438067762d7e540bc20bde01c053af048b2a8391e2e
|
||||
top.rs 272ecf2f56f35211d2449dbf55b1907d8414a8e4cceded03fd12f6f599852c73 272ecf2f56f35211d2449dbf55b1907d8414a8e4cceded03fd12f6f599852c73
|
||||
|
||||
18
rust/extractor/src/generated/top.rs
generated
18
rust/extractor/src/generated/top.rs
generated
@@ -4942,7 +4942,7 @@ impl From<trap::Label<LabelableExpr>> for trap::Label<Locatable> {
|
||||
pub struct LetExpr {
|
||||
pub id: trap::TrapId<LetExpr>,
|
||||
pub attrs: Vec<trap::Label<Attr>>,
|
||||
pub expr: Option<trap::Label<Expr>>,
|
||||
pub scrutinee: Option<trap::Label<Expr>>,
|
||||
pub pat: Option<trap::Label<Pat>>,
|
||||
}
|
||||
|
||||
@@ -4956,8 +4956,8 @@ impl trap::TrapEntry for LetExpr {
|
||||
for (i, v) in self.attrs.into_iter().enumerate() {
|
||||
out.add_tuple("let_expr_attrs", vec![id.into(), i.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.expr {
|
||||
out.add_tuple("let_expr_exprs", vec![id.into(), v.into()]);
|
||||
if let Some(v) = self.scrutinee {
|
||||
out.add_tuple("let_expr_scrutinees", vec![id.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.pat {
|
||||
out.add_tuple("let_expr_pats", vec![id.into(), v.into()]);
|
||||
@@ -5509,7 +5509,7 @@ impl From<trap::Label<MacroType>> for trap::Label<TypeRef> {
|
||||
pub struct MatchExpr {
|
||||
pub id: trap::TrapId<MatchExpr>,
|
||||
pub attrs: Vec<trap::Label<Attr>>,
|
||||
pub expr: Option<trap::Label<Expr>>,
|
||||
pub scrutinee: Option<trap::Label<Expr>>,
|
||||
pub match_arm_list: Option<trap::Label<MatchArmList>>,
|
||||
}
|
||||
|
||||
@@ -5523,8 +5523,8 @@ impl trap::TrapEntry for MatchExpr {
|
||||
for (i, v) in self.attrs.into_iter().enumerate() {
|
||||
out.add_tuple("match_expr_attrs", vec![id.into(), i.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.expr {
|
||||
out.add_tuple("match_expr_exprs", vec![id.into(), v.into()]);
|
||||
if let Some(v) = self.scrutinee {
|
||||
out.add_tuple("match_expr_scrutinees", vec![id.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.match_arm_list {
|
||||
out.add_tuple("match_expr_match_arm_lists", vec![id.into(), v.into()]);
|
||||
@@ -8120,7 +8120,7 @@ pub struct CallExpr {
|
||||
pub id: trap::TrapId<CallExpr>,
|
||||
pub arg_list: Option<trap::Label<ArgList>>,
|
||||
pub attrs: Vec<trap::Label<Attr>>,
|
||||
pub expr: Option<trap::Label<Expr>>,
|
||||
pub function: Option<trap::Label<Expr>>,
|
||||
}
|
||||
|
||||
impl trap::TrapEntry for CallExpr {
|
||||
@@ -8136,8 +8136,8 @@ impl trap::TrapEntry for CallExpr {
|
||||
for (i, v) in self.attrs.into_iter().enumerate() {
|
||||
out.add_tuple("call_expr_base_attrs", vec![id.into(), i.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.expr {
|
||||
out.add_tuple("call_expr_exprs", vec![id.into(), v.into()]);
|
||||
if let Some(v) = self.function {
|
||||
out.add_tuple("call_expr_functions", vec![id.into(), v.into()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
12
rust/extractor/src/translate/generated.rs
generated
12
rust/extractor/src/translate/generated.rs
generated
@@ -397,12 +397,12 @@ impl Translator<'_> {
|
||||
pub(crate) fn emit_call_expr(&mut self, node: ast::CallExpr) -> Label<generated::CallExpr> {
|
||||
let arg_list = node.arg_list().map(|x| self.emit_arg_list(x));
|
||||
let attrs = node.attrs().map(|x| self.emit_attr(x)).collect();
|
||||
let expr = node.expr().map(|x| self.emit_expr(x));
|
||||
let function = node.expr().map(|x| self.emit_expr(x));
|
||||
let label = self.trap.emit(generated::CallExpr {
|
||||
id: TrapId::Star,
|
||||
arg_list,
|
||||
attrs,
|
||||
expr,
|
||||
function,
|
||||
});
|
||||
self.emit_location(label, &node);
|
||||
emit_detached!(CallExpr, self, node, label);
|
||||
@@ -958,12 +958,12 @@ impl Translator<'_> {
|
||||
|
||||
pub(crate) fn emit_let_expr(&mut self, node: ast::LetExpr) -> Label<generated::LetExpr> {
|
||||
let attrs = node.attrs().map(|x| self.emit_attr(x)).collect();
|
||||
let expr = node.expr().map(|x| self.emit_expr(x));
|
||||
let scrutinee = node.expr().map(|x| self.emit_expr(x));
|
||||
let pat = node.pat().map(|x| self.emit_pat(x));
|
||||
let label = self.trap.emit(generated::LetExpr {
|
||||
id: TrapId::Star,
|
||||
attrs,
|
||||
expr,
|
||||
scrutinee,
|
||||
pat,
|
||||
});
|
||||
self.emit_location(label, &node);
|
||||
@@ -1224,12 +1224,12 @@ impl Translator<'_> {
|
||||
|
||||
pub(crate) fn emit_match_expr(&mut self, node: ast::MatchExpr) -> Label<generated::MatchExpr> {
|
||||
let attrs = node.attrs().map(|x| self.emit_attr(x)).collect();
|
||||
let expr = node.expr().map(|x| self.emit_expr(x));
|
||||
let scrutinee = node.expr().map(|x| self.emit_expr(x));
|
||||
let match_arm_list = node.match_arm_list().map(|x| self.emit_match_arm_list(x));
|
||||
let label = self.trap.emit(generated::MatchExpr {
|
||||
id: TrapId::Star,
|
||||
attrs,
|
||||
expr,
|
||||
scrutinee,
|
||||
match_arm_list,
|
||||
});
|
||||
self.emit_location(label, &node);
|
||||
|
||||
Reference in New Issue
Block a user