Skip to content

Commit 0128844

Browse files
committed
Allow unused query arguments
1 parent da60ffb commit 0128844

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/librustc_macros/src/query.rs

+2
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,7 @@ fn add_query_description_impl(
349349
let tcx = tcx.as_ref().map(|t| quote! { #t }).unwrap_or(quote! { _ });
350350
quote! {
351351
#[inline]
352+
#[allow(unused_variables)]
352353
fn cache_on_disk(#tcx: TyCtxt<'_, 'tcx, 'tcx>, #key: Self::Key) -> bool {
353354
#expr
354355
}
@@ -364,6 +365,7 @@ fn add_query_description_impl(
364365
let desc = modifiers.desc.as_ref().map(|(tcx, desc)| {
365366
let tcx = tcx.as_ref().map(|t| quote! { #t }).unwrap_or(quote! { _ });
366367
quote! {
368+
#[allow(unused_variables)]
367369
fn describe(
368370
#tcx: TyCtxt<'_, '_, '_>,
369371
#key: #arg,

0 commit comments

Comments
 (0)