From 3ae0239f85e13c07810d7d6f941ed319fccefb6e Mon Sep 17 00:00:00 2001 From: Zalathar Date: Thu, 30 Jan 2025 17:24:19 +1100 Subject: [PATCH] Mark the tcx-ensure wrapper types with `#[must_use]` --- compiler/rustc_middle/src/query/plumbing.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/rustc_middle/src/query/plumbing.rs b/compiler/rustc_middle/src/query/plumbing.rs index 6c1ef046a60a5..6c019b427dbd1 100644 --- a/compiler/rustc_middle/src/query/plumbing.rs +++ b/compiler/rustc_middle/src/query/plumbing.rs @@ -88,11 +88,13 @@ impl<'tcx> Deref for TyCtxtAt<'tcx> { } #[derive(Copy, Clone)] +#[must_use] pub struct TyCtxtEnsureOk<'tcx> { pub tcx: TyCtxt<'tcx>, } #[derive(Copy, Clone)] +#[must_use] pub struct TyCtxtEnsureDone<'tcx> { pub tcx: TyCtxt<'tcx>, }