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

Merged
merged 16 commits into from
Oct 1, 2021
Merged

Rollup of 7 pull requests #89417

merged 16 commits into from
Oct 1, 2021

Commits on Sep 26, 2021

  1. Configuration menu
    Copy the full SHA
    65eb381 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5c70f25 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    750018e View commit details
    Browse the repository at this point in the history

Commits on Sep 28, 2021

  1. Rebase resume argument projections during state transform

    When remapping a resume argument with projections rebase them on top of
    the new base.
    
    The case where resume argument has projections is unusual, but might
    arise with box syntax where the assignment is performed directly into
    the box without an intermediate temporary.
    tmiasko committed Sep 28, 2021
    Configuration menu
    Copy the full SHA
    8901ea2 View commit details
    Browse the repository at this point in the history
  2. review comments

    estebank committed Sep 28, 2021
    Configuration menu
    Copy the full SHA
    e19d82f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    87a4a79 View commit details
    Browse the repository at this point in the history

Commits on Sep 29, 2021

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

Commits on Sep 30, 2021

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

Commits on Oct 1, 2021

  1. Rollup merge of rust-lang#88838 - FabianWolff:issue-88472, r=estebank

    Do not suggest importing inaccessible items
    
    Fixes rust-lang#88472. For this example:
    ```rust
    mod a {
        struct Foo;
    }
    
    mod b {
        type Bar = Foo;
    }
    ```
    rustc currently emits:
    ```
    error[E0412]: cannot find type `Foo` in this scope
     --> test.rs:6:16
      |
    6 |     type Bar = Foo;
      |                ^^^ not found in this scope
      |
    help: consider importing this struct
      |
    6 |     use a::Foo;
      |
    ```
    this is incorrect, as applying this suggestion leads to
    ```
    error[E0603]: struct `Foo` is private
     --> test.rs:6:12
      |
    6 |     use a::Foo;
      |            ^^^ private struct
      |
    note: the struct `Foo` is defined here
     --> test.rs:2:5
      |
    2 |     struct Foo;
      |     ^^^^^^^^^^^
    ```
    With my changes, I get:
    ```
    error[E0412]: cannot find type `Foo` in this scope
     --> test.rs:6:16
      |
    6 |     type Bar = Foo;
      |                ^^^ not found in this scope
      |
      = note: this struct exists but is inaccessible:
              a::Foo
    ```
    As for the wildcard mentioned in rust-lang#88472, I would argue that the warning is actually correct, since the import _is_ unused. I think the real issue is the wrong suggestion, which I have fixed here.
    Manishearth authored Oct 1, 2021
    Configuration menu
    Copy the full SHA
    9593e61 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#89251 - estebank:negative-index-literals, r…

    …=davidtwco
    
    Detect when negative literal indices are used and suggest appropriate code
    Manishearth authored Oct 1, 2021
    Configuration menu
    Copy the full SHA
    e77d163 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#89321 - tmiasko:rebase-resume-arg, r=estebank

    Rebase resume argument projections during state transform
    
    When remapping a resume argument with projections rebase them on top of
    the new base.
    
    The case where resume argument has projections is unusual, but might
    arise with box syntax where the assignment is performed directly into
    the box without an intermediate temporary.
    
    Fixes rust-lang#85635.
    Manishearth authored Oct 1, 2021
    Configuration menu
    Copy the full SHA
    2726955 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#89327 - oli-obk:nll_diag_infer_vars, r=wesl…

    …eywiser
    
    Pick one possible lifetime in case there are multiple choices
    
    In case a lifetime variable is created, but doesn't have an obvious lifetime in the list of named lifetimes that it should be inferred to, just pick the first one for the diagnostic.
    
    This happens e.g. in
    
    ```rust
    fn foo<'a, 'b>(a: Struct<'a>, b: Struct<'b>) -> impl Trait<'a, 'b> {
        if bar() { a } else { b }
    }
    ```
    
    where we get a lifetime variable that combines the lifetimes of `a` and `b` creating a lifetime that is the intersection of both. Right now the type system cannot express this and thus we get an error, but that error also can't express this.
    
    I can also create an entirely new diagnostic that mentions all involved lifetimes, so it would actually mention `'a` and `'b` instead of just `'b`.
    Manishearth authored Oct 1, 2021
    Configuration menu
    Copy the full SHA
    8c5114b View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#89344 - jackh726:maybe-bound-eror, r=cjgillot

    Cleanup lower_generics_mut and make span be the bound itself
    
    Closes rust-lang#86298 (supersedes those changes)
    
    r? `@cjgillot` since you reviewed the other PR
    
    (Used wrong branch for rust-lang#89338)
    Manishearth authored Oct 1, 2021
    Configuration menu
    Copy the full SHA
    746e465 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#89397 - wesleywiser:update_llvm_submodule, …

    …r=cuviper
    
    Update `llvm` submodule to fix function name mangling on x86 Windows
    
    Fixes rust-lang#89307
    Manishearth authored Oct 1, 2021
    Configuration menu
    Copy the full SHA
    e834b9d View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#89412 - lqd:zvariant-repro, r=Aaron1011

    Add regression test for issues rust-lang#88969 and rust-lang#89119
    
    This adds a regression test to complete rust-lang#89125, and thus for issues rust-lang#88969 and rust-lang#89119, which needed a test.
    
    Used with multiple crates, [this](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=f665e7e882059157e0f86cfb09c47187) minimized from `zvariant-2.8.0` reproduces the error on `nightly-2021-09-19`.
    
    The test in this PR fails on master if the commit 6dbb9d4 from rust-lang#89125 is reverted, and passes otherwise since it's now fixed.
    
    r? `@Aaron1011`
    Manishearth authored Oct 1, 2021
    Configuration menu
    Copy the full SHA
    4571fea View commit details
    Browse the repository at this point in the history