Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 10 pull requests #105486

Merged
merged 35 commits into from
Dec 9, 2022
Merged

Rollup of 10 pull requests #105486

merged 35 commits into from
Dec 9, 2022

Commits on Dec 3, 2022

  1. Configuration menu
    Copy the full SHA
    7bff720 View commit details
    Browse the repository at this point in the history

Commits on Dec 5, 2022

  1. Configuration menu
    Copy the full SHA
    ee21454 View commit details
    Browse the repository at this point in the history

Commits on Dec 6, 2022

  1. Enable profiler in dist-powerpc64le-linux

    
    Build the profiler runtime to allow using -C profile-generate and -C instrument-coverage on POWER systems.
    
    I have verified locally that the runtime builds and the profiler is working fine on the platform.
    Petr Ogarok committed Dec 6, 2022
    Configuration menu
    Copy the full SHA
    0da7f3e View commit details
    Browse the repository at this point in the history

Commits on Dec 7, 2022

  1. Configuration menu
    Copy the full SHA
    0669379 View commit details
    Browse the repository at this point in the history
  2. Improve several aspects of the Rustdoc scrape-examples UI.

    * Examples take up less screen height.
    * Snippets from binary crates are prioritized.
    * toggle-all-docs does not expand "More examples" sections.
    willcrichton committed Dec 7, 2022
    Configuration menu
    Copy the full SHA
    6ccd14a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    acd70e6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4574217 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    679d7ea View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    212d03d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    ae270f1 View commit details
    Browse the repository at this point in the history
  8. Fix es-check

    willcrichton committed Dec 7, 2022
    Configuration menu
    Copy the full SHA
    bcdab87 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    0709e53 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    8a45938 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    9499d2c View commit details
    Browse the repository at this point in the history

Commits on Dec 8, 2022

  1. Configuration menu
    Copy the full SHA
    4827004 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b36035c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    25a6dac View commit details
    Browse the repository at this point in the history
  4. rustdoc: clean up docblock table CSS

    * The rule `display: block` had no noticeable effect. Technically, because
      markdown tables have a tbody and thead, they get wrapped in an [anonymous
      table box] in the CSS tree, nested within the `<table>` element's block
      layout box.
    
      This rule was added in rust-lang#87230 to make the table side-scrolling, but
      this same issue was doubly fixed in rust-lang#88742 by wrapping it in an explicit
      `<div>` tag. Since accessibility advocates recommend the wrapper div over
      marking the table as `display: block`, we'll stick with that.
    
      https://adrianroselli.com/2020/11/under-engineered-responsive-tables.html
    
    * The rule `width: calc(100% - 2px)` had no visible effect, because the
      anonymous table box was not affected.
    
    * The style is tweaked to basically be the same style GitHub uses.
      In particular, it adds zebra stripes, and removes dotted borders.
    
    [anonymous table box]: https://www.w3.org/TR/CSS2/tables.html#anonymous-boxes
    notriddle committed Dec 8, 2022
    Configuration menu
    Copy the full SHA
    a09e8c5 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3b9daac View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    dd9d05c View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    e73ef59 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    b5a9f6a View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    34700f6 View commit details
    Browse the repository at this point in the history
  10. Fix rust-lang#10021

    smoelius authored and flip1995 committed Dec 8, 2022
    Configuration menu
    Copy the full SHA
    3c29e74 View commit details
    Browse the repository at this point in the history
  11. lib docs: fix typo

    RalfJung committed Dec 8, 2022
    Configuration menu
    Copy the full SHA
    a25791e View commit details
    Browse the repository at this point in the history

