From 0ab70fab1970ea665c0969f04adc66195703a7bc Mon Sep 17 00:00:00 2001 From: varkor Date: Sat, 3 Nov 2018 21:27:35 +0000 Subject: [PATCH] Fix typo in #[must_use] message --- src/librustc_lint/unused.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustc_lint/unused.rs b/src/librustc_lint/unused.rs index 3bb35b8e4e1..906579a1ae0 100644 --- a/src/librustc_lint/unused.rs +++ b/src/librustc_lint/unused.rs @@ -183,7 +183,7 @@ fn check_must_use( 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() { -- GitLab