Skip to content

Commit 9267d9f

Browse files
committed
Remove force_ex!.
1 parent 1183d60 commit 9267d9f

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

src/librustc/ty/query/plumbing.rs

+5-13
Original file line numberDiff line numberDiff line change
@@ -1191,18 +1191,6 @@ pub fn force_from_dep_node(tcx: TyCtxt<'_>, dep_node: &DepNode) -> bool {
11911191
return false
11921192
}
11931193

1194-
macro_rules! force_ex {
1195-
($tcx:expr, $query:ident, $key:expr) => {
1196-
{
1197-
$tcx.force_query::<crate::ty::query::queries::$query<'_>>(
1198-
$key,
1199-
DUMMY_SP,
1200-
*dep_node
1201-
);
1202-
}
1203-
}
1204-
};
1205-
12061194
rustc_dep_node_force!([dep_node, tcx]
12071195
// These are inputs that are expected to be pre-allocated and that
12081196
// should therefore always be red or green already.
@@ -1228,7 +1216,11 @@ pub fn force_from_dep_node(tcx: TyCtxt<'_>, dep_node: &DepNode) -> bool {
12281216
// Return from the whole function.
12291217
return false
12301218
};
1231-
force_ex!(tcx, analysis, def_id.krate);
1219+
tcx.force_query::<crate::ty::query::queries::analysis<'_>>(
1220+
def_id.krate,
1221+
DUMMY_SP,
1222+
*dep_node
1223+
);
12321224
}
12331225
);
12341226

src/librustc_macros/src/query.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,11 @@ pub fn rustc_queries(input: TokenStream) -> TokenStream {
495495
dep_node_force_stream.extend(quote! {
496496
DepKind::#name => {
497497
if let Some(key) = RecoverKey::recover($tcx, $dep_node) {
498-
force_ex!($tcx, #name, key);
498+
$tcx.force_query::<crate::ty::query::queries::#name<'_>>(
499+
key,
500+
DUMMY_SP,
501+
*$dep_node
502+
);
499503
} else {
500504
return false;
501505
}

0 commit comments

Comments
 (0)