Skip to content

Commit 1eb79f3

Browse files
committed
Use longer lifetime in try_report_from_nll return type
1 parent 185de5f commit 1eb79f3

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

compiler/rustc_infer/src/infer/error_reporting/nice_region_error/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ impl<'cx, 'tcx> NiceRegionError<'cx, 'tcx> {
4343
self.infcx.tcx
4444
}
4545

46-
pub fn try_report_from_nll(&self) -> Option<DiagnosticBuilder<'cx>> {
46+
pub fn try_report_from_nll(&self) -> Option<DiagnosticBuilder<'tcx>> {
4747
// Due to the improved diagnostics returned by the MIR borrow checker, only a subset of
4848
// the nice region errors are required when running under the MIR borrow checker.
4949
self.try_report_named_anon_conflict().or_else(|| self.try_report_placeholder_conflict())

compiler/rustc_infer/src/infer/error_reporting/nice_region_error/named_anon_conflict.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use rustc_middle::ty;
99
impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
1010
/// When given a `ConcreteFailure` for a function with parameters containing a named region and
1111
/// an anonymous region, emit an descriptive diagnostic error.
12-
pub(super) fn try_report_named_anon_conflict(&self) -> Option<DiagnosticBuilder<'a>> {
12+
pub(super) fn try_report_named_anon_conflict(&self) -> Option<DiagnosticBuilder<'tcx>> {
1313
let (span, sub, sup) = self.regions()?;
1414

1515
debug!(

compiler/rustc_infer/src/infer/error_reporting/nice_region_error/placeholder_error.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use std::fmt::{self, Write};
1616
impl NiceRegionError<'me, 'tcx> {
1717
/// When given a `ConcreteFailure` for a function with arguments containing a named region and
1818
/// an anonymous region, emit a descriptive diagnostic error.
19-
pub(super) fn try_report_placeholder_conflict(&self) -> Option<DiagnosticBuilder<'me>> {
19+
pub(super) fn try_report_placeholder_conflict(&self) -> Option<DiagnosticBuilder<'tcx>> {
2020
match &self.error {
2121
///////////////////////////////////////////////////////////////////////////
2222
// NB. The ordering of cases in this match is very
@@ -199,7 +199,7 @@ impl NiceRegionError<'me, 'tcx> {
199199
trait_def_id: DefId,
200200
expected_substs: SubstsRef<'tcx>,
201201
actual_substs: SubstsRef<'tcx>,
202-
) -> DiagnosticBuilder<'me> {
202+
) -> DiagnosticBuilder<'tcx> {
203203
debug!(
204204
"try_report_placeholders_trait(\
205205
vid={:?}, \

0 commit comments

Comments
 (0)