Skip to content

Commit ae9c09d

Browse files
Updated error for E0045 (no bonus)
1 parent b42a384 commit ae9c09d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/librustc_typeck/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,10 @@ fn require_c_abi_if_variadic(tcx: TyCtxt,
181181
abi: Abi,
182182
span: Span) {
183183
if decl.variadic && abi != Abi::C {
184-
span_err!(tcx.sess, span, E0045,
184+
let mut err = struct_span_err!(tcx.sess, span, E0045,
185185
"variadic function must have C calling convention");
186+
err.span_label(span, &("variadics require C calling conventions").to_string())
187+
.emit();
186188
}
187189
}
188190

0 commit comments

Comments
 (0)