about summary refs log tree commit diff
path: root/compiler/rustc_macros/src/query.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_macros/src/query.rs')
-rw-r--r--compiler/rustc_macros/src/query.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_macros/src/query.rs b/compiler/rustc_macros/src/query.rs
index 3e67525567f..763f13d17ef 100644
--- a/compiler/rustc_macros/src/query.rs
+++ b/compiler/rustc_macros/src/query.rs
@@ -378,14 +378,14 @@ fn add_query_description_impl(
                 let t = &(t.0).0;
                 quote! { #t }
             })
-            .unwrap_or(quote! { _ });
+            .unwrap_or_else(|| quote! { _ });
         let value = args
             .as_ref()
             .map(|t| {
                 let t = &(t.1).0;
                 quote! { #t }
             })
-            .unwrap_or(quote! { _ });
+            .unwrap_or_else(|| quote! { _ });
         // expr is a `Block`, meaning that `{ #expr }` gets expanded
         // to `{ { stmts... } }`, which triggers the `unused_braces` lint.
         quote! {