diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2021-10-08 22:30:39 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-08 22:30:39 +0200 |
| commit | 0cc123cbb3450649141f8551b9c34f405b25e67f (patch) | |
| tree | 7d7fc49e4add6de956c6589f6a1b212fb823366f /src/test/rustdoc | |
| parent | 32502404e5ed78b927cc9807eac0cf6cd3623450 (diff) | |
| parent | 8eb3a95afa5ef5a0a10a92e3811237e27003e7b8 (diff) | |
| download | rust-0cc123cbb3450649141f8551b9c34f405b25e67f.tar.gz rust-0cc123cbb3450649141f8551b9c34f405b25e67f.zip | |
Rollup merge of #89538 - notriddle:notriddle/arrow-highlight, r=GuillaumeGomez
Make rustdoc not highlight `->` and `=>` as operators It was marking them up as `<span class="op">=</span><span class="op">></span>`, which is bloaty and wrong (at least, I think `<=` and `=>` should probably be different colors, since they're so different and yet made from the same symbols). Before:  After: 
Diffstat (limited to 'src/test/rustdoc')
| -rw-r--r-- | src/test/rustdoc/macro_rules-matchers.rs | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/test/rustdoc/macro_rules-matchers.rs b/src/test/rustdoc/macro_rules-matchers.rs index 5f8340e7312..efc3b21e6da 100644 --- a/src/test/rustdoc/macro_rules-matchers.rs +++ b/src/test/rustdoc/macro_rules-matchers.rs @@ -6,37 +6,31 @@ // @has 'foo/macro.todo.html' // @has - '//span[@class="macro"]' 'macro_rules!' // @has - '//span[@class="ident"]' 'todo' -// Note: count = 2 * ('=' + '>') + '+' = 2 * (1 + 1) + 1 = 5 -// @count - '//pre[@class="rust macro"]//span[@class="op"]' 5 +// Note: the only op is the `+` +// @count - '//pre[@class="rust macro"]//span[@class="op"]' 1 -// @has - '{ ()' -// @has - '//span[@class="op"]' '=' -// @has - '//span[@class="op"]' '>' -// @has - '{ ... };' - -// @has - '($(' +// @has - '{ () => { ... }; ($(' // @has - '//span[@class="macro-nonterminal"]' '$' // @has - '//span[@class="macro-nonterminal"]' 'arg' // @has - ':' // @has - '//span[@class="ident"]' 'tt' // @has - '),' // @has - '//span[@class="op"]' '+' -// @has - ')' +// @has - ') => { ... }; }' pub use std::todo; mod mod1 { // @has 'foo/macro.macro1.html' // @has - 'macro_rules!' // @has - 'macro1' - // @has - '{ ()' - // @has - '($(' + // @has - '{ () => { ... }; ($(' // @has - '//span[@class="macro-nonterminal"]' '$' // @has - '//span[@class="macro-nonterminal"]' 'arg' // @has - ':' // @has - 'expr' // @has - '),' // @has - '+' - // @has - ')' + // @has - ') => { ... }; }' #[macro_export] macro_rules! macro1 { () => {}; |
