diff options
| author | bors <bors@rust-lang.org> | 2023-05-31 13:47:36 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-05-31 13:47:36 +0000 |
| commit | ad8304a0d5280de30856b39c19df7b306957e878 (patch) | |
| tree | 4c5167ddcf79cb528d67dcee35082adb7e38f980 /compiler/rustc_trait_selection/src | |
| parent | e4f7ad8e68206fa54372535b5c04d7ddbaea43be (diff) | |
| parent | 52bd82f522c4f3d9bd0dc534c06169285afbc23b (diff) | |
| download | rust-ad8304a0d5280de30856b39c19df7b306957e878.tar.gz rust-ad8304a0d5280de30856b39c19df7b306957e878.zip | |
Auto merge of #111076 - notriddle:notriddle/silence-private-dep-trait-impl-suggestions, r=cjgillot
diagnostics: exclude indirect private deps from trait impl suggest Fixes #88696
Diffstat (limited to 'compiler/rustc_trait_selection/src')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs index 9012bda4043..1470dc452a1 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs @@ -1776,6 +1776,7 @@ impl<'tcx> InferCtxtPrivExt<'tcx> for TypeErrCtxt<'_, 'tcx> { || !trait_pred .skip_binder() .is_constness_satisfied_by(self.tcx.constness(def_id)) + || !self.tcx.is_user_visible_dep(def_id.krate) { return None; } |
