Skip to content

Commit

Permalink
Rollup merge of #121160 - fmease:rustdoc-fix-n-refactor-html-renderin…
Browse files Browse the repository at this point in the history
…g, r=GuillaumeGomez

rustdoc: fix and refactor HTML rendering a bit

* refactoring: get rid of a bunch of manual `f.alternate()` branches
  * not sure why this wasn't done so already, is this perf-sensitive?
* fix an ICE in debug builds of rustdoc
  * rustdoc used to crash on empty outlives-bounds: `where 'a:`
* properly escape const generic defaults
* actually print empty trait and outlives-bounds (doesn't work for cross-crate reexports yet, will fix that at some other point) since they can have semantic significance
  * outlives-bounds: forces lifetime params to be early-bound instead of late-bound which is technically speaking part of the public API
  * trait-bounds: can affect the well-formedness, consider
    * makeshift “const-evaluatable” bounds under `generic_const_exprs`
    * bounds to force wf-checking in light of #100041 (quite artificial I know, I couldn't figure out something better), see #121160 (comment)
  • Loading branch information
fmease authored Feb 18, 2024
2 parents 6499eb5 + 5fbb1b2 commit 28c0fa8
Show file tree
Hide file tree
Showing 3 changed files with 186 additions and 282 deletions.
Loading

0 comments on commit 28c0fa8

Please sign in to comment.