1
Fork 0

Suppress must_use in compiler and tools

This commit is contained in:
Michael Goulet 2025-02-22 23:55:08 +00:00
parent 2439623278
commit 380ce74401
13 changed files with 49 additions and 45 deletions

View file

@ -77,7 +77,7 @@ impl<'tcx> Visitor<'tcx> for FindNestedTypeVisitor<'tcx> {
match arg.kind {
hir::TyKind::BareFn(_) => {
self.current_index.shift_in(1);
intravisit::walk_ty(self, arg);
let _ = intravisit::walk_ty(self, arg);
self.current_index.shift_out(1);
return ControlFlow::Continue(());
}
@ -85,7 +85,7 @@ impl<'tcx> Visitor<'tcx> for FindNestedTypeVisitor<'tcx> {
hir::TyKind::TraitObject(bounds, ..) => {
for bound in bounds {
self.current_index.shift_in(1);
self.visit_poly_trait_ref(bound);
let _ = self.visit_poly_trait_ref(bound);
self.current_index.shift_out(1);
}
}

View file

@ -743,7 +743,7 @@ fn assemble_candidates_from_trait_def<'cx, 'tcx>(
) {
debug!("assemble_candidates_from_trait_def(..)");
let mut ambiguous = false;
selcx.for_each_item_bound(
let _ = selcx.for_each_item_bound(
obligation.predicate.self_ty(),
|selcx, clause, _| {
let Some(clause) = clause.as_projection_clause() else {

View file

@ -176,7 +176,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
// normalization, so try to deduplicate when possible to avoid
// unnecessary ambiguity.
let mut distinct_normalized_bounds = FxHashSet::default();
self.for_each_item_bound::<!>(
let _ = self.for_each_item_bound::<!>(
placeholder_trait_predicate.self_ty(),
|selcx, bound, idx| {
let Some(bound) = bound.as_trait_clause() else {