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

Closed

Commits on Jun 24, 2024

  1. Configuration menu
    Copy the full SHA
    8cfd4b1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    273447c View commit details
    Browse the repository at this point in the history
  3. rustc_data_structures: Use portable AtomicU64 on 32-bit SPARC

    While at it, order the list of architectures alphabetically.
    glaubitz committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    572ae3b View commit details
    Browse the repository at this point in the history
  4. rustc_llvm: Link against libatomic on 32-bit SPARC

    While at it, order the list of architectures alphabetically.
    glaubitz committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    dc8ac3e View commit details
    Browse the repository at this point in the history
  5. bootstrap: Link against libatomic on 32-bit SPARC

    While at it, order the list of architectures alphabetically.
    glaubitz committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    8f7175c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    a194f42 View commit details
    Browse the repository at this point in the history
  7. rustc_target: Build sparc_unknown_linux_gnu with -mcpu=v9 and -m32

    The previously -mv8plus parameter is supported by GCC only, so let's
    use something that the SPARC backend in LLVM supports as well.
    glaubitz committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    e57bbb3 View commit details
    Browse the repository at this point in the history

Commits on Jun 25, 2024

  1. Tweak FlatPat::new to avoid a temporarily-invalid state

    It was somewhat confusing that the old constructor would create a `FlatPat` in
    a (possibly) non-simplified state, and then simplify its contents in-place.
    
    So instead we now create its fields as local variables, perform simplification,
    and then create the struct afterwards.
    
    This doesn't affect correctness, but is less confusing.
    Zalathar committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    c2f1072 View commit details
    Browse the repository at this point in the history
  2. set on-broken-pipe in prepare_cargo_tool

    Currently rustdoc breaks the build cache (due to having different rustflags) when building
    rustdoc before building another tool (e.g., `x test miri && x test rustdoc && x test miri`).
    
    This change fixes that by moving `on-broken-pipe` into `prepare_cargo_tool` so it is
    set for all tools.
    
    Signed-off-by: onur-ozkan <[email protected]>
    onur-ozkan committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    2e017f4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    604caa0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c7b579a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    d30d85f View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#126893 - dtolnay:prec, r=compiler-errors

    Eliminate the distinction between PREC_POSTFIX and PREC_PAREN precedence level
    
    I have been tangling with precedence as part of porting some pretty-printer improvements from syn back to rustc (related to parenthesization of closures, returns, and breaks by the AST pretty-printer).
    
    As far as I have been able to tell, there is no difference between the 2 different precedence levels that rustc identifies as `PREC_POSTFIX` (field access, square bracket index, question mark, method call) and `PREC_PAREN` (loops, if, paths, literals).
    
    There are a bunch of places that look at either `prec < PREC_POSTFIX` or `prec >= PREC_POSTFIX`. But there is nothing that needs to distinguish PREC_POSTFIX and PREC_PAREN from one another.
    
    https://github.com/rust-lang/rust/blob/d49994b060684af423339b55769439b2f444a7b9/compiler/rustc_ast/src/util/parser.rs#L236-L237
    
    https://github.com/rust-lang/rust/blob/d49994b060684af423339b55769439b2f444a7b9/compiler/rustc_hir_typeck/src/fn_ctxt/suggestions.rs#L2829
    
    https://github.com/rust-lang/rust/blob/d49994b060684af423339b55769439b2f444a7b9/compiler/rustc_hir_typeck/src/fn_ctxt/suggestions.rs#L1290
    
    In the interest of eliminating a distinction without a difference, this PR collapses these 2 levels down to 1.
    
    There is exactly 1 case where an expression with PREC_POSTFIX precedence needs to be parenthesized in a location that an expression with PREC_PAREN would not, and that's when the receiver of ExprKind::MethodCall is ExprKind::Field. `x.f()` means a different thing than `(x.f)()`. But this does not justify having separate precedence levels because this special case in the grammar is not governed by precedence. Field access does not have "lower precedence than" method call syntax &mdash; you can tell because if it did, then `x.f[0].f()` wouldn't be able to have its unparenthesized field access in the receiver of a method call. Because this Field/MethodCall special case is not governed by precedence, it already requires special handling and is not affected by eliminating the PREC_POSTFIX precedence level.
    
    https://github.com/rust-lang/rust/blob/d49994b060684af423339b55769439b2f444a7b9/compiler/rustc_ast_pretty/src/pprust/state/expr.rs#L217-L221
    compiler-errors authored Jun 25, 2024
    Configuration menu
    Copy the full SHA
    e8cd125 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#126907 - glaubitz:sparc-fixes, r=nagisa

    Fixes for 32-bit SPARC on Linux
    
    This PR fixes a number of issues which previously prevented `rustc` from being built
    successfully for 32-bit SPARC using the `sparc-unknown-linux-gnu` triplet.
    
    In particular, it adds linking against `libatomic` where necessary, uses portable `AtomicU64`
    for `rustc_data_structures` and rewrites the spec for `sparc_unknown_linux_gnu` to use
    `TargetOptions` and replaces the previously used `-mv8plus` with the more portable
    `-mcpu=v9 -m32`.
    
    To make `rustc` build successfully, support for 32-bit SPARC needs to be added to the `object`
    crate as well as the `nix` crate which I will be sending out later as well.
    
    r? nagisa
    compiler-errors authored Jun 25, 2024
    Configuration menu
    Copy the full SHA
    296e0b8 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#126932 - Zalathar:flat-pat, r=Nadrieril

    Tweak `FlatPat::new` to avoid a temporarily-invalid state
    
    It was somewhat confusing that the old constructor would create a `FlatPat` in a (possibly) non-simplified state, and then simplify its contents in-place.
    
    So instead we now create its fields as local variables, perform simplification, and then create the struct afterwards.
    
    This doesn't affect correctness, but is less confusing.
    
    ---
    
    I've also included some semi-related comments that I made while trying to navigate this code.
    compiler-errors authored Jun 25, 2024
    Configuration menu
    Copy the full SHA
    a9a4777 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#126934 - onur-ozkan:broken-build-cache, r=K…

    …obzol
    
    fix broken build cache caused by rustdoc builds
    
    Currently rustdoc breaks the build cache (due to having different rustflags) when building rustdoc before building another tool (e.g., `x test miri && x test rustdoc && x test miri`).
    
    This change fixes that by moving `on-broken-pipe` into `prepare_cargo_tool` so it is set for all tools.
    
    cc `@RalfJung`
    
    Fixes rust-lang#123177
    compiler-errors authored Jun 25, 2024
    Configuration menu
    Copy the full SHA
    f0339ac View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#126943 - Urgau:dedup-all, r=petrochenkov

    De-duplicate all consecutive native libs regardless of their options
    
    Address rust-lang#126913 (comment) by no longer de-duplicating based on the "options" but by only looking at the generated link args, as to avoid consecutive libs that originated from different native-lib with different options (like `raw-dylib` on Windows) but isn't relevant for `--print=native-static-libs`.
    
    r? `@petrochenkov`
    compiler-errors authored Jun 25, 2024
    Configuration menu
    Copy the full SHA
    095645c View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#126946 - cyrgani:patch-1, r=compiler-errors

    Add missing slash in `const_eval_select` doc comment
    
    In the middle of the doc comment, one line has only two slashes instead of three and isn't included in the [rendered documentation](https://doc.rust-lang.org/std/intrinsics/fn.const_eval_select.html#stability-concerns). This PR adds the missing slash.
    compiler-errors authored Jun 25, 2024
    Configuration menu
    Copy the full SHA
    985b3a3 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#126947 - Bryanskiy:delegation-lowering-refa…

    …ctoring, r=petrochenkov
    
    Delegation: ast lowering refactor
    
    refactoring changes for rust-lang#126699
    
    r? `@petrochenkov`
    compiler-errors authored Jun 25, 2024
    Configuration menu
    Copy the full SHA
    6d0bb34 View commit details
    Browse the repository at this point in the history