about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-04-07 00:31:39 +0200
committerGitHub <noreply@github.com>2020-04-07 00:31:39 +0200
commit728136c73db3bcb6b05d2f5763af24dd6ed26ebc (patch)
tree6e2484f4e4203b0f4db0f54c9347273d19ea2dc7
parent7500bcfbb21857c7d751fec31beee5931452ba34 (diff)
parent57a6b7bd221b6d2027a0960f3f46a6a9355d0ac4 (diff)
downloadrust-728136c73db3bcb6b05d2f5763af24dd6ed26ebc.tar.gz
rust-728136c73db3bcb6b05d2f5763af24dd6ed26ebc.zip
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.
-rw-r--r--src/librustc_trait_selection/traits/error_reporting/suggestions.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustc_trait_selection/traits/error_reporting/suggestions.rs b/src/librustc_trait_selection/traits/error_reporting/suggestions.rs
index fcec29aaa8e..a8fc56d8509 100644
--- a/src/librustc_trait_selection/traits/error_reporting/suggestions.rs
+++ b/src/librustc_trait_selection/traits/error_reporting/suggestions.rs
@@ -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<'_>,