Rollup merge of #70821 - rkuhn:expose_suggestions_InferCtxtExt, r=eddyb

expose suggestions::InferCtxtExt for clippy

This is very useful to do good async/await diagnostic reporting, for example for https://github.com/rust-lang/rust-clippy/pull/5423.
This commit is contained in:
Dylan DPC 2020-04-07 00:31:39 +02:00 committed by GitHub
commit 728136c73d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,7 +22,8 @@ use std::fmt;
use super::InferCtxtPrivExt;
use crate::traits::query::evaluate_obligation::InferCtxtExt as _;
crate trait InferCtxtExt<'tcx> {
// This trait is public to expose the diagnostics methods to clippy.
pub trait InferCtxtExt<'tcx> {
fn suggest_restricting_param_bound(
&self,
err: &mut DiagnosticBuilder<'_>,