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 7 pull requests #101355

Closed
wants to merge 32 commits into from

Commits on Aug 22, 2022

  1. safe transmute: use Assume struct to provide analysis options

    This was left as a TODO in rust-lang#92268, and brings the trait more in
    line with what was defined in MCP411.
    
    `Assume::visibility` has been renamed to `Assume::safety`, as
    library safety is what's actually being assumed; visibility is
    just the mechanism by which it is currently checked (this may
    change).
    
    ref: rust-lang/compiler-team#411
    ref: rust-lang#99571
    jswrenn committed Aug 22, 2022
    Configuration menu
    Copy the full SHA
    f46fffc View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2022

  1. safe transmute: use FxIndex{Map,Set} instead of FxHash{Map,Set}

    resolves query instability issues, and probably better for performance
    jswrenn committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    1d844fe View commit details
    Browse the repository at this point in the history

Commits on Aug 31, 2022

  1. Configuration menu
    Copy the full SHA
    54645e8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3ed9310 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f7e462a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    32e1823 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    bd8e312 View commit details
    Browse the repository at this point in the history
  6. port of locator.rs to SessionDiagnostics, fix some of the errors

    revealed by tests, manually add a panic to test for dead code
    CleanCut committed Aug 31, 2022
    Configuration menu
    Copy the full SHA
    d0ba1fb View commit details
    Browse the repository at this point in the history
  7. respond to review feedback: mainly eliminate as many conversions as p…

    …ossible...
    
    - ... when creating diagnostics in rustc_metadata
    -  use the error_code! macro
    - pass macro output to diag.code()
    - use fluent from within manual implementation of SessionDiagnostic
    - emit the untested errors in case they occur in the wild
    - stop panicking in the probably-not-dead code, add fixme to write test
    CleanCut committed Aug 31, 2022
    Configuration menu
    Copy the full SHA
    0d65819 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    30adfd6 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    fbcc038 View commit details
    Browse the repository at this point in the history

Commits on Sep 1, 2022

  1. Configuration menu
    Copy the full SHA
    e4e4114 View commit details
    Browse the repository at this point in the history
  2. Use tcx.hir() utils for spans in MIR building.

    This corrects the `span_with_body` in the case of closures, which was
    incorrectly shortened to the `def_span`.
    cjgillot committed Sep 1, 2022
    Configuration menu
    Copy the full SHA
    f848d27 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    26037b1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    609a90d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    692064b View commit details
    Browse the repository at this point in the history
  6. Shrink some visibilities.

    cjgillot committed Sep 1, 2022
    Configuration menu
    Copy the full SHA
    8a594f0 View commit details
    Browse the repository at this point in the history
  7. Bless codegen test.

    cjgillot committed Sep 1, 2022
    Configuration menu
    Copy the full SHA
    d85dff7 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    b9e1806 View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2022

  1. Use BCRYPT_RNG_ALG_HANDLE by default

    Also briefly document the history of `sys/windows/rand.rs` as they may be relevant to any future changes.
    ChrisDenton committed Sep 2, 2022
    Configuration menu
    Copy the full SHA
    bc793c9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    532d5f2 View commit details
    Browse the repository at this point in the history
  3. Fix unsupported syntax in .manifest file

    Fuchsia .manifest files do not support a `#` comment syntax. Because of this, if you copy and paste the current example code for this file, and then remove the line you don't need, you still see an error. To make this a bit easier to follow, split this into two code blocks, one for rustc, and one for cargo.
    diminishedprime authored Sep 2, 2022
    Configuration menu
    Copy the full SHA
    6fbc4d9 View commit details
    Browse the repository at this point in the history
  4. rustdoc: remove unused CSS selector .methods > .item-info

    It was added with e08a84a
    (actually, it was called `.methods > .stability` at the time) and was
    directly nested that way.
    
    But with the switch to `<details>`, the code has changed drastically out from
    under it, to the point where you have to go out of your way to actually get
    it to render this way, and the result looks overly-tight and weird alongside
    the normal version where this code is not reachable.
    notriddle committed Sep 2, 2022
    Configuration menu
    Copy the full SHA
    df09047 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6f95c89 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    0f29824 View commit details
    Browse the repository at this point in the history

