1
Fork 0

Rollup merge of #107416 - czzrr:issue-80618, r=GuillaumeGomez

Error code E0794 for late-bound lifetime parameter error.

This PR addresses [#80618](https://github.com/rust-lang/rust/issues/80618).
This commit is contained in:
Matthias Krüger 2023-03-18 12:04:21 +01:00 committed by GitHub
commit 9599f3cc54
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 126 additions and 35 deletions

View file

@ -612,7 +612,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 {