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 9 pull requests #105444

Closed
wants to merge 37 commits into from

Commits on Nov 28, 2022

  1. Detect long types in E0308 and write them to disk

    On type error with long types, print an abridged type and write the full
    type to disk.
    
    Print the widest possible short type while still fitting in the
    terminal.
    estebank committed Nov 28, 2022
    Configuration menu
    Copy the full SHA
    7674ede View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    360c0a7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    73b371a View commit details
    Browse the repository at this point in the history
  4. Remove unneeded test change

    estebank committed Nov 28, 2022
    Configuration menu
    Copy the full SHA
    be02bd9 View commit details
    Browse the repository at this point in the history
  5. fix test

    estebank committed Nov 28, 2022
    Configuration menu
    Copy the full SHA
    360bcb6 View commit details
    Browse the repository at this point in the history
  6. fix rebase

    estebank committed Nov 28, 2022
    Configuration menu
    Copy the full SHA
    34b3c49 View commit details
    Browse the repository at this point in the history

Commits on Dec 1, 2022

  1. kmc-solid: Use expose_addr and from_exposed_addr for pointer-inte…

    …ger casts
    
    Pointer-integer casts are required for conversion between `EXINF` (ITRON
    task entry point parameter) and `*const ThreadInner`. Addresses the
    deny-level lint `fuzzy_provenance_casts`.
    kawadakk committed Dec 1, 2022
    Configuration menu
    Copy the full SHA
    427a079 View commit details
    Browse the repository at this point in the history
  2. kmc-solid: Add a stub implementation of is_terminal

    Copied from `unsupported/io.rs`. Fixes build failure.
    kawadakk committed Dec 1, 2022
    Configuration menu
    Copy the full SHA
    47f2f6d View commit details
    Browse the repository at this point in the history
  3. kmc-solid: Address compiler warnings

    Addresses the warn-by-default lints `unused_imports` and
    `unused_unsafe`.
    kawadakk committed Dec 1, 2022
    Configuration menu
    Copy the full SHA
    f482e55 View commit details
    Browse the repository at this point in the history

Commits on Dec 2, 2022

  1. kmc-solid: Don't do Box::from_raw(&*(x: Box<T>) as *const T as *mut T)

    This pattern seems to be considered illegal by Miri.
    kawadakk committed Dec 2, 2022
    Configuration menu
    Copy the full SHA
    ae7633f View commit details
    Browse the repository at this point in the history

Commits on Dec 4, 2022

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

Commits on Dec 6, 2022

  1. Configuration menu
    Copy the full SHA
    9397ea1 View commit details
    Browse the repository at this point in the history
  2. Stacked Borrows: factor the logic determining the new permissions on …

    …retag into a separate function
    RalfJung committed Dec 6, 2022
    Configuration menu
    Copy the full SHA
    34c58e8 View commit details
    Browse the repository at this point in the history

Commits on Dec 7, 2022

  1. Add help for #![feature(impl_trait_in_fn_trait_return)]

    This adds a new variant `ImplTraitContext::FeatureGated`, so we can
    generalize the help for `return_position_impl_trait_in_trait` to also
    work for `impl_trait_in_fn_trait_return`.
    cuviper committed Dec 7, 2022
    Configuration menu
    Copy the full SHA
    e9dd591 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0669379 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    eef61b4 View commit details
    Browse the repository at this point in the history
  4. 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
  5. Configuration menu
    Copy the full SHA
    acd70e6 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    4574217 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    679d7ea View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    212d03d View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    ae270f1 View commit details
    Browse the repository at this point in the history
  10. 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
  11. Configuration menu
    Copy the full SHA
    0709e53 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    8a45938 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    9499d2c View commit details
    Browse the repository at this point in the history
  14. CI: add missing line continuation marker

    Resolves this docker warning:
    
    ```
    [WARNING]: Empty continuation line found in:
        RUN apt-get update && apt-get install -y --no-install-recommends   g++   gcc-multilib   make   ninja-build   file   curl   ca-certificates   python2.7   python3.9   git   cmake   sudo   gdb   llvm-13-tools   llvm-13-dev   libedit-dev   libssl-dev   pkg-config   zlib1g-dev   xz-utils   nodejs     apt-transport-https software-properties-common &&     curl -s "https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb" > packages-microsoft-prod.deb &&     dpkg -i packages-microsoft-prod.deb &&     apt-get update &&     apt-get install -y powershell     && rm -rf /var/lib/apt/lists/*
    Warning: : Empty continuation lines will become errors in a future release.
    ```
    ComputerDruid committed Dec 7, 2022
    Configuration menu
    Copy the full SHA
    8bc30cb View commit details
    Browse the repository at this point in the history