Commits on Sep 3, 2022

  1. Rollup merge of rust-lang#100726 - jswrenn:transmute, r=oli-obk

    safe transmute: use `Assume` struct to provide analysis options
    
    This task was left as a TODO in rust-lang#92268; resolving it brings [`BikeshedIntrinsicFrom`](https://doc.rust-lang.org/nightly/core/mem/trait.BikeshedIntrinsicFrom.html) more in line with the API defined in [MCP411](rust-lang/compiler-team#411).
    
    **Before:**
    ```rust
    pub unsafe trait BikeshedIntrinsicFrom<
        Src,
        Context,
        const ASSUME_ALIGNMENT: bool,
        const ASSUME_LIFETIMES: bool,
        const ASSUME_VALIDITY: bool,
        const ASSUME_VISIBILITY: bool,
    > where
        Src: ?Sized,
    {}
    ```
    **After:**
    ```rust
    pub unsafe trait BikeshedIntrinsicFrom<Src, Context, const ASSUME: Assume = { Assume::NOTHING }>
    where
        Src: ?Sized,
    {}
    ```
    
    `Assume::visibility` has also been renamed to `Assume::safety`, as library safety invariants are what's actually being assumed; visibility is just the mechanism by which it is currently checked (and that may change).
    
    r? `@oli-obk`
    
    ---
    
    Related:
    - rust-lang/compiler-team#411
    - rust-lang#99571
    matthiaskrgr authored Sep 3, 2022
    Configuration menu
    Copy the full SHA
    e135e37 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#100928 - CleanCut:rustc_metadata_diagnostic…

    …s, r=davidtwco
    
    Migrate rustc_metadata to SessionDiagnostics
    
    Migrate rustc_metadata to SessionDiagnostics.
    
    Part of rust-lang#100717
    matthiaskrgr authored Sep 3, 2022
    Configuration menu
    Copy the full SHA
    6395082 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#101086 - cjgillot:thir-param, r=oli-obk

    Compute information about function parameters on THIR
    
    This avoids some manipulation of typeck results while building MIR.
    matthiaskrgr authored Sep 3, 2022
    Configuration menu
    Copy the full SHA
    2c0a225 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#101325 - ChrisDenton:BCRYPT_RNG_ALG_HANDLE,…

    … r=thomcc
    
    Windows RNG: Use `BCRYPT_RNG_ALG_HANDLE` by default
    
    This only changes a small amount of actual code, the rest is documentation outlining the history of this module as I feel it will be relevant to any future issues that might crop up.
    
    The code change is to use the `BCRYPT_RNG_ALG_HANDLE` [pseudo-handle](https://docs.microsoft.com/en-us/windows/win32/seccng/cng-algorithm-pseudo-handles) by default, which simply uses the default RNG. Previously we used `BCRYPT_USE_SYSTEM_PREFERRED_RNG` which has to load the system configuration and then find and load that RNG. I suspect this was the cause of failures on some systems (e.g. due to corrupted config). However, this is admittedly speculation as I can't reproduce the issue myself (and it does seem quite rare even in the wild). Still, removing a possible point of failure is likely worthwhile in any case.
    
    r? libs
    matthiaskrgr authored Sep 3, 2022
    Configuration menu
    Copy the full SHA
    2739e70 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#101330 - wkordalski:hashset-drain-doc, r=jy…

    …n514
    
    Fix `std::collections::HashSet::drain` documentation
    
    Hi!
    
    `std::collections::HashSet::drain` contains small typo in the docstring.
    
    I didn't read too much about the model of contributing to Rust, so merge this PR or close and fix the typo the right way :)
    
    Thanks for Rust!
    matthiaskrgr authored Sep 3, 2022
    Configuration menu
    Copy the full SHA
    afed4ff View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#101335 - notriddle:notriddle/methods-stabil…

    …ity, r=notriddle
    
    rustdoc: remove old CSS selector that causes weird spacing
    
    It was added with e08a84a (actually, it was called `.methods > .stability` at the time) and was directly nested that way.
    
    **EDIT**: It is technically reachable code still, but it seems wrong.
    
    ## With the old CSS rule still present
    
    https://notriddle.com/notriddle-rustdoc-test/weird-spacing/lib/struct.Foo.html
    
    ![image](https://user-images.githubusercontent.com/1593513/188216226-c667c560-d33d-494f-a492-4e0ec3ac0009.png)
    
    ## Version 2 (an older version of this PR)
    
    https://notriddle.com/notriddle-rustdoc-test/normal-spacing-2/lib/struct.Foo.html
    
    ![image](https://user-images.githubusercontent.com/1593513/188216418-9fcd3109-f1b2-425d-b4fc-0c6b3b54e48e.png)
    
    ## Version 3 (with alignment fix for mobile)
    
    https://notriddle.com/notriddle-rustdoc-test/normal-spacing-3/lib/struct.Foo.html
    
    ![image](https://user-images.githubusercontent.com/1593513/188223161-0e1ebce7-842f-41cb-8a0c-ae43aedcfccc.png)
    matthiaskrgr authored Sep 3, 2022
    Configuration menu
    Copy the full SHA
    297793c View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#101338 - diminishedprime:patch-2, r=tmandry

    Fix unsupported syntax in .manifest file
    
    Fuchsia .manifest files do not support a `#` comment syntax. Because of this, if you copy and paste the current example code for this file, and then remove the line you don't need, you still see an error. To make this a bit easier to follow, split this into two code blocks, one for rustc, and one for cargo.
    matthiaskrgr authored Sep 3, 2022
    Configuration menu
    Copy the full SHA
    f0fcbca View commit details
    Browse the repository at this point in the history