diff options
| author | Jana Dönszelmann <jonathan@donsz.nl> | 2025-07-03 13:29:36 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-03 13:29:36 +0200 |
| commit | 0aaac883de0b16b6ec60b48038913e05eff5cc2f (patch) | |
| tree | 27d85f8268290ae3d9a9951d3ae0152e7f04e526 /compiler/rustc_middle/src/ty/context.rs | |
| parent | 5026d0cd8e45d2c882d1161edcb6c40e97c87a1a (diff) | |
| parent | 6b824e8143c1dcacdbac3f14f01e2bbb85da8907 (diff) | |
| download | rust-0aaac883de0b16b6ec60b48038913e05eff5cc2f.tar.gz rust-0aaac883de0b16b6ec60b48038913e05eff5cc2f.zip | |
Rollup merge of #143038 - Qelxiros:142676-private-dependency-traits, r=tgross35
avoid suggesting traits from private dependencies fixes rust-lang/rust#142676 fixes rust-lang/rust#138191 r? ``@tgross35``
Diffstat (limited to 'compiler/rustc_middle/src/ty/context.rs')
| -rw-r--r-- | compiler/rustc_middle/src/ty/context.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/ty/context.rs b/compiler/rustc_middle/src/ty/context.rs index f5c55f96875..efa47b57cf3 100644 --- a/compiler/rustc_middle/src/ty/context.rs +++ b/compiler/rustc_middle/src/ty/context.rs @@ -2287,7 +2287,7 @@ impl<'tcx> TyCtxt<'tcx> { } /// All traits in the crate graph, including those not visible to the user. - pub fn all_traits(self) -> impl Iterator<Item = DefId> { + pub fn all_traits_including_private(self) -> impl Iterator<Item = DefId> { iter::once(LOCAL_CRATE) .chain(self.crates(()).iter().copied()) .flat_map(move |cnum| self.traits(cnum).iter().copied()) |
