Fix typo in #[must_use] message

This commit is contained in:
varkor 2018-11-03 21:27:35 +00:00
parent 9178eb41d3
commit 0ab70fab19

View File

@ -183,7 +183,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnusedResults {
for attr in cx.tcx.get_attrs(def_id).iter() {
if attr.check_name("must_use") {
let msg = format!("unused {}`{}`{} that must be used",
descr_pre_path, descr_post_path, cx.tcx.item_path_str(def_id));
descr_pre_path, cx.tcx.item_path_str(def_id), descr_post_path);
let mut err = cx.struct_span_lint(UNUSED_MUST_USE, sp, &msg);
// check for #[must_use = "..."]
if let Some(note) = attr.value_str() {