if !(type_permits_lack_of_use || fn_warned || op_warned) {
cx.struct_span_lint(UNUSED_RESULTS, s.span, |lint| {
- lint.build(&format!("unused result of type `{}`", ty)).emit()
+ lint.build(&format!("unused result of type `{}`", ty)).emit();
});
}
let descr_pre = &format!("{}boxed ", descr_pre);
check_must_use_ty(cx, boxed_ty, expr, span, descr_pre, descr_post, plural_len)
}
- ty::Adt(def, _) => check_must_use_def(cx, def.did, span, descr_pre, descr_post),
+ ty::Adt(def, _) => check_must_use_def(cx, def.did(), span, descr_pre, descr_post),
ty::Opaque(def, _) => {
let mut has_emitted = false;
for &(predicate, _) in cx.tcx.explicit_item_bounds(def) {
} else {
lint.span_help(s.span, "use `drop` to clarify the intent");
}
- lint.emit()
+ lint.emit();
} else {
- lint.build("path statement with no effect").emit()
+ lint.build("path statement with no effect").emit();
}
});
}
};
cx.struct_span_lint(UNUSED_IMPORT_BRACES, item.span, |lint| {
- lint.build(&format!("braces around {} is unnecessary", node_name)).emit()
+ lint.build(&format!("braces around {} is unnecessary", node_name)).emit();
});
}
}
"unnecessary allocation, use `&mut` instead"
}
};
- lint.build(msg).emit()
+ lint.build(msg).emit();
});
}
}