diff --git a/src/librustc_typeck/astconv.rs b/src/librustc_typeck/astconv.rs index 50ffa52e88ba4..deba31db5dfcf 100644 --- a/src/librustc_typeck/astconv.rs +++ b/src/librustc_typeck/astconv.rs @@ -1582,9 +1582,11 @@ impl<'o, 'gcx: 'tcx, 'tcx> AstConv<'gcx, 'tcx>+'o { return self.tcx().types.err; } _ => { - span_err!(tcx.sess, span, E0248, - "found value `{}` used as a type", - tcx.item_path_str(def.def_id())); + struct_span_err!(tcx.sess, span, E0248, + "found value `{}` used as a type", + tcx.item_path_str(def.def_id())) + .span_label(span, &format!("value used as a type")) + .emit(); return self.tcx().types.err; } }