Skip to content

rustdoc: Self: Sized bounds in different crates are pruned #24183

@alexcrichton

Description

@alexcrichton
Member

For example Iterator::map should have a Self: Sized bound, but we're a little too aggressive about pruning out the Sized bounds.

For comparison core::iter::Iterator::map does indeed have the bound.

Activity

added
T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.
on Apr 8, 2015
apasel422

apasel422 commented on Oct 24, 2015

@apasel422
Contributor

This also applies to Sized bounds on traits.

crumblingstatue

crumblingstatue commented on Oct 22, 2016

@crumblingstatue
Contributor

This prompted a question on IRC about whether Clone requires Sized, because the Sized bound is not visible in the libstd documentation. It is visible in the libcore docs though.

added
T-dev-toolsRelevant to the dev-tools subteam, which will review and decide on the PR/issue.
and removed on May 18, 2017

12 remaining items

jyn514

jyn514 commented on Mar 30, 2021

@jyn514
Member

@GuillaumeGomez #78181 did not fix this - it now shows impl !Sized for dyn Trait, which is nice, but it doesn't show Self: Sized bounds on traits. For traits it does matter because the default is ?Sized.

reopened this on Mar 30, 2021
jyn514

jyn514 commented on Mar 30, 2021

@jyn514
Member

This actually ended up biting me today, is there a plan to handle this? I could help implement if I get pointers

@guswynn I would start by finding out why this is different between local crates and cross-crate re-exports. I expect impl Clean<Item> for hir::TraitItem<'_> is behaving differently from impl Clean<Type> for (ty::TraitRef<'_>, &[TypeBinding]).

removed
T-dev-toolsRelevant to the dev-tools subteam, which will review and decide on the PR/issue.
on Jan 18, 2022
tmandry

tmandry commented on Apr 14, 2022

@tmandry
Member

Ah, I also hit this today when looking at Clone. Kudos to whoever can figure this one out :)

fmease

fmease commented on Oct 18, 2022

@fmease
Member

@rustbot claim

added a commit that references this issue on Oct 23, 2022

Rollup merge of rust-lang#103254 - fmease:fix-24183, r=GuillaumeGomez

6386ffe
added a commit that references this issue on Oct 23, 2022

Rollup merge of rust-lang#103254 - fmease:fix-24183, r=GuillaumeGomez

28a1baf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-cross-crate-reexportsArea: Documentation that has been re-exported from a different crateC-bugCategory: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Participants

    @steveklabnik@ehuss@alexcrichton@crumblingstatue@jonas-schievink

    Issue actions

      rustdoc: Self: Sized bounds in different crates are pruned · Issue #24183 · rust-lang/rust