Higher-Rank Trait Bounds (HRTB) not properly rendered #88
Labels
limitation
A current limitation of the library, e.g. due to an upstream bug.
waiting-on-upstream
Some other project needs to make a change before we can make a change.
Comparing the rustdoc HTML output of https://github.com/rust-lang/rust/blob/master/src/test/rustdoc/higher-ranked-trait-bounds.rs with the output of
public-api
, there are differences. To see them, first generate rustdoc HTML output for that file:and then look at e.g.
open /tmp/hrtb/foo/fn.test3.html
which looks like this:and then generate output with public-api:
Normalizing whitespace and linewlines and aligning, we have this vs that:
There is a FIXME related to HRTB in rust-lang/rust/src/librustdoc/json/conversions.rs, so not sure we can fix them all, but it looks like we can fix the particular example I brought up.
For reference HRTB, didn't work properly in rustdoc HTML either for quite a while (see rust-lang/rust#78482), but was fixed quite recently, which also added the FIXME (see rust-lang/rust#84814).
To fix HRTBs in rustdoc HTML, the DynTrait object was introduced in the above PR. So fixing all HRTB problems might be related to fixing cargo-public-api/cargo-public-api#40, in case it requires upstream changes.
The text was updated successfully, but these errors were encountered: