Rust: fix downgrade script

This commit is contained in:
Paolo Tranquilli
2025-04-30 16:38:13 +02:00
parent 8ffe4d6593
commit 6ecaf65132
5 changed files with 13 additions and 13 deletions

View File

@@ -1960,9 +1960,9 @@ infer_type_reprs(
;
#keyset[id]
item_expandeds(
item_attribute_macro_expansions(
int id: @item ref,
int expanded: @ast_node ref
int attribute_macro_expansion: @macro_items ref
);
@labelable_expr =
@@ -3088,6 +3088,12 @@ macro_call_token_trees(
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
);

View File

@@ -0,0 +1,5 @@
description: Rename `macro_call_expansion` to `expanded`, and remove `attribute_macro_expansion`
compatibility: backwards
macro_call_expandeds.rel: reorder macro_call_macro_call_expansions.rel (@macro_call id, @ast_node expanded) id expanded
macro_call_macro_call_expansions.rel: delete
item_attribute_macro_expansions.rel: delete

View File

@@ -1,7 +0,0 @@
class Element extends @element {
string toString() { none() }
}
query predicate new_macro_call_expandeds(Element id, Element expanded) {
item_expandeds(id, expanded) and macro_calls(id)
}

View File

@@ -1,4 +0,0 @@
description: Move `expanded` back from all `@item`s to `@macro_call`s only
compatibility: backwards
item_expandeds.rel: delete
macro_call_expandeds.rel: run downgrade.ql new_macro_call_expandeds