Skip to content
Permalink
Browse files

Allow unused query arguments

  • Loading branch information...
Zoxc committed Mar 29, 2019
1 parent da60ffb commit 012884419eb797b3d277580146cad5bad8e41f5d
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/librustc_macros/src/query.rs
@@ -349,6 +349,7 @@ fn add_query_description_impl(
let tcx = tcx.as_ref().map(|t| quote! { #t }).unwrap_or(quote! { _ });
quote! {
#[inline]
#[allow(unused_variables)]
fn cache_on_disk(#tcx: TyCtxt<'_, 'tcx, 'tcx>, #key: Self::Key) -> bool {
#expr
}
@@ -364,6 +365,7 @@ fn add_query_description_impl(
let desc = modifiers.desc.as_ref().map(|(tcx, desc)| {
let tcx = tcx.as_ref().map(|t| quote! { #t }).unwrap_or(quote! { _ });
quote! {
#[allow(unused_variables)]
fn describe(
#tcx: TyCtxt<'_, '_, '_>,
#key: #arg,

0 comments on commit 0128844

Please sign in to comment.
You can’t perform that action at this time.