Skip to content

Commit

Permalink
Rollup merge of rust-lang#70821 - rkuhn:expose_suggestions_InferCtxtE…
Browse files Browse the repository at this point in the history
…xt, r=eddyb

expose suggestions::InferCtxtExt for clippy

This is very useful to do good async/await diagnostic reporting, for example for rust-lang/rust-clippy#5423.
  • Loading branch information
Dylan-DPC authored Apr 6, 2020
2 parents f81e65f + 57a6b7b commit a5ddae4
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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<'_>,
Expand Down

0 comments on commit a5ddae4

Please sign in to comment.