Mark the tcx-ensure wrapper types with #[must_use]

This commit is contained in:
Zalathar 2025-01-30 17:24:19 +11:00
parent 3581512fb8
commit 3ae0239f85

View file

@ -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>,
}