diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-04-13 17:35:32 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-13 17:35:32 +0200 |
| commit | db61452b7a2ec92d90f4faebfa679c54ad3e1ab0 (patch) | |
| tree | 2b1f856f0aaba53b6c53b69669f807d523c8eb66 /src/test | |
| parent | f38c5c8e5d76ea9a87fece143425ef7c703c706a (diff) | |
| parent | 6a18b6865590704d42777fa7432436e55773d46b (diff) | |
| download | rust-db61452b7a2ec92d90f4faebfa679c54ad3e1ab0.tar.gz rust-db61452b7a2ec92d90f4faebfa679c54ad3e1ab0.zip | |
Rollup merge of #93217 - willcrichton:example-analyzer, r=GuillaumeGomez
Improve Rustdoc UI for scraped examples with multiline arguments, fix overflow in line numbers This PR improves a few aspects of the scrape examples feature in Rustdoc. * Only function names and not the full call expression are highlighted. * For call-sites with multiline arguments, the minimized code viewer will scroll to the top of the call-site rather than the middle if the argument is larger than the viewer size, ensuring that the function name is visible. * This fixes an issue where the line numbers column had a visible x-scroll bar. r? `@GuillaumeGomez`
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-make/rustdoc-scrape-examples-ordering/src/lib.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/test/run-make/rustdoc-scrape-examples-ordering/src/lib.rs b/src/test/run-make/rustdoc-scrape-examples-ordering/src/lib.rs index 5afffffdf99..c53c987a7cb 100644 --- a/src/test/run-make/rustdoc-scrape-examples-ordering/src/lib.rs +++ b/src/test/run-make/rustdoc-scrape-examples-ordering/src/lib.rs @@ -1,7 +1,6 @@ // @has foobar/fn.ok.html '//*[@class="docblock scraped-example-list"]' 'ex2' // @has foobar/fn.ok.html '//*[@class="more-scraped-examples"]' 'ex1' -// @has foobar/fn.ok.html '//*[@class="highlight focus"]' '1' -// @has foobar/fn.ok.html '//*[@class="highlight"]' '2' -// @has foobar/fn.ok.html '//*[@class="highlight focus"]' '0' +// @has foobar/fn.ok.html '//*[@class="highlight focus"]' 'ok' +// @has foobar/fn.ok.html '//*[@class="highlight"]' 'ok' pub fn ok(_x: i32) {} |
