Use longer lifetime in try_report_from_nll return type

This commit is contained in:
Matthew Jasper 2021-02-09 20:56:45 +00:00
parent 185de5f41a
commit 1eb79f3c37
3 changed files with 4 additions and 4 deletions

View File

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

View File

@ -9,7 +9,7 @@
impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
/// When given a `ConcreteFailure` for a function with parameters containing a named region and
/// an anonymous region, emit an descriptive diagnostic error.
pub(super) fn try_report_named_anon_conflict(&self) -> Option<DiagnosticBuilder<'a>> {
pub(super) fn try_report_named_anon_conflict(&self) -> Option<DiagnosticBuilder<'tcx>> {
let (span, sub, sup) = self.regions()?;
debug!(

View File

@ -16,7 +16,7 @@
impl NiceRegionError<'me, 'tcx> {
/// When given a `ConcreteFailure` for a function with arguments containing a named region and
/// an anonymous region, emit a descriptive diagnostic error.
pub(super) fn try_report_placeholder_conflict(&self) -> Option<DiagnosticBuilder<'me>> {
pub(super) fn try_report_placeholder_conflict(&self) -> Option<DiagnosticBuilder<'tcx>> {
match &self.error {
///////////////////////////////////////////////////////////////////////////
// NB. The ordering of cases in this match is very
@ -199,7 +199,7 @@ fn try_report_placeholders_trait(
trait_def_id: DefId,
expected_substs: SubstsRef<'tcx>,
actual_substs: SubstsRef<'tcx>,
) -> DiagnosticBuilder<'me> {
) -> DiagnosticBuilder<'tcx> {
debug!(
"try_report_placeholders_trait(\
vid={:?}, \