Skip to content

Commit 0ab70fa

Browse files
committed
Fix typo in #[must_use] message
1 parent 9178eb4 commit 0ab70fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_lint/unused.rs

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

0 commit comments

Comments
 (0)