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 3 pull requests #125257

Merged
merged 6 commits into from
May 18, 2024
Merged

Rollup of 3 pull requests #125257

merged 6 commits into from
May 18, 2024

Commits on May 17, 2024

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

Commits on May 18, 2024

  1. Configuration menu
    Copy the full SHA
    0beba96 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3e05be5 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#125214 - compiler-errors:gat-guide, r=lcnr

    Only make GAT ambiguous in `match_projection_projections` considering shallow resolvability
    
    In rust-lang#123537, I tweaked the hack from rust-lang#93892 to use `resolve_vars_if_possible` instead of `shallow_resolve`. This considers more inference guidance ambiguous. This resulted in crater regressions in rust-lang#125196.
    
    I've effectively reverted the change to the old behavior. That being said, I don't *like* this behavior, but I'd rather keep it for now since rust-lang#123537 was not meant to make any behavioral changes. See the attached example.
    
    This also affects the new solver, for the record, which doesn't have any rules about not guiding inference from param-env candidates which may constrain GAT args as a side-effect.
    
    r? `@lcnr` or `@jackh726`
    jieyouxu authored May 18, 2024
    Configuration menu
    Copy the full SHA
    f08746a View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#125236 - dtolnay:expandtest, r=nnethercote

    Add tests for `-Zunpretty=expanded` ported from stringify's tests
    
    This PR adds a new set of tests for the AST pretty-printer.
    
    Previously, pretty-printer edge cases were tested by way of `stringify!` in [tests/ui/macros/stringify.rs](https://github.com/rust-lang/rust/blob/1.78.0/tests/ui/macros/stringify.rs), such as the tests added by rust-lang@419b269 and rust-lang@527e2ea.
    
    Those tests will no longer provide effective coverage of the AST pretty-printer after rust-lang#124141. `Nonterminal` and `TokenKind::Interpolated` are being removed, and a consequence is that `stringify!` will perform token stream pretty printing, instead of AST pretty printing, in all of the `stringify!` cases including $:expr and all other interpolations.
    
    This PR adds 2 new ui tests with `compile-flags: -Zunpretty=expanded`:
    
    - **tests/ui/unpretty/expanded-exhaustive.rs** — this test aims for exhaustive coverage of all the variants of `ExprKind`, `ItemKind`, `PatKind`, `StmtKind`, `TyKind`, and `VisibilityKind`. Some parts could use being fleshed out further, but the current state is roughly on par with what exists in the old stringify-based tests.
    
    - **tests/ui/unpretty/expanded-interpolation.rs** — this test covers tricky macro metavariable edge cases that require the AST pretty printer to synthesize parentheses in order for the printed code to be valid Rust syntax.
    
    r? `@nnethercote`
    jieyouxu authored May 18, 2024
    Configuration menu
    Copy the full SHA
    ffc04df View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#125251 - jonhoo:patch-1, r=Nilstrieb

    Clarify how String::leak and into_boxed_str differ
    jieyouxu authored May 18, 2024
    Configuration menu
    Copy the full SHA
    c367d99 View commit details
    Browse the repository at this point in the history