You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed in the new bitflags v2 release that the flags are no longer showing up cargo doc output. I filed a bug in the bitflags project for that, but it seems like potentially incorrect behavior on the part of cargo doc as well. Example code:
pubstructS;traitT{}const _:() = {implS{// Does not show in docs.pubconstVAL:u32 = 0;// Does not show in docs.constfnf(){}}// Does not show in docs.implTforS{}};// Demonstrate that S::VAL and S::f are accessible.pubconstC1:u32 = S::VAL;pubconstC2:() = S::f();// Demonstrate that S impls Tpubfnx(){let _t:&dynT = &S;}
Since S::VAL and S::f are visible outside the empty const _: () item, I would expect them to show up in the cargo doc output, but they don't. Similar for the impl T for S.
This is not a regression as far as I can tell from checking a few versions of Rust at random.
Since S::VAL and S::f are visible outside the empty const _: () item, I would expect them to show up in the cargo doc output, but they don't. Similar for the impl T for S.
S::f is private, same as T, so unless you use --document-private-items, they won't appear in the documentation since they're only public inside the current crate.
I noticed in the new bitflags v2 release that the flags are no longer showing up
cargo doc
output. I filed a bug in the bitflags project for that, but it seems like potentially incorrect behavior on the part of cargo doc as well. Example code:Since
S::VAL
andS::f
are visible outside the emptyconst _: ()
item, I would expect them to show up in thecargo doc
output, but they don't. Similar for theimpl T for S
.This is not a regression as far as I can tell from checking a few versions of Rust at random.
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: