Rust: fix canonical paths broken on StructExpr and StructPath

After the rename done in https://github.com/github/codeql/pull/19059,
canonical path extraction was lost on `StructExpr` and `StructPath` as
the identifiers used for the type in the `emit_detached!` macro were not
updated. This fixes that.
This commit is contained in:
Paolo Tranquilli
2025-03-20 12:16:47 +01:00
parent b09669646d
commit b77c13802b
2 changed files with 7 additions and 7 deletions

View File

@@ -53,13 +53,13 @@ macro_rules! emit_detached {
(PathExpr, $self:ident, $node:ident, $label:ident) => {
$self.extract_path_canonical_destination(&$node, $label.into());
};
(RecordExpr, $self:ident, $node:ident, $label:ident) => {
(StructExpr, $self:ident, $node:ident, $label:ident) => {
$self.extract_path_canonical_destination(&$node, $label.into());
};
(PathPat, $self:ident, $node:ident, $label:ident) => {
$self.extract_path_canonical_destination(&$node, $label.into());
};
(RecordPat, $self:ident, $node:ident, $label:ident) => {
(StructPat, $self:ident, $node:ident, $label:ident) => {
$self.extract_path_canonical_destination(&$node, $label.into());
};
(TupleStructPat, $self:ident, $node:ident, $label:ident) => {