crate fn intermediate_suggestion(
        &mut self,
        errctx: &ErrorReportingCtx<'_, '_, '_>,
        errci: &ErrorConstraintInfo,
        renctx: &mut RegionErrorNamingCtx,
        diag: &mut DiagnosticBuilder<'_>,
    ) {
        // Emit an intermediate note.
        let fr_name = self.region_vid_to_name(errctx, renctx, errci.fr);
        let outlived_fr_name = self.region_vid_to_name(errctx, renctx, errci.outlived_fr);

        if let (Some(fr_name), Some(outlived_fr_name)) = (fr_name, outlived_fr_name) {
            if let RegionNameSource::Static = outlived_fr_name.source {
                diag.help(&format!("consider replacing `{}` with `'static`", fr_name));
            } else {
                diag.help(&format!(
                    "consider adding the following bound: `{}: {}`",
                    fr_name, outlived_fr_name
                ));
            }
        }
    }
/// Emit an intermediate note on the given `Diagnostic` if the involved regions are
/// suggestable.
Emit an intermediate note on the given `Diagnostic` if the involved regions are
suggestable.
Emit an intermediate note on the given ` Diagnostic ` if the involved regions are suggestable .
crate fn intermediate_suggestion(
        &mut self,
        errctx: &ErrorReportingCtx<'_, '_, '_>,
        errci: &ErrorConstraintInfo,
        renctx: &mut RegionErrorNamingCtx,
        diag: &mut DiagnosticBuilder<'_>,
    ) {
        // Emit an intermediate note.
        let fr_name = self.region_vid_to_name(errctx, renctx, errci.fr);
        let outlived_fr_name = self.region_vid_to_name(errctx, renctx, errci.outlived_fr);
        if let (Some(fr_name), Some(outlived_fr_name)) = (fr_name, outlived_fr_name) {
            if let RegionNameSource::Static = outlived_fr_name.source {
                diag.help(&format!("consider replacing `{}` with `'static`", fr_name));
            } else {
                diag.help(&format!(
                    "consider adding the following bound: `{}: {}`",
                    fr_name, outlived_fr_name
                ));
            }
        }
    }
crate fn intermediate_suggestion ( & mut self , errctx : & ErrorReportingCtx < ' _ , ' _ , ' _ > , errci : & ErrorConstraintInfo , renctx : & mut RegionErrorNamingCtx , diag : & mut DiagnosticBuilder < ' _ > , ) { // Emit an intermediate note. let fr_name = self . region_vid_to_name ( errctx , renctx , errci . fr ) ; let outlived_fr_name = self . region_vid_to_name ( errctx , renctx , errci . outlived_fr ) ; if let ( Some ( fr_name ) , Some ( outlived_fr_name ) ) = ( fr_name , outlived_fr_name ) { if let RegionNameSource :: Static = outlived_fr_name . source { diag . help ( & format ! ( " " fr_name ) ) ; } else { diag . help ( & format ! ( " " fr_name outlived_fr_name ) ) ; } } }
Emit an intermediate note on the given `Diagnostic` if the involved regions are
suggestable.
Emit an intermediate note on the given ` Diagnostic ` if the involved regions are suggestable .
&mut self
errctx
&ErrorReportingCtx<'_, '_, '_>
errci
&ErrorConstraintInfo
renctx
&mut RegionErrorNamingCtx
diag
&mut DiagnosticBuilder<'_>