Commits on Dec 8, 2022

  1. Configuration menu
    Copy the full SHA
    a3c4c2e View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#104922 - estebank:fur-elize, r=oli-obk

    Detect long types in E0308 and write them to disk
    
    On type error with long types, print an abridged type and write the full type to disk.
    
    Print the widest possible short type while still fitting in the terminal.
    matthiaskrgr committed Dec 8, 2022
    Configuration menu
    Copy the full SHA
    27c0dd6 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#105120 - solid-rs:patch/kmc-solid/maintaina…

    …nce, r=thomcc
    
    kmc-solid: `std::sys` code maintenance
    
    Includes a set of changes to fix the [`*-kmc-solid_*`](https://doc.rust-lang.org/nightly/rustc/platform-support/kmc-solid.html) Tier 3 targets and make some other improvements.
    
    - Address `fuzzy_provenance_casts` by using `expose_addr` and `from_exposed_addr` for pointer-integer casts
    - Add a stub implementation of `is_terminal` (rust-lang#98070)
    - Address `unused_imports` and `unused_unsafe`
    - Stop doing `Box::from_raw(&*(x: Box<T>) as *const T as *mut T)`
    matthiaskrgr committed Dec 8, 2022
    Configuration menu
    Copy the full SHA
    ee74286 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#105255 - cjgillot:issue-105197, r=compiler-…

    …errors
    
    Make nested RPIT inherit the parent opaque's generics.
    
    Fixes rust-lang#105197
    
    r? `@compiler-errors`
    matthiaskrgr committed Dec 8, 2022
    Configuration menu
    Copy the full SHA
    b47fc78 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#105317 - RalfJung:retag-rework, r=oli-obk

    make retagging work even with 'unstable' places
    
    This is based on top of rust-lang#105301. Only the last two commits are new.
    
    While investigating rust-lang/unsafe-code-guidelines#381 I realized that we would have caught this issue much earlier if the add_retag pass wouldn't bail out on assignments of the form `*ptr = ...`.
    
    So this PR changes our retag strategy:
    - When a new reference is created via `Rvalue::Ref` (or a raw ptr via `Rvalue::AddressOf`), we do the retagging as part of just executing that address-taking operation.
    - For everything else, we still insert retags -- these retags basically serve to ensure that references stored in local variables (and their fields) are always freshly tagged, so skipping this for assignments like `*ptr = ...` is less egregious.
    r? `@oli-obk`
    matthiaskrgr committed Dec 8, 2022
    Configuration menu
    Copy the full SHA
    55e07fd View commit details
    Browse the repository at this point in the history
  6. 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 8, 2022
    Configuration menu
    Copy the full SHA
    23ea785 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#105408 - cuviper:help-rpitirpit, r=compiler…

    …-errors
    
    Add help for `#![feature(impl_trait_in_fn_trait_return)]`
    
    This adds a new variant `ImplTraitContext::FeatureGated`, so we can
    generalize the help for `return_position_impl_trait_in_trait` to also
    work for `impl_trait_in_fn_trait_return`.
    
    cc rust-lang#99697
    matthiaskrgr committed Dec 8, 2022
    Configuration menu
    Copy the full SHA
    616a11a View commit details
    Browse the repository at this point in the history
  8. 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 8, 2022
    Configuration menu
    Copy the full SHA
    b475163 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#105433 - ComputerDruid:docker_continuation_…

    …fix, r=jyn514
    
    CI: add missing line continuation marker
    
    Resolves this docker warning:
    
    ```
    [WARNING]: Empty continuation line found in:
        RUN apt-get update && apt-get install -y --no-install-recommends   g++   gcc-multilib   make   ninja-build   file   curl   ca-certificates   python2.7   python3.9   git   cmake   sudo   gdb   llvm-13-tools   llvm-13-dev   libedit-dev   libssl-dev   pkg-config   zlib1g-dev   xz-utils   nodejs     apt-transport-https software-properties-common &&     curl -s "https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb" > packages-microsoft-prod.deb &&     dpkg -i packages-microsoft-prod.deb &&     apt-get update &&     apt-get install -y powershell     && rm -rf /var/lib/apt/lists/*
    Warning: : Empty continuation lines will become errors in a future release.
    ```
    matthiaskrgr committed Dec 8, 2022
    Configuration menu
    Copy the full SHA
    9289c92 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#105434 - nbdd0121:lib, r=thomcc

    Fix warning when libcore is compiled with no_fp_fmt_parse
    
    Discovered when trying to compile Rust-for-Linux with Rust 1.66 beta.
    
    It'll be helpful if this is backported to beta (should be trivial enough for backporting), so Rust-for-Linux's rust version bump wouldn't need to do `--cap-lints allow` for libcore.
    matthiaskrgr committed Dec 8, 2022
    Configuration menu
    Copy the full SHA
    a147868 View commit details
    Browse the repository at this point in the history