From 2275b875c2a2bdca40cfad44e6f9c4b0a99c4f05 Mon Sep 17 00:00:00 2001 From: Roland Kuhn Date: Sun, 5 Apr 2020 19:25:32 +0200 Subject: [PATCH 1/2] expose suggestions::InferCtxtExt for clippy --- .../traits/error_reporting/suggestions.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/librustc_trait_selection/traits/error_reporting/suggestions.rs b/src/librustc_trait_selection/traits/error_reporting/suggestions.rs index fcec29aaa8ecb..14c87b001ab3d 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> { +// public for clippy +pub trait InferCtxtExt<'tcx> { fn suggest_restricting_param_bound( &self, err: &mut DiagnosticBuilder<'_>, From 57a6b7bd221b6d2027a0960f3f46a6a9355d0ac4 Mon Sep 17 00:00:00 2001 From: Roland Kuhn Date: Mon, 6 Apr 2020 17:04:21 +0200 Subject: [PATCH 2/2] Update src/librustc_trait_selection/traits/error_reporting/suggestions.rs Co-Authored-By: varkor --- .../traits/error_reporting/suggestions.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustc_trait_selection/traits/error_reporting/suggestions.rs b/src/librustc_trait_selection/traits/error_reporting/suggestions.rs index 14c87b001ab3d..a8fc56d8509a0 100644 --- a/src/librustc_trait_selection/traits/error_reporting/suggestions.rs +++ b/src/librustc_trait_selection/traits/error_reporting/suggestions.rs @@ -22,7 +22,7 @@ use std::fmt; use super::InferCtxtPrivExt; use crate::traits::query::evaluate_obligation::InferCtxtExt as _; -// public for clippy +// This trait is public to expose the diagnostics methods to clippy. pub trait InferCtxtExt<'tcx> { fn suggest_restricting_param_bound( &self,