Skip to content

Commit

Permalink
Rollup merge of rust-lang#121160 - fmease:rustdoc-fix-n-refactor-html…
Browse files Browse the repository at this point in the history
…-rendering, 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 rust-lang#100041 (quite artificial I know, I couldn't figure out something better), see rust-lang#121160 (comment)
  • Loading branch information
GuillaumeGomez authored Feb 17, 2024
2 parents 439fabc + 5fbb1b2 commit 736b67d
Show file tree
Hide file tree
Showing 3 changed files with 186 additions and 282 deletions.
Loading

0 comments on commit 736b67d

Please sign in to comment.