Skip to content

Commit

Permalink
Rollup merge of rust-lang#100243 - kckeiks:remove-macros-in-query-sys…
Browse files Browse the repository at this point in the history
…tem, r=cjgillot

Remove opt_remap_env_constness from rustc_query_impl

1st task off rust-lang#96524.

r? `@cjgillot`
  • Loading branch information
TaKO8Ki authored Aug 16, 2022
2 parents a39bdb1 + 3a37f0b commit e6d4792
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions compiler/rustc_query_impl/src/plumbing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,21 +233,10 @@ macro_rules! get_provider {
};
}

macro_rules! opt_remap_env_constness {
([][$name:ident]) => {};
([(remap_env_constness) $($rest:tt)*][$name:ident]) => {
let $name = $name.without_const();
};
([$other:tt $($modifiers:tt)*][$name:ident]) => {
opt_remap_env_constness!([$($modifiers)*][$name])
};
}

macro_rules! define_queries {
(<$tcx:tt>
$($(#[$attr:meta])*
[$($modifiers:tt)*] fn $name:ident($($K:tt)*) -> $V:ty,)*) => {

define_queries_struct! {
tcx: $tcx,
input: ($(([$($modifiers)*] [$($attr)*] [$name]))*)
Expand All @@ -259,7 +248,6 @@ macro_rules! define_queries {
// Create an eponymous constructor for each query.
$(#[allow(nonstandard_style)] $(#[$attr])*
pub fn $name<$tcx>(tcx: QueryCtxt<$tcx>, key: query_keys::$name<$tcx>) -> QueryStackFrame {
opt_remap_env_constness!([$($modifiers)*][key]);
let kind = dep_graph::DepKind::$name;
let name = stringify!($name);
// Disable visible paths printing for performance reasons.
Expand Down Expand Up @@ -549,7 +537,6 @@ macro_rules! define_queries_struct {
key: query_keys::$name<$tcx>,
mode: QueryMode,
) -> Option<query_stored::$name<$tcx>> {
opt_remap_env_constness!([$($modifiers)*][key]);
let qcx = QueryCtxt { tcx, queries: self };
get_query::<queries::$name<$tcx>, _>(qcx, span, key, mode)
})*
Expand Down

0 comments on commit e6d4792

Please sign in to comment.