about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2023-11-30 02:24:11 +0000
committerMichael Goulet <michael@errs.io>2023-11-30 02:24:52 +0000
commitd1009a42d820ded1d446c62d3acb69dffc5117c8 (patch)
tree33f80c4211999bcdbb118454186c1d4ff8b34704 /compiler
parentc9c760fc206345d0d7b7b4d989e2d95cd63ce9c0 (diff)
downloadrust-d1009a42d820ded1d446c62d3acb69dffc5117c8.tar.gz
rust-d1009a42d820ded1d446c62d3acb69dffc5117c8.zip
Enforce must_use on associated types and RPITITs
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_lint/src/unused.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_lint/src/unused.rs b/compiler/rustc_lint/src/unused.rs
index 0a167b0893c..c492e7c6fbf 100644
--- a/compiler/rustc_lint/src/unused.rs
+++ b/compiler/rustc_lint/src/unused.rs
@@ -291,7 +291,7 @@ impl<'tcx> LateLintPass<'tcx> for UnusedResults {
                         .map(|inner| MustUsePath::Pinned(Box::new(inner)))
                 }
                 ty::Adt(def, _) => is_def_must_use(cx, def.did(), span),
-                ty::Alias(ty::Opaque, ty::AliasTy { def_id: def, .. }) => {
+                ty::Alias(ty::Opaque | ty::Projection, ty::AliasTy { def_id: def, .. }) => {
                     elaborate(
                         cx.tcx,
                         cx.tcx.explicit_item_bounds(def).instantiate_identity_iter_copied(),