about summary refs log tree commit diff
diff options
context:
space:
mode:
authorZalathar <Zalathar@users.noreply.github.com>2025-01-30 17:24:19 +1100
committerZalathar <Zalathar@users.noreply.github.com>2025-02-01 12:42:41 +1100
commit3ae0239f85e13c07810d7d6f941ed319fccefb6e (patch)
treea284c6d4bfe025e73508a73e6f8126d3371f7e89
parent3581512fb897053099f5ee010bdf4527b0157b9e (diff)
downloadrust-3ae0239f85e13c07810d7d6f941ed319fccefb6e.tar.gz
rust-3ae0239f85e13c07810d7d6f941ed319fccefb6e.zip
Mark the tcx-ensure wrapper types with `#[must_use]`
-rw-r--r--compiler/rustc_middle/src/query/plumbing.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_middle/src/query/plumbing.rs b/compiler/rustc_middle/src/query/plumbing.rs
index 6c1ef046a60..6c019b427db 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>,
 }