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 8 pull requests #105738

Closed
wants to merge 19 commits into from

Commits on Dec 14, 2022

  1. Add regression test for rust-lang#104678

    Signed-off-by: Yuki Okushi <jtitor@2k36.org>
    JohnTitor committed Dec 14, 2022
    Configuration menu
    Copy the full SHA
    687b4d9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5f5ae17 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bdc3c4b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ae60015 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1225a65 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7bf36de View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    cfa6a93 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    34d194d View commit details
    Browse the repository at this point in the history
  9. Add test

    compiler-errors committed Dec 14, 2022
    Configuration menu
    Copy the full SHA
    d10f6b4 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    de59844 View commit details
    Browse the repository at this point in the history

Commits on Dec 15, 2022

  1. Ensure async trait impls are async (or otherwise return an opaque type)

    As a workaround for the full `#[refine]` semantics not being implemented
    yet, forbit returning a concrete future type like `Box<dyn Future>` or a
    manually implemented Future.
    
    `-> impl Future` is still permitted; while that can also cause
    accidental refinement, that's behind a different feature gate
    (`return_position_impl_trait_in_trait`) and that problem exists
    regardless of whether the trait method is async, so will have to be
    solved more generally.
    
    Fixes rust-lang#102745
    ComputerDruid committed Dec 15, 2022
    Configuration menu
    Copy the full SHA
    da98ef9 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#104334 - compiler-errors:ufcs-sugg-wrong-de…

    …f-id, r=estebank
    
    Use impl's def id when calculating type to specify in UFCS
    
    Fixes rust-lang#104327
    Fixes rust-lang#104328
    
    Also addresses rust-lang#102670 (comment)
    matthiaskrgr authored Dec 15, 2022
    Configuration menu
    Copy the full SHA
    10e94e8 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#104592 - ComputerDruid:async_check, r=compi…

    …ler-errors
    
    Ensure async trait impls are async (or otherwise return an opaque type)
    
    As a workaround for the full `#[refine]` semantics not being implemented
    yet, forbit returning a concrete future type like `Box<dyn Future>` or a
    manually implemented Future.
    
    `-> impl Future` is still permitted; while that can also cause
    accidental refinement, that's behind a different feature gate
    (`return_position_impl_trait_in_trait`) and that problem exists
    regardless of whether the trait method is async, so will have to be
    solved more generally.
    
    Fixes rust-lang#102745
    matthiaskrgr authored Dec 15, 2022
    Configuration menu
    Copy the full SHA
    7c9c03a View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#105285 - compiler-errors:conflicting-param-…

    …env-2, r=estebank
    
    Highlight conflicting param-env candidates, again
    
    Un-reverts rust-lang#98794 (i.e. reverts rust-lang#99290).
    
    The previous time I attempted to land this PR, it was because of an incremental issue (rust-lang#99233). The repro instructions in the issue is no longer manifest the ICE -- I think it's because this ambiguity code was refactored (I think by ````@lcnr)```` to no longer store the ambiguities in the fulfillment error, but instead recompute them on the fly.
    
    The main motivation for trying to re-land this is that it fixes rust-lang#105131 by highlighting the root-cause of the issue, which is conflicting param-env candidates:
    
    ```
    error[E0283]: type annotations needed: cannot satisfy `Self: Gen<'source>`
       |
    note: multiple `impl`s or `where` clauses satisfying `Self: Gen<'source>` found
      --> $DIR/conflicting-bounds.rs:3:1
       |
    LL | pub trait Gen<'source> {
       | ^^^^^^^^^^^^^^^^^^^^^^
    ...
    LL |         Self: for<'s> Gen<'s, Output = T>;
       |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
    error: aborting due to previous error
    
    For more information about this error, try `rustc --explain E0283`.
    ```
    
    Fixes rust-lang#105131.
    Fixes (again) rust-lang#98786
    matthiaskrgr authored Dec 15, 2022
    Configuration menu
    Copy the full SHA
    b8bbc7a View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#105623 - compiler-errors:generator-type-siz…

    …e-fix, r=Nilstrieb
    
    Fix `-Z print-type-sizes` for generators with discriminant field ordered first
    
    Fixes rust-lang#105589
    Fixes rust-lang#105591
    matthiaskrgr authored Dec 15, 2022
    Configuration menu
    Copy the full SHA
    6cb3c62 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#105627 - compiler-errors:dyn-auto-suggestab…

    …le, r=davidtwco
    
    Auto traits in `dyn Trait + Auto` are suggestable
    
    Not  sure why I had made the `IsSuggestableVisitor` have that rule to not consider `dyn Trait + Auto` to be suggestable.
    
    It's possible that this was done because of the fact that we don't print the right parentheses for `&(dyn Trait + Auto)`, but that's a problem with printing these types in general that we probably have tracked somewhere else...
    matthiaskrgr authored Dec 15, 2022
    Configuration menu
    Copy the full SHA
    f7854d9 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#105633 - compiler-errors:term-agnostic, r=o…

    …li-obk
    
    Make `report_projection_error` more `Term` agnostic
    
    Fixes rust-lang#105632
    matthiaskrgr authored Dec 15, 2022
    Configuration menu
    Copy the full SHA
    968b053 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#105692 - JohnTitor:issue-104678, r=compiler…

    …-errors
    
    Add regression test for rust-lang#104678
    
    Closes rust-lang#104678
    r? ````@compiler-errors````
    
    Signed-off-by: Yuki Okushi <jtitor@2k36.org>
    matthiaskrgr authored Dec 15, 2022
    Configuration menu
    Copy the full SHA
    03aef4b View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#105722 - matthiaskrgr:compl2, r=compiler-er…

    …rors
    
    more clippy::complexity fixes
    
    r? ``@compiler-errors``
    matthiaskrgr authored Dec 15, 2022
    Configuration menu
    Copy the full SHA
    e1beb87 View commit details
    Browse the repository at this point in the history