Rollup merge of #137059 - xizheyin:issue-136827, r=davidtwco

fix: Alloc new errorcode E0803 for E0495

As discussion in #136827, I alloc a new errorcode.
This commit is contained in:
Matthias Krüger 2025-02-19 01:30:11 +01:00 committed by GitHub
commit 960b122136
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 65 additions and 18 deletions

View file

@ -2,7 +2,7 @@ use std::iter;
use rustc_data_structures::fx::FxIndexSet;
use rustc_errors::{
Applicability, Diag, E0309, E0310, E0311, E0495, Subdiagnostic, struct_span_code_err,
Applicability, Diag, E0309, E0310, E0311, E0803, Subdiagnostic, struct_span_code_err,
};
use rustc_hir::def::DefKind;
use rustc_hir::def_id::{DefId, LocalDefId};
@ -1032,7 +1032,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
struct_span_code_err!(
self.dcx(),
var_origin.span(),
E0495,
E0803,
"cannot infer an appropriate lifetime{} due to conflicting requirements",
var_description
)