Commits on Dec 9, 2022

  1. Rollup merge of rust-lang#105216 - GuillaumeGomez:rm-unused-gui-test,…

    … r=notriddle
    
    Remove unused GUI test
    
    It's not testing anything so better just remove it.
    
    r? `@notriddle`
    matthiaskrgr committed Dec 9, 2022
    Configuration menu
    Copy the full SHA
    2b98858 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#105245 - RalfJung:align_to, r=Amanieu

    attempt to clarify align_to docs
    
    This is not intended the change the docs at all, but `@workingjubilee` said the current docs are incomprehensible to some people so this is an attempt to fix that. No idea if it helps, so -- feedback welcome.
    
    (Please let's not use this to discuss *changing* the spec. Whoever wants to change the spec should please make a separate PR for that.)
    matthiaskrgr committed Dec 9, 2022
    Configuration menu
    Copy the full SHA
    0b4d57b View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#105387 - willcrichton:scrape-examples-ui-im…

    …provements, r=notriddle
    
    Improve Rustdoc scrape-examples UI
    
    This PR combines a few different improvements to the scrape-examples UI. See a live demo here: https://willcrichton.net/misc/scrape-examples/small-first-example/clap/struct.Arg.html
    
    ### 1. The first scraped example now takes up significantly less screen height.
    Inserting the first scraped example takes up a lot of vertical screen space. I don't want this addition to overwhelm users, so I decided to reduce the height of the initial example in two ways: (A) the default un-expanded height is reduced from 240px (10 LOC) to 120px (5 LOC), and (B) the link to the example is now positioned *over* the example instead of *atop* the example (only on desktop though, not mobile). The changes to `scrape-examples.js` and `rustdoc.css` implement this fix.
    
    Here is what an example docblock now looks like:
    
    ![Screen Shot 2022-12-06 at 10 02 21 AM](https://user-images.githubusercontent.com/663326/205987450-3940063c-5973-4a34-8579-baff6a43aa9b.png)
    
    ### 2. Expanding all docblocks will not expand "More examples".
    The "More examples blocks" are huge, so fully expanding everything on the page would take up too much vertical space. The changes to `main.js` implement this fix. This is tested in `scrape-examples-toggle.goml`.
    
    ### 3. Examples from binary crates are sorted higher than examples from library crates.
    Code that is written as an example of an API is probably better for learning than code that happens to use an API, but isn't intended for pedagogic purposes. Unfortunately Rustc doesn't know whether a particular crate comes from an example target (only Cargo knows this). But we can at least create a proxy that prefers examples from binary crates over library crates, which we know from `--crate-type`.
    
    This change is implemented by adding a new field `bin_crate` in `Options` (see `config.rs`). An `is_bin` field has been added to the scraped examples metadata (see `scrape_examples.rs`). Then the example sorting metric uses `is_bin` as the first entry of a lexicographic sort on `(is_bin, example_size, display_name)` (see `render/mod.rs`).
    
    Note that in the future we can consider adding another flag like `--scrape-examples-cargo-target` that would pass target information from Cargo into the example metadata. But I'm proposing a less intrusive change for now.
    
    ### 4. The scrape-examples help page has been updated to reflect the latest Cargo interface.
    
    See `scrape-examples-help.md`.
    
    r? `@notriddle`
    
    P.S. once this PR and rust-lang/cargo#11450 are merged, then I think the scrape-examples feature is officially ready for deployment on docs.rs!
    matthiaskrgr committed Dec 9, 2022
    Configuration menu
    Copy the full SHA
    5fd540b View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#105389 - ogarokpeter:patch-1, r=Mark-Simula…

    …crum
    
    Enable profiler in dist-powerpc64le-linux
    
    Build the profiler runtime to allow using -C profile-generate and -C instrument-coverage on POWER little endian systems.
    
    I have verified locally that the runtime builds and the profiler is working fine on the platform.
    
    Similar pull request for a different system: rust-lang#104304
    matthiaskrgr committed Dec 9, 2022
    Configuration menu
    Copy the full SHA
    5b4723f View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#105427 - GuillaumeGomez:dont-silently-ignor…

    …e-rustdoc-errors, r=notriddle
    
    Dont silently ignore rustdoc errors
    
    I applied the suggestions from rust-lang#104995 and also checked the rustdoc-ui error but couldn't reproduce it.
    
    r? `@notriddle`
    matthiaskrgr committed Dec 9, 2022
    Configuration menu
    Copy the full SHA
    4b09861 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#105442 - notriddle:notriddle/docblock-table…

    …-css, r=GuillaumeGomez
    
    rustdoc: clean up docblock table CSS
    
    # Preview
    
    http://notriddle.com/notriddle-rustdoc-demos/table-2/test_dingus/fn.test.html
    
    # Before
    
    ![image](https://user-images.githubusercontent.com/1593513/206364287-1b80eaaf-2e0e-4138-8b56-4aa8ff39abac.png)
    
    # After
    
    ![image](https://user-images.githubusercontent.com/1593513/206364209-d287d165-31be-4de1-9b43-05b35ce2a86b.png)
    
    # Details
    
    * The rule `display: block` had no noticeable effect. Technically, because markdown tables have a tbody and thead, they get wrapped in an [anonymous table box] in the CSS tree, nested within the `<table>` element's block layout box.
    
      This rule was added in rust-lang#87230 to make the table side-scrolling, but this same issue was doubly fixed in rust-lang#88742 by wrapping it in an explicit `<div>` tag. Since accessibility advocates recommend the wrapper div over marking the table as `display: block`, we'll stick with that.
    
      https://adrianroselli.com/2020/11/under-engineered-responsive-tables.html
    
    * The rule `width: calc(100% - 2px)` had no visible effect, because the anonymous table box was not affected.
    
    * The style is tweaked to basically be the same style GitHub uses. In particular, it adds zebra stripes, and removes dotted borders.
    
      https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Markdown.20table.20styling
    
    [anonymous table box]: https://www.w3.org/TR/CSS2/tables.html#anonymous-boxes
    matthiaskrgr committed Dec 9, 2022
    Configuration menu
    Copy the full SHA
    441669c View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#105443 - compiler-errors:move-more, r=oli-obk

    Move some queries and methods
    
    Each commit's title should be self-explanatory. Motivated to break up some large, general files and move queries into leaf crates.
    matthiaskrgr committed Dec 9, 2022
    Configuration menu
    Copy the full SHA
    6111a73 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#105455 - lcnr:correct-reveal-in-validate, r…

    …=jackh726
    
    use the correct `Reveal` during validation
    
    supersedes rust-lang#105454. Deals with rust-lang#105009 (comment), not closing rust-lang#105009 as the ICE may leak into beta
    
    The issue was the following:
    - we optimize the mir, using `Reveal::All`
    - some optimization relies on the hidden type of an opaque type
    - we then validate using `Reveal::UserFacing` again which is not able to observe the hidden type
    
    r? `@jackh726`
    matthiaskrgr committed Dec 9, 2022
    Configuration menu
    Copy the full SHA
    04dac42 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#105470 - flip1995:clippy_backport, r=Manish…

    …earth
    
    Clippy: backport ICE fix before beta branch
    
    r? `@Manishearth`
    
    Before beta is branched tomorrow we should backport the fix from rust-lang/rust-clippy#10027 for an ICE. That way we'll get this into stable one release sooner.
    
    This only cherry-picks the fix, not the tests for it. The proper sync of this will be done next week Thursday.
    matthiaskrgr committed Dec 9, 2022
    Configuration menu
    Copy the full SHA
    3e7aadc View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#105474 - RalfJung:typo, r=dtolnay

    lib docs: fix typo
    
    r? `@thomcc`
    matthiaskrgr committed Dec 9, 2022
    Configuration menu
    Copy the full SHA
    3d72731 View commit details
    Browse the repository at this point in the history