1
Fork 0

Error code E0794 for late-bound lifetime parameter error.

This commit is contained in:
Christopher Acosta 2023-01-27 22:23:01 +01:00 committed by Christopher Acossta
parent 1a521db67e
commit 75563cd725
9 changed files with 126 additions and 35 deletions

View file

@ -618,7 +618,7 @@ pub(crate) fn prohibit_explicit_late_bound_lifetimes(
if position == GenericArgPosition::Value
&& args.num_lifetime_params() != param_counts.lifetimes
{
let mut err = tcx.sess.struct_span_err(span, msg);
let mut err = struct_span_err!(tcx.sess, span, E0794, "{}", msg);
err.span_note(span_late, note);
err.emit();
} else {