Skip to content

Commit 728136c

Browse files
authored
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 rust-lang/rust-clippy#5423.
2 parents 7500bcf + 57a6b7b commit 728136c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/librustc_trait_selection/traits/error_reporting/suggestions.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ use std::fmt;
2222
use super::InferCtxtPrivExt;
2323
use crate::traits::query::evaluate_obligation::InferCtxtExt as _;
2424

25-
crate trait InferCtxtExt<'tcx> {
25+
// This trait is public to expose the diagnostics methods to clippy.
26+
pub trait InferCtxtExt<'tcx> {
2627
fn suggest_restricting_param_bound(
2728
&self,
2829
err: &mut DiagnosticBuilder<'_>,

0 commit comments

Comments
 (0)