Skip to content

Commit e9727a9

Browse files
Address issue number: rust-lang#35391
1 parent ecdd51b commit e9727a9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/librustc_typeck/astconv.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1578,9 +1578,11 @@ impl<'o, 'gcx: 'tcx, 'tcx> AstConv<'gcx, 'tcx>+'o {
15781578
return self.tcx().types.err;
15791579
}
15801580
_ => {
1581-
span_err!(tcx.sess, span, E0248,
1581+
struct_span_err!(tcx.sess, span, E0248,
15821582
"found value `{}` used as a type",
1583-
tcx.item_path_str(def.def_id()));
1583+
tcx.item_path_str(def.def_id()))
1584+
.span_label(self.span, &format!("value used as a type"))
1585+
.emit();
15841586
return self.tcx().types.err;
15851587
}
15861588
}

0 commit comments

Comments
 (0)