Skip to content

Commit 9eab078

Browse files
Suppress must_use in compiler and tools
1 parent f357993 commit 9eab078

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

clippy_lints/src/loops/mut_range_bound.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ impl BreakAfterExprVisitor {
129129
};
130130

131131
get_enclosing_block(cx, hir_id).is_some_and(|block| {
132-
visitor.visit_block(block);
132+
let _ = visitor.visit_block(block);
133133
visitor.break_after_expr
134134
})
135135
}

clippy_lints/src/methods/read_line_without_trim.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ pub fn check(cx: &LateContext<'_>, call: &Expr<'_>, recv: &Expr<'_>, arg: &Expr<
4040
// We've checked that `call` is a call to `Stdin::read_line()` with the right receiver,
4141
// now let's check if the first use of the string passed to `::read_line()`
4242
// is used for operations that will always fail (e.g. parsing "6\n" into a number)
43-
for_each_local_use_after_expr(cx, local_id, call.hir_id, |expr| {
43+
let _ = for_each_local_use_after_expr(cx, local_id, call.hir_id, |expr| {
4444
if let Some(parent) = get_parent_expr(cx, expr) {
4545
let data = if let ExprKind::MethodCall(segment, recv, args, span) = parent.kind {
4646
if args.is_empty()

clippy_lints/src/pass_by_ref_or_value.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ impl PassByRefOrValue {
141141
// Gather all the lifetimes found in the output type which may affect whether
142142
// `TRIVIALLY_COPY_PASS_BY_REF` should be linted.
143143
let mut output_regions = FxHashSet::default();
144-
for_each_top_level_late_bound_region(fn_sig.skip_binder().output(), |region| -> ControlFlow<!> {
144+
let _ = for_each_top_level_late_bound_region(fn_sig.skip_binder().output(), |region| -> ControlFlow<!> {
145145
output_regions.insert(region);
146146
ControlFlow::Continue(())
147147
});

clippy_lints/src/unconditional_recursion.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ impl UnconditionalRecursion {
381381
implemented_ty_id,
382382
method_span,
383383
};
384-
walk_body(&mut c, body);
384+
let _ = walk_body(&mut c, body);
385385
}
386386
}
387387
}

0 commit comments

Comments
 (0)