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
@brson For syntax highlighting, we could pipe the code snippets to pygments while generating the docs, or we could do the highlighting on the client with something like highlight.js. The former option seems better, and is what I'm currently using for prototyping.
This adds simple syntax highlighting based off libsyntax's lexer to be sure to
stay up to date with rust's grammar. Some of the highlighting is a bit ad-hoc,
but it definitely seems to get the job done!
This currently doesn't highlight rustdoc-rendered function signatures and
structs that are emitted to each page because the colors already signify what's
clickable and I think we'd have to figure out a different scheme before
colorizing them. This does, however, colorize all code examples and source code.
Closes#11393
[`arithmetic_side_effects`] Fixrust-lang#11393Fixrust-lang#11393
```
changelog: [`arithmetic_side_effects`]: Detect division by zero for `Wrapping` and `Saturating`
```
We can probably port the js code from doc/lib to Rust. It's really small.
The text was updated successfully, but these errors were encountered: