Skip to content

Commit ca04751

Browse files
Apply new lint on clippy source code
1 parent f1bd88b commit ca04751

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

clippy_utils/src/hir_utils.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,15 @@ impl<'a, 'tcx> SpanlessEq<'a, 'tcx> {
4141
}
4242

4343
/// Consider expressions containing potential side effects as not equal.
44+
#[must_use]
4445
pub fn deny_side_effects(self) -> Self {
4546
Self {
4647
allow_side_effects: false,
4748
..self
4849
}
4950
}
5051

52+
#[must_use]
5153
pub fn expr_fallback(self, expr_fallback: impl FnMut(&Expr<'_>, &Expr<'_>) -> bool + 'a) -> Self {
5254
Self {
5355
expr_fallback: Some(Box::new(expr_fallback)),

clippy_utils/src/sugg.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ impl<'a> Sugg<'a> {
294294
/// Adds parentheses to any expression that might need them. Suitable to the
295295
/// `self` argument of a method call
296296
/// (e.g., to build `bar.foo()` or `(1 + 2).foo()`).
297+
#[must_use]
297298
pub fn maybe_par(self) -> Self {
298299
match self {
299300
Sugg::NonParen(..) => self,

0 commit comments

Comments
 (0)