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

Merged
merged 19 commits into from
Oct 30, 2023
Merged

Rollup of 7 pull requests #117415

merged 19 commits into from
Oct 30, 2023

Commits on Oct 30, 2023

  1. Configuration menu
    Copy the full SHA
    745c600 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bc926f7 View commit details
    Browse the repository at this point in the history
  3. Add regression test

    oli-obk committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    972ee01 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8d03e13 View commit details
    Browse the repository at this point in the history
  5. Merge two equal match arms

    oli-obk committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    251021c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    43ff2a7 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    d5e836c View commit details
    Browse the repository at this point in the history
  8. Poison check_well_formed if method receivers are invalid to prevent t…

    …ypeck from running on it
    oli-obk committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    ff3a818 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    224ddf8 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    162443b View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    455cf5a View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    c91f60e View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#116862 - estebank:issue-57457, r=oli-obk

    Detect when trait is implemented for type and suggest importing it
    
    Fix rust-lang#57457.
    matthiaskrgr authored Oct 30, 2023
    Configuration menu
    Copy the full SHA
    c299595 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#117389 - oli-obk:gen_fn, r=compiler-errors

    Some diagnostics improvements of `gen` blocks
    
    These are leftovers from rust-lang#116447
    matthiaskrgr authored Oct 30, 2023
    Configuration menu
    Copy the full SHA
    86259e7 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#117396 - oli-obk:privacy_visitor_types, r=c…

    …ompiler-errors
    
    Don't treat closures/coroutine types as part of the public API
    
    Fixes a regression from rust-lang#117076
    
    r? `@compiler-errors`
    matthiaskrgr authored Oct 30, 2023
    Configuration menu
    Copy the full SHA
    e648f47 View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#117398 - Nadrieril:fix-117378, r=compiler-e…

    …rrors
    
    Correctly handle nested or-patterns in exhaustiveness
    
    I had assumed nested or-patterns were flattened, and they mostly are but not always.
    
    Fixes rust-lang#117378
    matthiaskrgr authored Oct 30, 2023
    Configuration menu
    Copy the full SHA
    342483c View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#117403 - oli-obk:the_gift_that_keeps_on_giv…

    …ing_116849, r=compiler-errors
    
    Poison check_well_formed if method receivers are invalid to prevent typeck from running on it
    
    fixes rust-lang#117379
    
    Though if some code invokes typeck without having first invoked `check_well_formed` then we'll encounter this ICE again. This can happen in const and const fn bodies if they are evaluated due to other `check_well_formed` checks or similar
    matthiaskrgr authored Oct 30, 2023
    Configuration menu
    Copy the full SHA
    24c6b6c View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#117411 - oli-obk:query_merge_immobile_game,…

    … r=compiler-errors,Nilstrieb
    
    Improve some diagnostics around `?Trait` bounds
    
    * uses better spans
    * clarifies a message that was only talking about generic params, but applies to `dyn ?Trait` and `impl ?Trait` as well
    matthiaskrgr authored Oct 30, 2023
    Configuration menu
    Copy the full SHA
    3e95c6a View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#117414 - compiler-errors:tait-forevert, r=o…

    …li-obk
    
    Don't normalize to an un-revealed opaque when we hit the recursion limit
    
    Currently, we will normalize `Opaque := Option<&Opaque>` to something like `Option<&Option<&Option<&...Opaque>>>`, hitting a limit and bottoming out in an unnormalized opaque after the recursion limit gets hit.
    
    Unfortunately, during `layout_of`, we'll simply recurse and try again if the type normalizes to something different than the type:
    https://github.com/rust-lang/rust/blob/e6e931dda5fffbae0fd87c5b1af753cc95556880/compiler/rustc_ty_utils/src/layout.rs#L58-L60
    
    That means then we'll try to normalize `Option<&Option<&Option<&...Opaque>>>` again, substituting `Opaque` into itself even deeper. Eventually this will get to the point that we're just stack-overflowing on a really deep type before even hitting an opaque again.
    
    To fix this, we just bottom out into `ty::Error` instead of the unrevealed opaque type.
    
    Fixes rust-lang#117412
    
    r? `@oli-obk`
    matthiaskrgr authored Oct 30, 2023
    Configuration menu
    Copy the full SHA
    c5aec96 View commit details
    Browse the repository at this point in the history