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 6 pull requests #112324

Merged
merged 15 commits into from
Jun 6, 2023
Merged

Rollup of 6 pull requests #112324

merged 15 commits into from
Jun 6, 2023

Commits on May 29, 2023

  1. Configuration menu
    Copy the full SHA
    33eef82 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    70bbcce View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2023

  1. Configuration menu
    Copy the full SHA
    896ccb9 View commit details
    Browse the repository at this point in the history
  2. Normalize in infcx instead of globally for Option::as_deref suggestion

    The projection may contain inference variables. These inference
    variables are local to the local inference context. Using
    `tcx.normalize_erasing_regions` doesn't work here because this method is
    global and does not have access to the inference context. It's therefore
    unable to deal with the inference variables. We normalize in the local
    inference context instead, which knowns about the inference variables.
    Noratrieb committed Jun 5, 2023
    Configuration menu
    Copy the full SHA
    c12575d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    604ffab View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1fa7692 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    58972d1 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    979379a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    0e9e91a View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#112081 - obeis:doc-test-literal, r=compiler…

    …-errors
    
    Avoid ICE on `#![doc(test(...)]` with literal parameter
    
    Close rust-lang#109066
    
    r? `@compiler-errors`
    matthiaskrgr authored Jun 5, 2023
    Configuration menu
    Copy the full SHA
    129a57a View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#112196 - compiler-errors:new-solver-resolv,…

    … r=lcnr
    
    Resolve vars in result from `scrape_region_constraints`
    
    Since we perform `type_op::Normalize` in the local infcx when the new solver is enabled, vars aren't necessarily resolved, which triggers this ICE:
    
    https://github.com/rust-lang/rust/blob/f85ab544dfbbce7448993c490ad16c176339b939/compiler/rustc_infer/src/infer/nll_relate/mod.rs#L481
    
    There are more tests that go from ICE -> pass due to this change, but I just added revisions to a few for CI.
    
    r? `@lcnr`
    matthiaskrgr authored Jun 5, 2023
    Configuration menu
    Copy the full SHA
    9ce0c79 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#112303 - Nilstrieb:as-deref, r=compiler-errors

    Normalize in infcx instead of globally for `Option::as_deref` suggestion
    
    fixes rust-lang#112293
    
    The projection may contain inference variables. These inference variables are local to the local inference context. Using `tcx.normalize_erasing_regions` doesn't work here because this method is global and does not have access to the inference context. It's therefore unable to deal with the inference variables. We normalize in the local inference context instead, which knowns about the inference variables.
    
    The test looks a little different than the issue example, I made it more minimal and verified that it still ICEs on nightly.
    
    Also contains a drive-by fix to properly compare the types.
    
    r? `@compiler-errors`
    matthiaskrgr authored Jun 5, 2023
    Configuration menu
    Copy the full SHA
    ff43249 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#112316 - clubby789:unused-parens-space, r=c…

    …ompiler-errors
    
    Ensure space is inserted after keyword in `unused_delims`
    
    Fixes rust-lang#112276
    matthiaskrgr authored Jun 5, 2023
    Configuration menu
    Copy the full SHA
    0ff5a6e View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#112318 - oli-obk:assoc_ty_sized_bound_for_o…

    …bject_safety, r=compiler-errors
    
    Merge method, type and const object safety checks
    
    cc `@spastorino` and `@compiler-errors` on the first commit. I believe it to be correct, as the field is only `Some` for assoc types, so just checking the field without checking the assoc kind to be `Type` is fine.
    
    The second commit avoids going through all associated items thrice and just goes over all of them once, running the object safety checks per assoc item kind.
    matthiaskrgr authored Jun 5, 2023
    Configuration menu
    Copy the full SHA
    44acf79 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#112322 - compiler-errors:no-IMPLIED_BOUNDS_…

    …ENTAILMENT-if-errs, r=eholk
    
    Don't mention `IMPLIED_BOUNDS_ENTAILMENT` if signatures reference error
    
    Fixes rust-lang#112321
    matthiaskrgr authored Jun 5, 2023
    Configuration menu
    Copy the full SHA
    dcdd867 View commit details
    Browse the repository at this point in the history