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

Closed
wants to merge 24 commits into from
Closed

Rollup of 7 pull requests #126001

wants to merge 24 commits into from

Commits on Jun 2, 2024

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

Commits on Jun 3, 2024

  1. wipe bootstrap build before switching to bumped rustc

    Technically, wiping bootstrap builds can increase the build time.
    But in practice, trying to manually resolve post-bump issues and
    even accidentally removing the entire build directory will result
    in a much greater loss of time. After all, the bootstrap build process
    is not a particularly lengthy operation.
    
    Signed-off-by: onur-ozkan <work@onurozkan.dev>
    onur-ozkan committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    92f85f1 View commit details
    Browse the repository at this point in the history
  2. Revert "Cache whether a body has inline consts"

    This reverts commit eae5031.
    oli-obk committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    f152e2c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c9e50ae View commit details
    Browse the repository at this point in the history
  4. Add regression test

    oli-obk committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    0d88bf2 View commit details
    Browse the repository at this point in the history
  5. Add regression test

    oli-obk committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    4c95b88 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    ff5b2a4 View commit details
    Browse the repository at this point in the history

Commits on Jun 4, 2024

  1. Configuration menu
    Copy the full SHA
    f67a0eb View commit details
    Browse the repository at this point in the history
  2. Add regression tests

    oli-obk committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    4f47342 View commit details
    Browse the repository at this point in the history
  3. Manual rustfmt

    oli-obk committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    5e8df95 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    14f9c63 View commit details
    Browse the repository at this point in the history
  5. Turn a delayed bug back into a normal bug by winnowing private method…

    … candidates instead of assuming any candidate of the right name will apply.
    oli-obk committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    7d151fa View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7894a11 View commit details
    Browse the repository at this point in the history
  7. Give test a more useful name

    oli-obk committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    8189506 View commit details
    Browse the repository at this point in the history
  8. Add test description

    oli-obk committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    ffb1b2c View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    ad6e85b View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    8746703 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#122192 - oli-obk:type_of_opaque_for_const_c…

    …hecks, r=lcnr
    
    Do not try to reveal hidden types when trying to prove Freeze in the defining scope
    
    fixes rust-lang#99793
    
    this avoids the cycle error by just causing a selection error, which is not fatal. We pessimistically assume that freeze does not hold, which is always a safe assumption.
    fmease committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    c43eb8e View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#124840 - bvanjoi:fix-124490, r=petrochenkov

    resolve: mark it undetermined if single import is not has any bindings
    
    - Fixes rust-lang#124490
    - Fixes rust-lang#125013
    
    This issue arises from incorrect resolution updates, for example:
    
    ```rust
    mod a {
        pub mod b {
            pub mod c {}
        }
    }
    
    use a::*;
    
    use b::c;
    use c as b;
    
    fn main() {}
    ```
    
    1. In the first loop, binding `(root, b)` is refer to `root::a::b` due to `use a::*`.
        1. However, binding `(root, c)` isn't defined by `use b::c` during this stage because `use c as b` falls under the `single_imports` of `(root, b)`, where the `imported_module` hasn't been computed yet. This results in marking the `path_res` for `b` as `Indeterminate`.
        2. Then, the `imported_module` for `use c as b` will be recorded.
    2. In the second loop, `use b::c` will be processed again:
        1. Firstly, it attempts to find the `path_res` for `(root, b)`.
        2. It will iterate through the `single_imports` of `use b::c`, encounter `use c as b`, attempt to resolve `c` in `root`, and ultimately return `Err(Undetermined)`, thus passing the iterator.
        3. Use the binding `(root, b)` -> `root::a::b` introduced by `use a::*` and ultimately return `root::a::b` as the `path_res` of `b`.
        4. Then define the binding `(root, c)` -> `root::a::b::c`.
    3. Then process `use c as b`, update the resolution for `(root, b)` to refer to `root::a::b::c`, ultimately causing inconsistency.
    
    In my view, step `2.2` has an issue where it should exit early, similar to the behavior when there's no `imported_module`. Therefore, I've added an attribute called `indeterminate` to `ImportData`. This will help us handle only those single imports that have at least one determined binding.
    
    r? `@petrochenkov`
    fmease committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    d8b288c View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#125622 - oli-obk:define_opaque_types15, r=c…

    …ompiler-errors
    
    Winnow private method candidates instead of assuming any candidate of the right name will apply
    
    partially reverts rust-lang#60721
    
    My original motivation was just to avoid the `delay_span_bug` (by attempting to thread the `ErrorGuaranteed` through to here). But then I realized that the error message is wrong. It refers to the `Foo<A>::foo` instead of `Foo<B>::foo`. This is almost invisible, because both functions are the same, but on different lines, so `-Zui-testing` makes it so the test is the same no matter which of these two functions is referenced.
    
    But there's a much more obvious bug: If `Foo<B>` does not have a `foo` method at all, but `Foo<A>` has a private `foo` method, then we'll refer to that one. This has now been fixed, and we report a normal `method not found` error.
    
    The way this is done is by creating a list of all possible private functions (just like we create a list of the public functions that can actually be called), and then winnowing it by analyzing where bounds and `Self` types to see if any of the found methods can actually apply (again, just like with the list of public functions).
    
    I wonder if there is room for doing the same thing with unstable functions instead of running all of method resolution twice.
    
    r? `@compiler-errors` for method resolution stuff
    fmease committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    874331e View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#125871 - fmease:fix-orphanck-opaques, r=lcnr

    Orphanck[old solver]: Consider opaque types to never cover type parameters
    
    This fixes an oversight of mine in rust-lang#117164. The change itself has already been FCP'ed.
    
    This only affects the old solver, the next solver already correctly rejects the added test since rust-lang#117164.
    
    r? `@lcnr`
    fmease committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    323aa7e View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#125893 - cjgillot:gvn-newops, r=oli-obk

    Handle all GVN binops in a single place.
    
    <!--
    If this PR is related to an unstable feature or an otherwise tracked effort,
    please link to the relevant tracking issue here. If you don't know of a related
    tracking issue or there are none, feel free to ignore this.
    
    This PR will get automatically assigned to a reviewer. In case you would like
    a specific user to review your work, you can assign it to them by using
    
        r​? <reviewer name>
    -->
    
    Addresses https://github.com/rust-lang/rust/pull/125359/files#r1608185319
    r? `@oli-obk`
    fmease committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    7cd2aac View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#125911 - onur-ozkan:wipe-broken-cache, r=al…

    …bertlarsan68
    
    delete bootstrap build before switching to bumped rustc
    
    Technically, wiping bootstrap builds can increase the build time. But in practice, trying to manually resolve post-bump issues and even accidentally removing the entire build directory will result in a much greater loss of time. After all, the bootstrap build process is not a particularly lengthy operation.
    
    Workaround for rust-lang#125578
    fmease committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    91f8f17 View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#125918 - oli-obk:const_block_ice, r=compile…

    …r-errors
    
    Revert: create const block bodies in typeck via query feeding
    
    as per the discussion in rust-lang#125806 (comment)
    
    It was a mistake to try to shoehorn const blocks and some specific anon consts into the same box and feed them during typeck. It turned out not simplifying anything (my hope was that we could feed `type_of` to start avoiding the huge HIR matcher, but that didn't work out), but instead making a few things more fragile.
    
    reverts the const-block-specific parts of rust-lang#124650
    
    ```@bors``` rollup=never had a small perf impact previously
    
    fixes rust-lang#125846
    
    r? ```@compiler-errors```
    fmease committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    21268d9 View commit details
    Browse the repository at this point in the history