We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 841ce0d commit 21b9876Copy full SHA for 21b9876
clippy_lints/src/unnecessary_reserve.rs
@@ -83,8 +83,7 @@ impl<'tcx> LateLintPass<'tcx> for UnnecessaryReserve {
83
extract_msrv_attr!(LateContext);
84
}
85
86
-#[must_use]
87
-fn acceptable_type<'tcx>(cx: &LateContext<'tcx>, struct_calling_on: &Expr<'_>) -> bool {
+fn acceptable_type(cx: &LateContext<'_>, struct_calling_on: &Expr<'_>) -> bool {
88
let acceptable_types = [sym::Vec, sym::VecDeque];
89
acceptable_types.iter().any(|&acceptable_ty| {
90
match cx.typeck_results().expr_ty(struct_calling_on).peel_refs().kind() {
0 commit comments