Change:
The trait on 1.49.0 (current stable) doesn't contain modifier in function declaration of that trait. ! However, on and nightly, there is modifier. ! This is wrong because you cannot use modifier for each method/function in Trait definition. Why is this important? People copy the method/function declaration in the documentation to their code and see the compiler error: . : cc I think this might relate to some changes in visibility around macros ? <!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
Yes, this needs the same fix as (in particular should work).
Self-assigning because this is a beta regression.
Note that this also occurs for the impl's docs.
Removed since this was fixed.
, trait methods still rendered as : ! Is there something wrong to Rust release or the bug still exists ?
Hmm, maybe it was only fixed for items in the local crate. do you have time to come up with an MCVE? I expect it's related to cross-crate re-exports.
Your guess sounds right. With core link (), things are normal.
I don't think I'll have time to fix this second part soon, so unassigning myself.
Assigning and removing as in the prioritization working group.
Removing E-mentor + E-easy labels since we don't have guides for cross-crate linking: label -E-easy -E-mentor
I think is the cross-crate case.
Fix backported to 1.50.0 and landed in 1.51.0, closing this.
Please reopen. The issue is not entirely fixed for cross-crate trait reexport case.
The cross-crate issue is now on stable. label: +regression-from-stable-to-stable -regression-from-stable-to-beta
claim

Discussion:
AssocTypeItem(bounds.clean(cx), default.clean(cx)) } }; <del> Item::from_def_id_and_parts(local_did, Some(self.ident.name), inner, cx) </del> <ins> let what_rustc_thinks = Item::from_def_id_and_parts(local_did, Some(self.ident.name), inner, cx); // Trait items always inherit the trait's visibility -- we don't want to show `pub`. Item { visibility: Inherited, ..what_rustc_thinks } </ins> }) } }

) } }; <del> Item::from_def_id_and_parts(local_did, Some(self.ident.name), inner, cx) </del> <ins> let what_rustc_thinks = Item::from_def_id_and_parts(local_did, Some(self.ident.name), inner, cx); let parent_item = cx.tcx.hir().expect_item(cx.tcx.hir().get_parent_item(self.hir_id)); if let hir::ItemKind::Impl(impl_) = &parent_item.kind { if impl_.of_trait.is_some() { // Trait impl items always inherit the impl's visibility -- // we don't want to show `pub`. Item { visibility: Inherited, ..what_rustc_thinks } } else { what_rustc_thinks } } else { panic!("found impl item with non-impl parent {:?}", parent_item); } </ins> }) } }

struct FooBPriv; } } <ins> // @has 'foo/trait.PubTrait.html' '//pre' 'pub trait PubTrait' // // @has 'foo/trait.PubTrait.html' '//pre' 'type Type;' // @!has 'foo/trait.PubTrait.html' '//pre' 'pub type Type;' // // @has 'foo/trait.PubTrait.html' '//pre' 'const CONST: usize;' // @!has 'foo/trait.PubTrait.html' '//pre' 'pub const CONST: usize;' // // @has 'foo/trait.PubTrait.html' '//pre' 'fn function();' // @!has 'foo/trait.PubTrait.html' '//pre' 'pub fn function();' pub trait PubTrait { type Type; const CONST: usize; fn function(); } // @has 'foo/struct.FooPublic.html' '//code' 'type Type' // @!has 'foo/struct.FooPublic.html' '//code' 'pub type Type' // // @has 'foo/struct.FooPublic.html' '//code' 'const CONST: usize' // @!has 'foo/struct.FooPublic.html' '//code' 'pub const CONST: usize' // // @has 'foo/struct.FooPublic.html' '//code' 'fn function()' // @!has 'foo/struct.FooPublic.html' '//code' 'pub fn function()' impl PubTrait for FooPublic { type Type = usize; const CONST: usize = 0; fn function() {} } </ins>