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 #101361

Merged
merged 23 commits into from
Sep 3, 2022
Merged

Rollup of 7 pull requests #101361

merged 23 commits into from
Sep 3, 2022

Commits on Aug 27, 2022

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

Commits on Aug 30, 2022

  1. [drop tracking] Use parent expression for scope

    Previously we were just using the parent node as the scope for a
    temporary value, but it turns out this is too narrow. For example, in
    an expression like
    
        Foo {
            b: &42,
            a: async { 0 }.await,
        }
    
    the scope for the &42 was set to the ExprField node for `b: &42`, when
    we actually want to use the Foo struct expression.
    
    We fix this by recursively searching through parent nodes until we find
    a Node::Expr. It may be that we don't find one, and if so that's okay,
    we will just fall back on the enclosing temporary scope which is always
    sufficient.
    eholk committed Aug 30, 2022
    Configuration menu
    Copy the full SHA
    b9d3f65 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
    f921f56 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. Clean up themes CSS

    GuillaumeGomez committed Sep 2, 2022
    Configuration menu
    Copy the full SHA
    7fb0a89 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    30bdf54 View commit details
    Browse the repository at this point in the history

Commits on Sep 3, 2022

  1. Rollup merge of rust-lang#99736 - lopopolo:lopopolo/rust-langgh-80996-…

    …partial-stabilization-bounds-as-ref, r=dtolnay
    
    Partially stabilize `bound_as_ref` by stabilizing `Bound::as_ref`
    
    Stabilizing `Bound::as_ref` will simplify the implementation for `RangeBounds<usize>` for custom range types:
    
    ```rust
    impl RangeBounds<usize> for Region {
        fn start_bound(&self) -> Bound<&usize> {
            // TODO: Use `self.start.as_ref()` when upstream `std` stabilizes:
            // rust-lang#80996
            match self.start {
                Bound::Included(ref bound) => Bound::Included(bound),
                Bound::Excluded(ref bound) => Bound::Excluded(bound),
                Bound::Unbounded => Bound::Unbounded,
            }
        }
    
        fn end_bound(&self) -> Bound<&usize> {
            // TODO: Use `self.end.as_ref()` when upstream `std` stabilizes:
            // rust-lang#80996
            match self.end {
                Bound::Included(ref bound) => Bound::Included(bound),
                Bound::Excluded(ref bound) => Bound::Excluded(bound),
                Bound::Unbounded => Bound::Unbounded,
            }
        }
    }
    ```
    
    See:
    
    - rust-lang#80996
    - rust-lang#80996 (comment)
    
    cc `@yaahc` who suggested partial stabilization.
    Dylan-DPC authored Sep 3, 2022
    Configuration menu
    Copy the full SHA
    2ed716a 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
    Dylan-DPC authored Sep 3, 2022
    Configuration menu
    Copy the full SHA
    a005679 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#101217 - eholk:drop-tracking-73137, r=jyn514

    [drop tracking] Use parent expression for scope, not parent node
    
    Previously we were just using the parent node as the scope for a temporary value, but it turns out this is too narrow. For example, in an expression like
    
        Foo {
            b: &42,
            a: async { 0 }.await,
        }
    
    the scope for the &42 was set to the ExprField node for `b: &42`, when we actually want to use the Foo struct expression.
    
    We fix this by recursively searching through parent nodes until we find a Node::Expr. It may be that we don't find one, and if so that's okay, we will just fall back on the enclosing temporary scope which is always sufficient.
    
    Helps with rust-lang#97331
    
    r? ``@jyn514``
    Dylan-DPC authored Sep 3, 2022
    Configuration menu
    Copy the full SHA
    dc8fe63 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
    Dylan-DPC authored Sep 3, 2022
    Configuration menu
    Copy the full SHA
    c42df98 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!
    Dylan-DPC authored Sep 3, 2022
    Configuration menu
    Copy the full SHA
    414d79d View commit details
    Browse the repository at this point in the history
  6. 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.
    Dylan-DPC authored Sep 3, 2022
    Configuration menu
    Copy the full SHA
    9ed2deb View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#101348 - GuillaumeGomez:cleanup-css-theme, …

    …r=notriddle
    
    Cleanup css theme
    
    Follow-up of rust-lang#100494.
    
    The change for the border color of the search input in the dark mode was actually a weird case: the search input border was unique, it didn't share the same variable with other items with borders. This weird case being unique to the dark theme, I removed it, hence the modification in the GUI test.
    
    Live demo is [here](https://rustdoc.crud.net/imperio/cleanup-css-theme/std/index.html).
    
    cc `@jsha`
    r? `@notriddle`
    Dylan-DPC authored Sep 3, 2022
    Configuration menu
    Copy the full SHA
    7eed25b View commit details
    Browse the repository at this point in the history