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

Automated pull from upstream master #74

Merged
merged 1,252 commits into from Oct 31, 2023
This pull request is big! We’re only showing the most recent 250 commits.

Commits on Oct 26, 2023

  1. Merge pull request #371 from rust-lang/sync_from_rust_2023_10_25

    Sync from rust 2023/10/25
    antoyo committed Oct 26, 2023
    Configuration menu
    Copy the full SHA
    e4fe941 View commit details
    Browse the repository at this point in the history
  2. Merge commit 'e4fe941b11a55c5005630696e9b6d81c65f7bd04' into subtree-…

    …update_cg_gcc_2023-10-25
    antoyo committed Oct 26, 2023
    Configuration menu
    Copy the full SHA
    c797ccc View commit details
    Browse the repository at this point in the history
  3. Auto merge of #117249 - matthiaskrgr:rollup-h4og5rv, r=matthiaskrgr

    Rollup of 6 pull requests
    
    Successful merges:
    
     - #116968 (Invalid `?` suggestion on mismatched `Ok(T)`)
     - #117032 (Enable cg_clif tests for riscv64gc)
     - #117106 (When expecting closure argument but finding block provide suggestion)
     - #117114 (Improve `stringify.rs` test)
     - #117188 (Avoid repeated interning of `env!("CFG_RELEASE")`)
     - #117243 (Explain implementation of mem::replace)
    
    r? `@ghost`
    `@rustbot` modify labels: rollup
    bors committed Oct 26, 2023
    Configuration menu
    Copy the full SHA
    dab7156 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    87dc85d View commit details
    Browse the repository at this point in the history
  5. Documentation and error message improvements related to PassMode::Dir…

    …ect assert
    
    Co-authored-by: Jubilee <46493976+workingjubilee@users.noreply.github.com>
    2 people authored and Kjetil Kjeka committed Oct 26, 2023
    Configuration menu
    Copy the full SHA
    4d33876 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    e81a5c6 View commit details
    Browse the repository at this point in the history

Commits on Oct 27, 2023

  1. Auto merge of #113183 - estebank:redundant-sized-errors, r=davidtwco

    Only emit one error per unsized binding, instead of one per usage
    
    Fix #56607.
    bors committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    aa91057 View commit details
    Browse the repository at this point in the history
  2. Refactor some char, u8 ascii functions to be branchless

    Decompose singular `matches!` with or-patterns to individual `matches!`
    statements to enable branchless code output. The following functions
    were changed:
    - `is_ascii_alphanumeric`
    - `is_ascii_hexdigit`
    - `is_ascii_punctuation`
    
    Add codegen tests
    
    Co-authored-by: George Bateman <george.bateman16@gmail.com>
    Co-authored-by: scottmcm <scottmcm@users.noreply.github.com>
    3 people committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    465ffc9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b7debe3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0a82920 View commit details
    Browse the repository at this point in the history
  5. Auto merge of #116035 - lqd:mcp-510-target-specs, r=petrochenkov

    Allow target specs to use an LLD flavor, and self-contained linking components
    
    This PR allows:
    - target specs to use an LLD linker-flavor: this is needed to switch `x86_64-unknown-linux-gnu` to using LLD, and is currently not possible because the current flavor json serialization fails to roundtrip on the modern linker-flavors. This can e.g. be seen in rust-lang/rust#115622 (comment) which explains where an `Lld::Yes` is ultimately deserialized into an `Lld::No`.
    - target specs to declare self-contained linking components: this is needed to switch `x86_64-unknown-linux-gnu` to using `rust-lld`
    - adds an end-to-end test of a custom target json simulating `x86_64-unknown-linux-gnu` being switched to using `rust-lld`
    - disables codegen backends from participating because they don't support `-Zgcc-ld=lld` which is the basis of mcp510.
    
    r? `@petrochenkov:` if the approach discussed rust-lang/rust#115622 (comment) and on zulip would work for you: basically, see if we can emit only modern linker flavors in the json specs, but accept both old and new flavors while reading them, to fix the roundtrip issue.
    
    The backwards compatible `LinkSelfContainedDefault` variants are still serialized and deserialized in `crt-objects-fallback`, while the spec equivalent of e.g. `-Clink-self-contained=+linker` is serialized into a different json object (with future-proofing to incorporate `crt-objects-fallback`  in the future).
    
    ---
    
    I've been test-driving this in rust-lang/rust#113382 to test actually switching `x86_64-unknown-linux-gnu`  to `rust-lld` (and fix what needs to be fixed in CI, bootstrap, etc), and it seems to work fine.
    bors committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    31ffe48 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    beecd93 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    d5070e3 View commit details
    Browse the repository at this point in the history
  8. Handle ty::Opaque correctly

    Nadrieril committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    3fa2e71 View commit details
    Browse the repository at this point in the history
  9. Specialize ZeroSized constants

    ZeroSized constants can be represented as `mir::Const::Val` even if
    their layout is not yet known. In those cases, CrateItem::body() was
    crashing when trying to convert a `ConstValue::ZeroSized` into its
    stable counterpart `ConstantKind::Allocated`.
    
    Instead, we now map `ConstValue::ZeroSized` into a new variant:
    `ConstantKind::ZeroSized`.
    celinval committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    613e618 View commit details
    Browse the repository at this point in the history
  10. Auto merge of #117260 - okaneco:ascii_branchless, r=thomcc

    Refactor some `char`, `u8` ASCII functions to be branchless
    
    Extract conditions in singular `matches!` with or-patterns to individual `matches!` statements which enables branchless code output. The following functions were changed:
    - `is_ascii_alphanumeric`
    - `is_ascii_hexdigit`
    - `is_ascii_punctuation`
    
    Added codegen tests
    
    ---
    
    Continued from rust-lang/rust#103024.
    Based on the comment from `@scottmcm` rust-lang/rust#103024 (review).
    
    The unmodified `is_ascii_*` functions didn't seem to benefit from extracting the conditions.
    
    I've never written a codegen test before, but I tried to check that no branches were emitted.
    bors committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    707d8c3 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    b3f7f4d View commit details
    Browse the repository at this point in the history
  12. Don't provide rust-demangler to run-make tests

    The demangler was only needed by coverage tests, but those tests were migrated
    into their own custom test mode in #112300.
    
    This avoids having to build the demangler just for run-make tests. It will
    still be built as needed by run-coverage tests or for other purposes.
    Zalathar committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    be0d73a View commit details
    Browse the repository at this point in the history
  13. For run-coverage tests, build rust-demangler with the stage 0 compiler

    This avoids useless rebuilds of the demangler when modifying the compiler.
    Zalathar committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    36c3f90 View commit details
    Browse the repository at this point in the history
  14. i586_unknown_netbsd.rs: fix formatting.

    This hopefully fixes the CI run after integration of this
    target.
    he32 committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    893e726 View commit details
    Browse the repository at this point in the history
  15. Auto merge of #116205 - WaffleLapkin:stabilize_pointer_byte_offsets, …

    …r=dtolnay
    
    Stabilize `[const_]pointer_byte_offsets`
    
    Closes #96283
    Awaiting FCP completion: rust-lang/rust#96283 (comment)
    
    r? libs-api
    bors committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    54e57e6 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    72d5f4b View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    0f04e2d View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    bb45c81 View commit details
    Browse the repository at this point in the history
  19. Rollup merge of #114998 - meysam81:meysam/feat/add-cargo-pgo-to-docs,…

    … r=ehuss
    
    feat(docs): add cargo-pgo to PGO documentation 📝
    
    fixes #114995
    matthiaskrgr committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    8d67c32 View commit details
    Browse the repository at this point in the history
  20. Rollup merge of #116868 - estebank:suggestion, r=petrochenkov

    Tweak suggestion span for outer attr and point at item following invalid inner attr
    
    After:
    
    ```
    error: `unix_sigpipe` attribute cannot be used at crate level
      --> $DIR/unix_sigpipe-crate.rs:2:1
       |
    LL | #![unix_sigpipe = "inherit"]
       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    LL |
    LL | fn main() {}
       | ------------ the inner attribute doesn't annotate this function
       |
    help: perhaps you meant to use an outer attribute
       |
    LL - #![unix_sigpipe = "inherit"]
    LL + #[unix_sigpipe = "inherit"]
       |
    ```
    
    Before:
    
    ```
    error: `unix_sigpipe` attribute cannot be used at crate level
      --> $DIR/unix_sigpipe-crate.rs:2:1
       |
    LL | #![unix_sigpipe = "inherit"]
       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
    help: perhaps you meant to use an outer attribute
       |
    LL | #[unix_sigpipe = "inherit"]
       | ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ```
    
    CC #89566.
    matthiaskrgr committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    a69fb48 View commit details
    Browse the repository at this point in the history
  21. Rollup merge of #117240 - trueNAHO:docs-std-iter-Iterator-collect-int…

    …o-fix-typo, r=the8472
    
    Fix documentation typo in std::iter::Iterator::collect_into
    matthiaskrgr committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    203292e View commit details
    Browse the repository at this point in the history
  22. Rollup merge of #117241 - compiler-errors:auto-trait-leak-cycle, r=ol…

    …i-obk
    
    Stash and cancel cycle errors for auto trait leakage in opaques
    
    We don't need to emit a traditional cycle error when we have a selection error that explains what's going on but in more detail.
    
    We may want to augment this error to actually point out the cycle, now that the cycle error is not being emitted. We could do that by storing the set of opaques that was in the `CyclePlaceholder` that gets returned from `type_of_opaque`.
    
    r? `@oli-obk` cc `@estebank` #117235
    matthiaskrgr committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    5459333 View commit details
    Browse the repository at this point in the history
  23. Rollup merge of #117262 - celinval:issue-38-norm, r=oli-obk

    Create a new ConstantKind variant (ZeroSized) for StableMIR
    
    ZeroSized constants can be represented as `mir::Const::Val` even if their layout is not yet known. In those cases, CrateItem::body() was crashing when trying to convert a `ConstValue::ZeroSized` into its stable counterpart  `ConstantKind::Allocated`.
    
    Instead, we now map `ConstValue::ZeroSized` into a new variant: `ConstantKind::ZeroSized`.
    
    **Note:** I didn't add any new test here since we already have covering tests in our project repository which I manually confirmed that will fix the issue.
    matthiaskrgr committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    3374480 View commit details
    Browse the repository at this point in the history
  24. Rollup merge of #117266 - RalfJung:cast-not-transmute, r=thomcc

    replace transmute by raw pointer cast
    
    Now that rust-lang/rust#113257 is fixed we can finally do this. :)
    matthiaskrgr committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    2fdac63 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    84a1a68 View commit details
    Browse the repository at this point in the history
  26. Auto merge of #117272 - matthiaskrgr:rollup-upg122z, r=matthiaskrgr

    Rollup of 6 pull requests
    
    Successful merges:
    
     - #114998 (feat(docs): add cargo-pgo to PGO documentation 📝)
     - #116868 (Tweak suggestion span for outer attr and point at item following invalid inner attr)
     - #117240 (Fix documentation typo in std::iter::Iterator::collect_into)
     - #117241 (Stash and cancel cycle errors for auto trait leakage in opaques)
     - #117262 (Create a new ConstantKind variant (ZeroSized) for StableMIR)
     - #117266 (replace transmute by raw pointer cast)
    
    r? `@ghost`
    `@rustbot` modify labels: rollup
    bors committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    95f6a01 View commit details
    Browse the repository at this point in the history
  27. Allows #[diagnostic::on_unimplemented] attributes to have multiple

    notes
    
    This commit extends the `#[diagnostic::on_unimplemented]` (and
    `#[rustc_on_unimplemented]`) attributes to allow multiple `note`
    options. This enables emitting multiple notes for custom error messages.
    For now I've opted to not change any of the existing usages of
    `#[rustc_on_unimplemented]` and just updated the relevant compile tests.
    weiznich committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    160b179 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    a58327d View commit details
    Browse the repository at this point in the history
  29. Fix review comments

    bjorn3 committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    add9943 View commit details
    Browse the repository at this point in the history
  30. Update Cranelift to 0.101.2 and disable host-arch feature of cranelif…

    …t-codegen
    
    This ensures that cg_clif can be built for targets that aren't natively
    supported by Cranelift. It will not be possible to compile for the host
    in this case, but cross-compilation will still be possible.
    
    We won't distribute cg_clif as rustup component for any targets that
    aren't natively supported by Cranelift, but will still build it if
    codegen-backends lists "cranelift".
    bjorn3 committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    344752a View commit details
    Browse the repository at this point in the history
  31. Update Cranelift to 0.101.2 and disable host-arch feature of cranelif…

    …t-codegen
    
    This ensures that cg_clif can be built for targets that aren't natively
    supported by Cranelift. It will not be possible to compile for the host
    in this case, but cross-compilation will still be possible.
    
    We won't distribute cg_clif as rustup component for any targets that
    aren't natively supported by Cranelift, but will still build it if
    codegen-backends lists "cranelift".
    bjorn3 committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    1e39bbf View commit details
    Browse the repository at this point in the history
  32. Update target-lexicon to 0.12.12

    This adds support for loongarch and a bunch of other targets
    bjorn3 committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    d89582c View commit details
    Browse the repository at this point in the history
  33. Update target-lexicon to 0.12.12

    This adds support for loongarch and a bunch of other targets
    bjorn3 committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    1cb7bdb View commit details
    Browse the repository at this point in the history
  34. Auto merge of #116858 - estebank:issue-22488, r=petrochenkov

    Suggest assoc fn `new` when trying to build tuple struct with private fields
    
    Fix #22488.
    bors committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    6888929 View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    6214943 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    998a816 View commit details
    Browse the repository at this point in the history
  37. Basic generators work

    oli-obk committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    c892b28 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    638d2d6 View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    2e5b367 View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    cece90c View commit details
    Browse the repository at this point in the history
  41. Handle move generators

    oli-obk committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    4ac25fa View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    6223744 View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    bb90c4b View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    b8bfd08 View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    ccb36a6 View commit details
    Browse the repository at this point in the history
  46. Auto merge of #116751 - Nadrieril:lint-overlap-per-column, r=davidtwco

    Lint overlapping ranges as a separate pass
    
    This reworks the [`overlapping_range_endpoints`](https://doc.rust-lang.org/beta/nightly-rustc/rustc_lint_defs/builtin/static.OVERLAPPING_RANGE_ENDPOINTS.html) lint. My motivations are:
    
    - It was annoying to have this lint entangled with the exhaustiveness algorithm, especially wrt librarification;
    - This makes the lint behave consistently.
    
    Here's the consistency story. Take the following matches:
    ```rust
    match (0u8, true) {
        (0..=10, true) => {}
        (10..20, true) => {}
        (10..20, false) => {}
        _ => {}
    }
    match (true, 0u8) {
        (true, 0..=10) => {}
        (true, 10..20) => {}
        (false, 10..20) => {}
        _ => {}
    }
    ```
    There are two semantically consistent options: option 1 we lint all overlaps between the ranges, option 2 we only lint the overlaps that could actually occur (i.e. the ones with `true`). Option 1 is what this PR does. Option 2 is possible but would require the exhaustiveness algorithm to track more things for the sake of the lint. The status quo is that we're inconsistent between the two.
    
    Option 1 generates more false postives, but I prefer it from a maintainer's perspective. I do think the difference is minimal; cases where the difference is observable seem rare.
    
    This PR adds a separate pass, so this will have a perf impact. Let's see how bad, it looked ok locally.
    bors committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    9d6d5d4 View commit details
    Browse the repository at this point in the history
  47. fix miri target information for Test step

    Signed-off-by: onur-ozkan <work@onurozkan.dev>
    onur-ozkan committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    b915fc8 View commit details
    Browse the repository at this point in the history
  48. Fuse gen blocks

    oli-obk committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    eb66d10 View commit details
    Browse the repository at this point in the history
  49. Fix build scripts

    GuillaumeGomez committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    eb10fa3 View commit details
    Browse the repository at this point in the history
  50. Auto merge of #117166 - oli-obk:mir_const_qualif_perf, r=petrochenkov

    Only call `mir_const_qualif` if absolutely necessary
    
    Pull the perf change out of rust-lang/rust#113617
    
    This should not have any impact on behaviour (if it does, we'll see an ICE)
    bors committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    10143e7 View commit details
    Browse the repository at this point in the history
  51. Configuration menu
    Copy the full SHA
    2ef5897 View commit details
    Browse the repository at this point in the history
  52. Configuration menu
    Copy the full SHA
    7449478 View commit details
    Browse the repository at this point in the history
  53. When encountering sealed traits, point types that implement it

    ```
    error[E0277]: the trait bound `S: d::Hidden` is not satisfied
      --> $DIR/sealed-trait-local.rs:53:20
       |
    LL | impl c::Sealed for S {}
       |                    ^ the trait `d::Hidden` is not implemented for `S`
       |
    note: required by a bound in `c::Sealed`
      --> $DIR/sealed-trait-local.rs:17:23
       |
    LL |     pub trait Sealed: self::d::Hidden {
       |                       ^^^^^^^^^^^^^^^ required by this bound in `Sealed`
       = note: `Sealed` is a "sealed trait", because to implement it you also need to implement `c::d::Hidden`, which is not accessible; this is usually done to force you to use one of the provided types that already implement it
       = help: the following types implement the trait:
                - c::X
                - c::Y
    ```
    
    The last `help` is new.
    estebank committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    6dbad23 View commit details
    Browse the repository at this point in the history
  54. Rollup merge of #116834 - nnethercote:rustc_symbol_mangling, r=davidtwco

    Remove `rustc_symbol_mangling/messages.ftl`.
    
    It contains a single message that (a) doesn't contain any natural language, and (b) is only used in tests.
    
    r? `@davidtwco`
    matthiaskrgr committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    df8852a View commit details
    Browse the repository at this point in the history
  55. Rollup merge of #117212 - clubby789:fix-ternary-recover, r=compiler-e…

    …rrors
    
    Properly restore snapshot when failing to recover parsing ternary
    
    If the recovery parsed an expression, then failed to eat a `:`, it would return `false` without restoring the snapshot. Fix this by always restoring the snapshot when returning `false`.
    
    Draft for now because I'd like to try and improve this recovery further.
    
    Fixes #117208
    matthiaskrgr committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    b229537 View commit details
    Browse the repository at this point in the history
  56. Rollup merge of #117246 - estebank:issue-117209, r=petrochenkov

    Fix ICE: Restrict param constraint suggestion
    
    When encountering an associated item with a type param that could be constrained, do not look at the parent item if the type param comes from the associated item.
    
    Fix #117209, fix #89868.
    matthiaskrgr committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    a77f743 View commit details
    Browse the repository at this point in the history
  57. Rollup merge of #117247 - kjetilkjeka:nvptx_direct_passmode_exception…

    …, r=workingjubilee,RalfJung
    
    NVPTX: Allow PassMode::Direct for ptx kernels for now
    
    Upgrading the nvptx toolchain to the newest nightly makes it hit the assert that links to rust-lang/rust#115666
    
    It seems like most targets get around this by using `PassMode::Indirect`. That is impossible for the kernel as it's not a normal call, but instead the arguments are copied from CPU to GPU and the passed pointer would be invalid when it reached the GPU.
    
    I also made an experiment with `PassMode::Cast` but at least the most simple version of this broke the assembly API tests.
    
    I added  fixing the pass mode in my unofficial tracking issue list (I do not have the necessary permissions to update to official one). rust-lang/rust#38788 (comment)
    
    Since the ptx_abi is currently unstable and have been working with `PassMode::Direct` for more than a year now, the steps above is hopefully sufficient to enable it as an exception until I can prioritize to fix it. I'm currently looking at steps to enable the CI for nvptx64 again and would prefer to finish that first.
    matthiaskrgr committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    c3d56be View commit details
    Browse the repository at this point in the history
  58. Rollup merge of #117270 - jhpratt:hide-print-internals, r=ChrisDenton

    Hide internal methods from documentation
    
    The two methods here are perma-unstable and only made public for technical reasons. There is no reason to show them in documentation.
    
    `@rustbot` label +A-docs
    matthiaskrgr committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    60b071f View commit details
    Browse the repository at this point in the history
  59. Rollup merge of #117281 - RalfJung:thread-safety, r=thomcc

    std::thread : add SAFETY comment
    
    I forgot to add this in rust-lang/rust#117266.
    matthiaskrgr committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    f9d62a8 View commit details
    Browse the repository at this point in the history
  60. Rollup merge of #117287 - onur-ozkan:fix-miri-target-info, r=RalfJung

    fix miri target information for Test step
    
    self-explanatory
    
    r? RalfJung
    matthiaskrgr committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    b9015da View commit details
    Browse the repository at this point in the history
  61. Apply suggestions from code review

    Co-authored-by: Ralf Jung <post@ralfj.de>
    cjgillot and RalfJung committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    24be433 View commit details
    Browse the repository at this point in the history
  62. Auto merge of #103208 - cjgillot:match-fake-read, r=oli-obk,RalfJung

    Allow partially moved values in match
    
    This PR attempts to unify the behaviour between `let _ = PLACE`, `let _: TY = PLACE;` and `match PLACE { _ => {} }`.
    The logical conclusion is that the `match` version should not check for uninitialised places nor check that borrows are still live.
    
    The `match PLACE {}` case is handled by keeping a `FakeRead` in the unreachable fallback case to verify that `PLACE` has a legal value.
    
    Schematically, `match PLACE { arms }` in surface rust becomes in MIR:
    ```rust
    PlaceMention(PLACE)
    match PLACE {
      // Decision tree for the explicit arms
      arms,
      // An extra fallback arm
      _ => {
        FakeRead(ForMatchedPlace, PLACE);
        unreachable
      }
    }
    ```
    
    `match *borrow { _ => {} }` continues to check that `*borrow` is live, but does not read the value.
    `match *borrow {}` both checks that `*borrow` is live, and fake-reads the value.
    
    Continuation of ~rust-lang/rust#102256 ~rust-lang/rust#104844
    
    Fixes rust-lang/rust#99180 rust-lang/rust#53114
    bors committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    59bb950 View commit details
    Browse the repository at this point in the history
  63. Explicitly mark which targets to distribute cg_clif for in CI

    This avoids needlessly building cg_clif for other targets and makes it
    easier for the dist code to determine if it should distribute cg_clif as
    component.
    bjorn3 committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    aaa4e54 View commit details
    Browse the repository at this point in the history
  64. Update type_err_ctxt_ext.rs

    Co-authored-by: Esteban Kuber <estebank@users.noreply.github.com>
    Milo123459 and estebank committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    a65d99d View commit details
    Browse the repository at this point in the history
  65. Merge pull request #375 from GuillaumeGomez/fix-build-scripts

    Make build scripts work with rust bootstrap
    antoyo committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    09ce29d View commit details
    Browse the repository at this point in the history
  66. Merge commit '09ce29d0591a21e1abae22eac4d41ffd32993af8' into subtree-…

    …update_cg_gcc_2023-10-25
    antoyo committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    f0aaf2f View commit details
    Browse the repository at this point in the history
  67. Auto merge of #117294 - matthiaskrgr:rollup-xylsec7, r=matthiaskrgr

    Rollup of 7 pull requests
    
    Successful merges:
    
     - #116834 (Remove `rustc_symbol_mangling/messages.ftl`.)
     - #117212 (Properly restore snapshot when failing to recover parsing ternary)
     - #117246 (Fix ICE: Restrict param constraint suggestion)
     - #117247 (NVPTX: Allow PassMode::Direct for ptx kernels for now)
     - #117270 (Hide internal methods from documentation)
     - #117281 (std::thread : add SAFETY comment)
     - #117287 (fix miri target information for Test step)
    
    r? `@ghost`
    `@rustbot` modify labels: rollup
    bors committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    2f1bd07 View commit details
    Browse the repository at this point in the history
  68. Configuration menu
    Copy the full SHA
    98c469c View commit details
    Browse the repository at this point in the history
  69. Fix a comment.

    nnethercote committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    3feec48 View commit details
    Browse the repository at this point in the history
  70. Streamline rustc_interface tests.

    In `test_edition_parsing`, change the
    `build_session_options_and_crate_config` call to
    `build_session_options`, because the config isn't used.
    
    That leaves a single call site for
    `build_session_options_and_crate_config`, so just inline and remove it.
    nnethercote committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    2142d01 View commit details
    Browse the repository at this point in the history
  71. Change CrateConfig from FxIndexSet to FxHashSet.

    Because its order doesn't matter. This is well demonstrated by
    `to_crate_config`, which creates a `CrateConfig` from an `FxHashSet`.
    nnethercote committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    32986d8 View commit details
    Browse the repository at this point in the history
  72. Optimize parse_cfgspecs.

    In `parse_cfg`, we now construct a `FxHashSet<String>` directly instead of
    constructing a `FxHashSet<Symbol>` and then immediately converting it to a
    `FxHashSet<String>`(!)
    
    (The type names made this behaviour non-obvious. The next commit will
    make the type names clearer.)
    nnethercote committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    75e415b View commit details
    Browse the repository at this point in the history
  73. Clean up config mess.

    `parse_cfgspecs` and `parse_check_cfg` run very early, before the main
    interner is running. They each use a short-lived interner and convert
    all interned symbols to strings in their output data structures. Once
    the main interner starts up, these data structures get converted into
    new data structures that are identical except with the strings converted
    to symbols.
    
    All is not obvious from the current code, which is a mess, particularly
    with inconsistent naming that obscures the parallel string/symbol data
    structures. This commit clean things up a lot.
    
    - The existing `CheckCfg` type is generic, allowing both
      `CheckCfg<String>` and `CheckCfg<Symbol>` forms. This is really
      useful, but it defaults to `String`. The commit removes the default so
      we have to use `CheckCfg<String>` and `CheckCfg<Symbol>` explicitly,
      which makes things clearer.
    
    - Introduces `Cfg`, which is generic over `String` and `Symbol`, similar
      to `CheckCfg`.
    
    - Renames some things.
      - `parse_cfgspecs` -> `parse_cfg`
      - `CfgSpecs` -> `Cfg<String>`, plus it's used in more places, rather
        than the underlying `FxHashSet` type.
      - `CrateConfig` -> `Cfg<Symbol>`.
      - `CrateCheckConfig` -> `CheckCfg<Symbol>`
    
    - Adds some comments explaining the string-to-symbol conversions.
    
    - `to_crate_check_config`, which converts `CheckCfg<String>` to
      `CheckCfg<Symbol>`, is inlined and removed and combined with the
      overly-general `CheckCfg::map_data` to produce
      `CheckCfg::<String>::intern`.
    
    - `build_configuration` now does the `Cfg<String>`-to-`Cfg<Symbol>`
      conversion, so callers don't need to, which removes the need for
      `to_crate_config`.
    
    The diff for two of the fields in `Config` is a good example of the
    improved clarity:
    ```
    -    pub crate_cfg: FxHashSet<(String, Option<String>)>,
    -    pub crate_check_cfg: CheckCfg,
    +    pub crate_cfg: Cfg<String>,
    +    pub crate_check_cfg: CheckCfg<String>,
    ```
    Compare that with the diff for the corresponding fields in `ParseSess`,
    and the relationship to `Config` is much clearer than before:
    ```
    -    pub config: CrateConfig,
    -    pub check_config: CrateCheckConfig,
    +    pub config: Cfg<Symbol>,
    +    pub check_config: CheckCfg<Symbol>,
    ```
    nnethercote committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    5e54997 View commit details
    Browse the repository at this point in the history
  74. Change Cfg<T> to an FxIndexSet.

    Despite what I claimed in an earlier commit, the ordering does matter to
    some degree. Using `FxIndexSet` prevents changes to the error message
    order in `tests/ui/check-cfg/mix.rs`.
    nnethercote committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    5438004 View commit details
    Browse the repository at this point in the history
  75. Configuration menu
    Copy the full SHA
    975b98b View commit details
    Browse the repository at this point in the history
  76. Configuration menu
    Copy the full SHA
    230dd5b View commit details
    Browse the repository at this point in the history
  77. Auto merge of #116471 - notriddle:notriddle/js-trait-alias, r=Guillau…

    …meGomez
    
    rustdoc: use JS to inline target type impl docs into alias
    
    Preview docs:
    
    - https://notriddle.com/rustdoc-html-demo-5/js-trait-alias/std/io/type.Result.html
    
    - https://notriddle.com/rustdoc-html-demo-5/js-trait-alias-compiler/rustc_middle/ty/type.PolyTraitRef.html
    
    This pull request also includes a bug fix for trait alias inlining across crates. This means more documentation is generated, and is why ripgrep runs slower (it's a thin wrapper on top of the `grep` crate, so 5% of its docs are now the Result type).
    
    - Before, built with rustdoc 1.75.0-nightly (aa1a71e 2023-10-26), Result type alias method docs are missing: http://notriddle.com/rustdoc-html-demo-5/ripgrep-js-nightly/rg/type.Result.html
    - After, built with this branch, all the methods on Result are shown: http://notriddle.com/rustdoc-html-demo-5/ripgrep-js-trait-alias/rg/type.Result.html
    
    *Review note: This is mostly just reverting rust-lang/rust#115201. The last commit has the new work in it.*
    
    Fixes #115718
    
    This is an attempt to balance three problems, each of which would
    be violated by a simpler implementation:
    
    - A type alias should show all the `impl` blocks for the target
      type, and vice versa, if they're applicable. If nothing was
      done, and rustdoc continues to match them up in HIR, this
      would not work.
    
    - Copying the target type's docs into its aliases' HTML pages
      directly causes far too much redundant HTML text to be generated
      when a crate has large numbers of methods and large numbers
      of type aliases.
    
    - Using JavaScript exclusively for type alias impl docs would
      be a functional regression, and could make some docs very hard
      to find for non-JS readers.
    
    - Making sure that only applicable docs are show in the
      resulting page requires a type checkers. Do not reimplement
      the type checker in JavaScript.
    
    So, to make it work, rustdoc stashes these type-alias-inlined docs
    in a JSONP "database-lite". The file is generated in `write_shared.rs`,
    included in a `<script>` tag added in `print_item.rs`, and `main.js`
    takes care of patching the additional docs into the DOM.
    
    The format of `trait.impl` and `type.impl` JS files are superficially
    similar. Each line, except the JSONP wrapper itself, belongs to a crate,
    and they are otherwise separate (rustdoc should be idempotent). The
    "meat" of the file is HTML strings, so the frontend code is very simple.
    Links are relative to the doc root, though, so the frontend needs to fix
    that up, and inlined docs can reuse these files.
    
    However, there are a few differences, caused by the sophisticated
    features that type aliases have. Consider this crate graph:
    
    ```text
     ---------------------------------
     | crate A: struct Foo<T>        |
     |          type Bar = Foo<i32>  |
     |          impl X for Foo<i8>   |
     |          impl Y for Foo<i32>  |
     ---------------------------------
         |
     ----------------------------------
     | crate B: type Baz = A::Foo<i8> |
     |          type Xyy = A::Foo<i8> |
     |          impl Z for Xyy        |
     ----------------------------------
    ```
    
    The type.impl/A/struct.Foo.js JS file has a structure kinda like this:
    
    ```js
    JSONP({
    "A": [["impl Y for Foo<i32>", "Y", "A::Bar"]],
    "B": [["impl X for Foo<i8>", "X", "B::Baz", "B::Xyy"], ["impl Z for Xyy", "Z", "B::Baz"]],
    });
    ```
    
    When the type.impl file is loaded, only the current crate's docs are
    actually used. The main reason to bundle them together is that there's
    enough duplication in them for DEFLATE to remove the redundancy.
    
    The contents of a crate are a list of impl blocks, themselves
    represented as lists. The first item in the sublist is the HTML block,
    the second item is the name of the trait (which goes in the sidebar),
    and all others are the names of type aliases that successfully match.
    
    This way:
    
    - There's no need to generate these files for types that have no aliases
      in the current crate. If a dependent crate makes a type alias, it'll
      take care of generating its own docs.
    - There's no need to reimplement parts of the type checker in
      JavaScript. The Rust backend does the checking, and includes its
      results in the file.
    - Docs defined directly on the type alias are dropped directly in the
      HTML by `render_assoc_items`, and are accessible without JavaScript.
      The JSONP file will not list impl items that are known to be part
      of the main HTML file already.
    
    [JSONP]: https://en.wikipedia.org/wiki/JSONP
    bors committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    6f349cd View commit details
    Browse the repository at this point in the history

Commits on Oct 28, 2023

  1. Configuration menu
    Copy the full SHA
    fe00cfe View commit details
    Browse the repository at this point in the history
  2. Auto merge of #117197 - Zalathar:demangler, r=onur-ozkan

    Avoid unnecessary builds/rebuilds of `rust-demangler`
    
    This is a combination of two loosely-related changes:
    
    - Don't build `rust-demangler` as a dependency of `tests/run-make`, because after #112300 none of the remaining run-make tests actually use it. (If future run-make tests ever do need the demangler, it'll be easy to add it back.)
    - For `tests/run-coverage`, build the demangler with the stage 0 compiler instead of the current-stage compiler. This avoids having to uselessly rebuild the demangler after modifying and rebuilding the compiler itself.
    bors committed Oct 28, 2023
    Configuration menu
    Copy the full SHA
    c6eb61a View commit details
    Browse the repository at this point in the history
  3. Update cargo

    weihanglo committed Oct 28, 2023
    Configuration menu
    Copy the full SHA
    167c0c1 View commit details
    Browse the repository at this point in the history
  4. Auto merge of #117302 - weihanglo:update-cargo, r=weihanglo

    Update cargo
    
    8 commits in df3509237935f9418351b77803df7bc05c009b3d..708383d620e183a9ece69b8fe930c411d83dee27
    2023-10-24 23:09:01 +0000 to 2023-10-27 21:09:26 +0000
    - feat(doc): Print the generated docs links (rust-lang/cargo#12859)
    - feat(toml): Allow version-less manifests (rust-lang/cargo#12786)
    - Remove outdated option to `-Zcheck-cfg` warnings (rust-lang/cargo#12884)
    - Remove duplicate binaries during install (rust-lang/cargo#12868)
    - refactor(shell): Write at once rather than in fragments (rust-lang/cargo#12880)
    - docs(ref): Link to docs.rs metadata table (rust-lang/cargo#12879)
    - docs(contrib): Describe how to add a new package (rust-lang/cargo#12878)
    - move up looking at index summary enum (rust-lang/cargo#12749)
    
    r? ghost
    bors committed Oct 28, 2023
    Configuration menu
    Copy the full SHA
    20952db View commit details
    Browse the repository at this point in the history
  5. Auto merge of #117253 - antoyo:subtree-update_cg_gcc_2023-10-25, r=bj…

    …orn3,GuillaumeGomez
    
    subtree update cg_gcc 2023/10/25
    bors committed Oct 28, 2023
    Configuration menu
    Copy the full SHA
    17659c7 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of #116534 - cjgillot:no-dep-tasks, r=davidtwco

    Remove -Zdep-tasks.
    
    This option is not useful any more, we can use `tracing` and `RUSTC_LOG` to debug the dep-graph.
    workingjubilee committed Oct 28, 2023
    Configuration menu
    Copy the full SHA
    975d042 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of #116739 - Milo123459:milo/short-paths, r=estebank

    Make `E0277` use short paths
    
    Fixes #116616
    workingjubilee committed Oct 28, 2023
    Configuration menu
    Copy the full SHA
    471e33f View commit details
    Browse the repository at this point in the history
  8. Rollup merge of #116816 - ChrisDenton:api.rs, r=workingjubilee

    Create `windows/api.rs` for safer FFI
    
    FFI is inherently unsafe. For memory safety we need to assert that some contract is being upheld on both sides of the FFI, though of course we can only ever check our side. In Rust, `unsafe` blocks are used to assert safety and `// SAFETY` comments describing why it is safe. Currently in sys/windows we have a lot of this unsafety spread all over the place, with variations on the same unsafe patterns repeated. And because of the repitition and frequency, we're a bit lax with the safety comments.
    
    This PR aims to fix this and to make FFI safety more auditable by creating an `api` module with the goal of centralising and consolidating this unsafety. It contains thin wrappers around the Windows API that make most functions safe to call or, if that's not possible, then at least safer. Note that its goal is *only* to address safety. It does not stray far from the Windows API and intentionally does not attempt to make higher lever wrappers around, for example, file handles. This is better left to the existing modules. The windows/api.rs file has a top level comment to help future contributors understand the intent of the module and the design decisions made.
    
    I chose two functions as a first tentative step towards the above goal:
    
    - [`GetLastError`](https://learn.microsoft.com/en-us/windows/win32/api/errhandlingapi/nf-errhandlingapi-getlasterror) is trivially safe. There's no reason to wrap it in an `unsafe` block every time. So I simply created a safe `get_last_error` wrapper.
    - [`SetFileInformationByHandle`](https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-setfileinformationbyhandle) is more complex. It essentially takes a generic type but over a C API which necessitates some amount of ceremony. Rather than implementing similar unsafe patterns in multiple places, I provide a safe `set_file_information_by_handle` that takes a Rusty generic type and handles converting that to the form required by the C FFI.
    
    r? libs
    workingjubilee committed Oct 28, 2023
    Configuration menu
    Copy the full SHA
    d87b5e4 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of #116945 - estebank:sealed-trait-impls, r=petrochenkov

    When encountering sealed traits, point types that implement it
    
    ```
    error[E0277]: the trait bound `S: d::Hidden` is not satisfied
      --> $DIR/sealed-trait-local.rs:53:20
       |
    LL | impl c::Sealed for S {}
       |                    ^ the trait `d::Hidden` is not implemented for `S`
       |
    note: required by a bound in `c::Sealed`
      --> $DIR/sealed-trait-local.rs:17:23
       |
    LL |     pub trait Sealed: self::d::Hidden {
       |                       ^^^^^^^^^^^^^^^ required by this bound in `Sealed`
       = note: `Sealed` is a "sealed trait", because to implement it you also need to implement `c::d::Hidden`, which is not accessible; this is usually done to force you to use one of the provided types that already implement it
       = help: the following types implement the trait:
                - c::X
                - c::Y
    ```
    
    The last `help` is new.
    workingjubilee committed Oct 28, 2023
    Configuration menu
    Copy the full SHA
    9f631d0 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of #117025 - Urgau:cleanup-improve-check-cfg-impl, r=pet…

    …rochenkov
    
    Cleanup and improve `--check-cfg` implementation
    
    This PR removes some indentation in the code, as well as preventing some bugs/misusages and fix a nit in the doc.
    
    r? ```@petrochenkov``` (maybe)
    workingjubilee committed Oct 28, 2023
    Configuration menu
    Copy the full SHA
    87a564d View commit details
    Browse the repository at this point in the history
  11. Rollup merge of #117256 - dtolnay:currentversion, r=compiler-errors

    Parse rustc version at compile time
    
    This PR eliminates a couple awkward codepaths where it was not clear how the compiler should proceed if its own version number is incomprehensible.
    
    https://github.com/rust-lang/rust/blob/dab715641e96a61a534587fda9de1128b75b34dc/src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs#L385
    
    https://github.com/rust-lang/rust/blob/dab715641e96a61a534587fda9de1128b75b34dc/compiler/rustc_attr/src/builtin.rs#L630
    
    We can guarantee that every compiled rustc comes with a working version number, so the ICE codepaths above shouldn't need to be written.
    workingjubilee committed Oct 28, 2023
    Configuration menu
    Copy the full SHA
    1db8c9d View commit details
    Browse the repository at this point in the history
  12. Rollup merge of #117268 - nnethercote:rustc_interface, r=oli-obk

    `rustc_interface` cleanups
    
    Particularly in and around `--cfg` and `--check-cfg` handling.
    
    r? `@oli-obk`
    workingjubilee committed Oct 28, 2023
    Configuration menu
    Copy the full SHA
    48a3865 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of #117277 - RalfJung:too-big-with-padding, r=oli-obk

    fix failure to detect a too-big-type after adding padding
    
    Fixes rust-lang/rust#117265
    workingjubilee committed Oct 28, 2023
    Configuration menu
    Copy the full SHA
    09fd68d View commit details
    Browse the repository at this point in the history
  14. Auto merge of #117309 - workingjubilee:rollup-zqb1dun, r=workingjubilee

    Rollup of 8 pull requests
    
    Successful merges:
    
     - #116534 (Remove -Zdep-tasks.)
     - #116739 (Make `E0277` use short paths)
     - #116816 (Create `windows/api.rs` for safer FFI)
     - #116945 (When encountering sealed traits, point types that implement it)
     - #117025 (Cleanup and improve `--check-cfg` implementation)
     - #117256 (Parse rustc version at compile time)
     - #117268 (`rustc_interface` cleanups)
     - #117277 (fix failure to detect a too-big-type after adding padding)
    
    r? `@ghost`
    `@rustbot` modify labels: rollup
    bors committed Oct 28, 2023
    Configuration menu
    Copy the full SHA
    615d0f2 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    64678d4 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    b329c69 View commit details
    Browse the repository at this point in the history
  17. Auto merge of #116609 - eduardosm:bump-stdarch, r=workingjubilee

    Bump stdarch submodule and remove special handling for LLVM intrinsics that are no longer needed
    
    Bumps stdarch to pull rust-lang/stdarch#1477, which reimplemented some functions with portable SIMD intrinsics instead of arch specific LLVM intrinsics.
    
    Handling of those LLVM intrinsics is removed from cranelift codegen and miri.
    
    cc `@RalfJung` `@bjorn3`
    bors committed Oct 28, 2023
    Configuration menu
    Copy the full SHA
    3089c31 View commit details
    Browse the repository at this point in the history
  18. Auto merge of #116609 - eduardosm:bump-stdarch, r=workingjubilee

    Bump stdarch submodule and remove special handling for LLVM intrinsics that are no longer needed
    
    Bumps stdarch to pull rust-lang/stdarch#1477, which reimplemented some functions with portable SIMD intrinsics instead of arch specific LLVM intrinsics.
    
    Handling of those LLVM intrinsics is removed from cranelift codegen and miri.
    
    cc `@RalfJung` `@bjorn3`
    bors committed Oct 28, 2023
    Configuration menu
    Copy the full SHA
    9e20870 View commit details
    Browse the repository at this point in the history
  19. i586_unknown_netbsd.rs: drop "-m32" flag insertion to gcc.

    This triggers a consistency check in rust (that all linker flavours
    must have identical arguments), and on NetBSD/i386, the 32-bitness
    is implicitly chosen through the chosen toolchain, and appears to
    not be required.  So drop it, and also drop the imports of the
    now-no-longer-used identifiers.
    he32 committed Oct 28, 2023
    Configuration menu
    Copy the full SHA
    a510288 View commit details
    Browse the repository at this point in the history
  20. Auto merge of #117038 - saethlin:inline-range-methods, r=workingjubilee

    Add #[inline] to some recalcitrant ops::range methods
    
    Fixes rust-lang/rust#116861
    bors committed Oct 28, 2023
    Configuration menu
    Copy the full SHA
    7314873 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    d9ddad3 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    4dd7568 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    351d532 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    04fa124 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    f7985af View commit details
    Browse the repository at this point in the history
  26. Auto merge of #81746 - bjorn3:cg_clif_rustup_component, r=Mark-Simula…

    …crum
    
    Distribute cg_clif as rustup component on the nightly channel
    
    This makes it possible to use cg_clif using:
    
    ```bash
    $ rustup component add rustc-codegen-cranelift-preview --toolchain nightly
    $ RUSTFLAGS="-Zcodegen-backend=cranelift" cargo +nightly build
    ```
    
    cc rust-lang/compiler-team#405.
    r? `@Mark-Simulacrum`
    bors committed Oct 28, 2023
    Configuration menu
    Copy the full SHA
    6a66ca2 View commit details
    Browse the repository at this point in the history
  27. Auto merge of #81746 - bjorn3:cg_clif_rustup_component, r=Mark-Simula…

    …crum
    
    Distribute cg_clif as rustup component on the nightly channel
    
    This makes it possible to use cg_clif using:
    
    ```bash
    $ rustup component add rustc-codegen-cranelift-preview --toolchain nightly
    $ RUSTFLAGS="-Zcodegen-backend=cranelift" cargo +nightly build
    ```
    
    cc rust-lang/compiler-team#405.
    r? `@Mark-Simulacrum`
    bors committed Oct 28, 2023
    Configuration menu
    Copy the full SHA
    da1ed4d View commit details
    Browse the repository at this point in the history
  28. change default output mode of BootstrapCommand

    Signed-off-by: onur-ozkan <work@onurozkan.dev>
    onur-ozkan committed Oct 28, 2023
    Configuration menu
    Copy the full SHA
    3bb0c94 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    f5fa36f View commit details
    Browse the repository at this point in the history
  30. set BootstrapCommand output mode for submodules

    Signed-off-by: onur-ozkan <work@onurozkan.dev>
    onur-ozkan committed Oct 28, 2023
    Configuration menu
    Copy the full SHA
    236f6ba View commit details
    Browse the repository at this point in the history
  31. Auto merge of #117123 - Zalathar:bad-counter-ids, r=petrochenkov

    coverage: Consistently remove unused counter IDs from expressions/mappings
    
    If some coverage counters were removed by MIR optimizations, we need to take care not to refer to those counter IDs in coverage mappings, and instead replace them with a constant zero value. If we don't, `llvm-cov` might see a too-large counter ID and silently discard the entire function from its coverage reports.
    
    Fixes #117012.
    bors committed Oct 28, 2023
    Configuration menu
    Copy the full SHA
    6b78377 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    56643ec View commit details
    Browse the repository at this point in the history
  33. Move macros to usage

    Nilstrieb committed Oct 28, 2023
    Configuration menu
    Copy the full SHA
    4dada60 View commit details
    Browse the repository at this point in the history
  34. Remove needless allows

    Nilstrieb committed Oct 28, 2023
    Configuration menu
    Copy the full SHA
    4e2bbfe View commit details
    Browse the repository at this point in the history
  35. pass CODEGEN_BACKENDS to docker

    lqd committed Oct 28, 2023
    Configuration menu
    Copy the full SHA
    794bf8a View commit details
    Browse the repository at this point in the history
  36. Ensure the rustc-codegen-cranelift-preview component is never empty

    Either generate it with the actual codegen backend dylib or omit it
    entirely when the cranelift backend is disabled for this build.
    bjorn3 committed Oct 28, 2023
    Configuration menu
    Copy the full SHA
    aefd7ac View commit details
    Browse the repository at this point in the history
  37. Auto merge of #116240 - dtolnay:constdiscriminant, r=thomcc

    Const stabilize mem::discriminant
    
    Tracking issue: #69821.
    
    This PR is a rebase of rust-lang/rust#103893 to resolve conflicts in library/core/src/lib.rs (against #102470 and #110393).
    bors committed Oct 28, 2023
    Configuration menu
    Copy the full SHA
    7cc36de View commit details
    Browse the repository at this point in the history
  38. Auto merge of #117149 - nnethercote:tidy-alphabetical-unit-tests, r=N…

    …ilstrieb
    
    tidy: add unit tests for alphabetical checks
    
    I discovered there aren't any tests while working on #117068.
    
    r? `@Nilstrieb`
    bors committed Oct 28, 2023
    Configuration menu
    Copy the full SHA
    e5cfc55 View commit details
    Browse the repository at this point in the history

Commits on Oct 29, 2023

  1. Configuration menu
    Copy the full SHA
    552abdc View commit details
    Browse the repository at this point in the history
  2. Auto merge of #116447 - oli-obk:gen_fn, r=compiler-errors

    Implement `gen` blocks in the 2024 edition
    
    Coroutines tracking issue rust-lang/rust#43122
    `gen` block tracking issue rust-lang/rust#117078
    
    This PR implements `gen` blocks that implement `Iterator`. Most of the logic with `async` blocks is shared, and thus I renamed various types that were referring to `async` specifically.
    
    An example usage of `gen` blocks is
    
    ```rust
    fn foo() -> impl Iterator<Item = i32> {
        gen {
            yield 42;
            for i in 5..18 {
                if i.is_even() { continue }
                yield i * 2;
            }
        }
    }
    ```
    
    The limitations (to be resolved) of the implementation are listed in the tracking issue
    bors committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    2cad938 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of #115773 - simlay:arch64-apple-tvos-sim-for-rustc, r=t…

    …homcc
    
    tvOS simulator support on Apple Silicon for rustc
    
    Closes or is a subtask of #115692.
    
    # Tier 3 Target Policy
    
    At this tier, the Rust project provides no official support for a target, so we place minimal requirements on the introduction of targets.
    
    > * A tier 3 target must have a designated developer or developers (the "target maintainers") on record to be CCed when issues arise regarding the target. (The mechanism to track and CC such developers may evolve over time.)
    
    See [`src/doc/rustc/src/platform-support/apple-tvos.md`](https://github.com/rust-lang/rust/blob/4ab4d48ee59968d8d519ccda5e12c9d200cc092f/src/doc/rustc/src/platform-support/apple-tvos.md)
    
    > * Targets must use naming consistent with any existing targets; for instance, a target for the same CPU or OS as an existing Rust target should use the same name for that CPU or OS. Targets should normally use the same names and naming conventions as used elsewhere in the broader ecosystem beyond Rust (such as in other toolchains), unless they have a very good reason to diverge. Changing the name of a target can be highly disruptive, especially once the target reaches a higher tier, so getting the name right is important even for a tier 3 target.
    >     * Target names should not introduce undue confusion or ambiguity unless absolutely necessary to maintain ecosystem compatibility. For example, if the name of the target makes people extremely likely to form incorrect beliefs about what it targets, the name should be changed or augmented to disambiguate it.
    >     * If possible, use only letters, numbers, dashes and underscores for the name. Periods (.) are known to cause issues in Cargo.
    
    This naming scheme matches `$ARCH-$VENDOR-$OS-$ABI` (I think `sim` is the ABI here) which is matches the iOS apple silicon simulator (`aarch64-apple-ios-sim`). [There is some discussion about renaming some apple simulator targets](rust-lang/rust#115692 (comment)) to match the `-sim` suffix but that is outside the scope of this PR.
    
    > * Tier 3 targets may have unusual requirements to build or use, but must not create legal issues or impose onerous legal terms for the Rust project or for Rust developers or users.
    >
    >    * The target must not introduce license incompatibilities.
    >    * Anything added to the Rust repository must be under the standard Rust license (MIT OR Apache-2.0).
    >    * The target must not cause the Rust tools or libraries built for any other host (even when supporting cross-compilation to the target) to depend on any new dependency less permissive than the Rust licensing policy. This applies whether the dependency is a Rust crate that would require adding new license exceptions (as specified by the tidy tool in the rust-lang/rust repository), or whether the dependency is a native library or binary. In other words, the introduction of the target must not cause a user installing or running a version of Rust or the Rust tools to be subject to any new license requirements.
    >    * Compiling, linking, and emitting functional binaries, libraries, or other code for the target (whether hosted on the target itself or cross-compiling from another target) must not depend on proprietary (non-FOSS) libraries. Host tools built for the target itself may depend on the ordinary runtime libraries supplied by the platform and commonly used by other applications built for the target, but those libraries must not be required for code generation for the target; cross-compilation to the target must not require such libraries at all. For instance, rustc built for the target may depend on a common proprietary C runtime library or console output library, but must not depend on a proprietary code generation library or code optimization library. Rust's license permits such combinations, but the Rust project has no interest in maintaining such combinations within the scope of Rust itself, even at tier 3.
    >    * "onerous" here is an intentionally subjective term. At a minimum, "onerous" legal/licensing terms include but are not limited to: non-disclosure requirements, non-compete requirements, contributor license agreements (CLAs) or equivalent, "non-commercial"/"research-only"/etc terms, requirements conditional on the employer or employment of any particular Rust developers, revocable terms, any requirements that create liability for the Rust project or its developers or users, or any requirements that adversely affect the livelihood or prospects of the Rust project or its developers or users.
    
    This contribution is fully available under the standard Rust license with no additional legal restrictions whatsoever. This PR does not introduce any new dependency less permissive than the Rust license policy.
    
    The new targets do not depend on proprietary libraries.
    
    > * Tier 3 targets should attempt to implement as much of the standard libraries as possible and appropriate (core for most targets, alloc for targets that can support dynamic memory allocation, std for targets with an operating system or equivalent layer of system-provided functionality), but may leave some code unimplemented (either unavailable or stubbed out as appropriate), whether because the target makes it impossible to implement or challenging to implement. The authors of pull requests are not obligated to avoid calling any portions of the standard library on the basis of a tier 3 target not implementing those portions.
    
    This new target implements as much of the standard library as the other tvOS targets do.
    
    > * The target must provide documentation for the Rust community explaining how to build for the target, using cross-compilation if possible. If the target supports running binaries, or running tests (even if they do not pass), the documentation must explain how to run such binaries or tests for the target, using emulation if possible or dedicated hardware if necessary.
    
    I have added the target to the other tvOS targets in [`src/doc/rustc/src/platform-support/apple-tvos.md`](https://github.com/rust-lang/rust/blob/4ab4d48ee59968d8d519ccda5e12c9d200cc092f/src/doc/rustc/src/platform-support/apple-tvos.md)
    
    > * Neither this policy nor any decisions made regarding targets shall create any binding agreement or estoppel by any party. If any member of an approving Rust team serves as one of the maintainers of a target, or has any legal or employment requirement (explicit or implicit) that might affect their decisions regarding a target, they must recuse themselves from any approval decisions regarding the target's tier status, though they may otherwise participate in discussions.
    >    * This requirement does not prevent part or all of this policy from being cited in an explicit contract or work agreement (e.g. to implement or maintain support for a target). This requirement exists to ensure that a developer or team responsible for reviewing and approving a target does not face any legal threats or obligations that would prevent them from freely exercising their judgment in such approval, even if such judgment involves subjective matters or goes beyond the letter of these requirements.
    > * Tier 3 targets must not impose burden on the authors of pull requests, or other developers in the community, to maintain the target. In particular, do not post comments (automated or manual) on a PR that derail or suggest a block on the PR based on a tier 3 target. Do not send automated messages or notifications (via any medium, including via ``@)`` to a PR author or others involved with a PR regarding a tier 3 target, unless they have opted into such messages.
    >    * Backlinks such as those generated by the issue/PR tracker when linking to an issue or PR are not considered a violation of this policy, within reason. However, such messages (even on a separate repository) must not generate notifications to anyone involved with a PR who has not requested such notifications.
    > * Patches adding or updating tier 3 targets must not break any existing tier 2 or tier 1 target, and must not knowingly break another tier 3 target without approval of either the compiler team or the maintainers of the other tier 3 target.
    >    * In particular, this may come up when working on closely related targets, such as variations of the same architecture with different features. Avoid introducing unconditional uses of features that another variation of the target may not have; use conditional compilation or runtime detection, as appropriate, to let each target run code supported by that target.
    
    I acknowledge these requirements and intend to ensure that they are met.
    
    This target does not touch any existing tier 2 or tier 1 targets and should not break any other targets.
    workingjubilee committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    09c56f8 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of #117162 - c410-f3r:try, r=workingjubilee

    Remove `cfg_match` from the prelude
    
    Fixes #117057
    
    cc #115585
    workingjubilee committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    61cd3d0 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of #117311 - RalfJung:unpretty-thir-help, r=petrochenkov

    -Zunpretty help: add missing possible values
    
    `-Zunpretty` accepts "thir-tree" and "thir-flat", but that was not shown in `-Zhelp`.
    workingjubilee committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    10c9c7c View commit details
    Browse the repository at this point in the history
  6. Rollup merge of #117316 - Coekjan:const-binary-heap-constructor, r=dt…

    …olnay
    
    Mark constructor of `BinaryHeap` as const fn
    
    #112353
    workingjubilee committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    2dd37d4 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of #117319 - RalfJung:target-feature-inline-comment, r=t…

    …miasko
    
    explain why we don't inline when target features differ
    
    Follow-up to rust-lang/rust#117141
    
    r? ``@tmiasko``
    workingjubilee committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    f907d0e View commit details
    Browse the repository at this point in the history
  8. Rollup merge of #117170 - he32:netbsd-i586, r=bjorn3

    Add support for i586-unknown-netbsd as target.
    
    This restricts instructions to those offered by Pentium, to support e.g. AMD Geode.
    
    There is already an entry for this target in the NetBSD platform support page at
    
      src/doc/rustc/src/platform-support/netbsd.md
    
    ...so this should forestall its removal.
    
    Additional fixes are needed for some vendored modules, this is the changes in the rust compiler core itself.
    workingjubilee committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    78b04b5 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of #117259 - dtolnay:macho, r=Nilstrieb

    Declare rustc_target's dependency on object/macho
    
    Without this, `cargo check` fails in crates that depend on rustc_target.
    
    <details>
    <summary>`cargo check` diagnostics</summary>
    
    ```console
        Checking rustc_target v0.0.0
    error[E0433]: failed to resolve: could not find `macho` in `object`
       --> compiler/rustc_target/src/spec/apple_base.rs:176:17
        |
    176 |         object::macho::PLATFORM_MACOS => Some((13, 1)),
        |                 ^^^^^ could not find `macho` in `object`
    
    error[E0433]: failed to resolve: could not find `macho` in `object`
       --> compiler/rustc_target/src/spec/apple_base.rs:177:17
        |
    177 |         object::macho::PLATFORM_IOS
        |                 ^^^^^ could not find `macho` in `object`
    
    error[E0433]: failed to resolve: could not find `macho` in `object`
       --> compiler/rustc_target/src/spec/apple_base.rs:178:19
        |
    178 |         | object::macho::PLATFORM_IOSSIMULATOR
        |                   ^^^^^ could not find `macho` in `object`
    
    error[E0433]: failed to resolve: could not find `macho` in `object`
       --> compiler/rustc_target/src/spec/apple_base.rs:179:19
        |
    179 |         | object::macho::PLATFORM_TVOS
        |                   ^^^^^ could not find `macho` in `object`
    
    error[E0433]: failed to resolve: could not find `macho` in `object`
       --> compiler/rustc_target/src/spec/apple_base.rs:180:19
        |
    180 |         | object::macho::PLATFORM_TVOSSIMULATOR
        |                   ^^^^^ could not find `macho` in `object`
    
    error[E0433]: failed to resolve: could not find `macho` in `object`
       --> compiler/rustc_target/src/spec/apple_base.rs:181:19
        |
    181 |         | object::macho::PLATFORM_MACCATALYST => Some((16, 2)),
        |                   ^^^^^ could not find `macho` in `object`
    
    error[E0433]: failed to resolve: could not find `macho` in `object`
       --> compiler/rustc_target/src/spec/apple_base.rs:182:17
        |
    182 |         object::macho::PLATFORM_WATCHOS | object::macho::PLATFORM_WATCHOSSIMULATOR => Some((9, 1)),
        |                 ^^^^^ could not find `macho` in `object`
    
    error[E0433]: failed to resolve: could not find `macho` in `object`
       --> compiler/rustc_target/src/spec/apple_base.rs:182:51
        |
    182 |         object::macho::PLATFORM_WATCHOS | object::macho::PLATFORM_WATCHOSSIMULATOR => Some((9, 1)),
        |                                                   ^^^^^ could not find `macho` in `object`
    
    error[E0433]: failed to resolve: could not find `macho` in `object`
       --> compiler/rustc_target/src/spec/apple_base.rs:189:33
        |
    189 |         ("macos", _) => object::macho::PLATFORM_MACOS,
        |                                 ^^^^^ could not find `macho` in `object`
    
    error[E0433]: failed to resolve: could not find `macho` in `object`
       --> compiler/rustc_target/src/spec/apple_base.rs:190:38
        |
    190 |         ("ios", "macabi") => object::macho::PLATFORM_MACCATALYST,
        |                                      ^^^^^ could not find `macho` in `object`
    
    error[E0433]: failed to resolve: could not find `macho` in `object`
       --> compiler/rustc_target/src/spec/apple_base.rs:191:35
        |
    191 |         ("ios", "sim") => object::macho::PLATFORM_IOSSIMULATOR,
        |                                   ^^^^^ could not find `macho` in `object`
    
    error[E0433]: failed to resolve: could not find `macho` in `object`
       --> compiler/rustc_target/src/spec/apple_base.rs:192:31
        |
    192 |         ("ios", _) => object::macho::PLATFORM_IOS,
        |                               ^^^^^ could not find `macho` in `object`
    
    error[E0433]: failed to resolve: could not find `macho` in `object`
       --> compiler/rustc_target/src/spec/apple_base.rs:193:39
        |
    193 |         ("watchos", "sim") => object::macho::PLATFORM_WATCHOSSIMULATOR,
        |                                       ^^^^^ could not find `macho` in `object`
    
    error[E0433]: failed to resolve: could not find `macho` in `object`
       --> compiler/rustc_target/src/spec/apple_base.rs:194:35
        |
    194 |         ("watchos", _) => object::macho::PLATFORM_WATCHOS,
        |                                   ^^^^^ could not find `macho` in `object`
    
    error[E0433]: failed to resolve: could not find `macho` in `object`
       --> compiler/rustc_target/src/spec/apple_base.rs:195:36
        |
    195 |         ("tvos", "sim") => object::macho::PLATFORM_TVOSSIMULATOR,
        |                                    ^^^^^ could not find `macho` in `object`
    
    error[E0433]: failed to resolve: could not find `macho` in `object`
       --> compiler/rustc_target/src/spec/apple_base.rs:196:32
        |
    196 |         ("tvos", _) => object::macho::PLATFORM_TVOS,
        |                                ^^^^^ could not find `macho` in `object`
    ```
    </details>
    
    `rustc_target` unconditionally contains its `spec` module (i.e. there is no `#[cfg]` on the `mod spec;`). The `spec/mod.rs` also does not start with `#![cfg]`.
    
    https://github.com/rust-lang/rust/blob/aa91057796695679e95329947d9f497cb5bdc5da/compiler/rustc_target/src/lib.rs#L37
    
    Similarly, the `spec` module unconditionally contains `apple_base`.
    
    https://github.com/rust-lang/rust/blob/aa91057796695679e95329947d9f497cb5bdc5da/compiler/rustc_target/src/spec/mod.rs#L62
    
    And, `apple_base` unconditionally refers to `object::macho`.
    
    https://github.com/rust-lang/rust/blob/aa91057796695679e95329947d9f497cb5bdc5da/compiler/rustc_target/src/spec/apple_base.rs#L176
    
    So I figure there is no way `object::macho` isn't needed by rustc.
    
    `object::macho` only exists if the `object` crate's "macho" feature is enabled. https://github.com/gimli-rs/object/blob/0.32.0/src/lib.rs#L111-L112
    workingjubilee committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    577f86d View commit details
    Browse the repository at this point in the history
  10. Rollup merge of #117322 - onur-ozkan:fix-suppressed-outputs, r=Kobzol

    change default output mode of `BootstrapCommand`
    
    `SuppressOnSuccess` on `BootstrapCommand` is a problematic default mode as it affects the logs during the bootstrapping (as shown in the screenshot below). The default behavior should be to print everything unless we explicitly modify the behavior within build steps.
    
    ![image](https://github.com/rust-lang/rust/assets/39852038/8dbaaeb2-0656-4ff9-8e48-1ac0734a913f)
    
    Fixes #117315
    
    cc `@Kobzol`
    workingjubilee committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    771b255 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    505bc85 View commit details
    Browse the repository at this point in the history
  12. Auto merge of #117335 - workingjubilee:rollup-jsomm41, r=workingjubilee

    Rollup of 5 pull requests
    
    Successful merges:
    
     - #115773 (tvOS simulator support on Apple Silicon for rustc)
     - #117162 (Remove `cfg_match` from the prelude)
     - #117311 (-Zunpretty help: add missing possible values)
     - #117316 (Mark constructor of `BinaryHeap` as const fn)
     - #117319 (explain why we don't inline when target features differ)
    
    r? `@ghost`
    `@rustbot` modify labels: rollup
    bors committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    2106b63 View commit details
    Browse the repository at this point in the history
  13. Don't use LFS64 symbols on musl

    Simplify #[cfg] blocks
    
    fmt
    
    don't try to use the more appropriate direntry on musl
    git-bruh authored and git-bruh committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    7a504cc View commit details
    Browse the repository at this point in the history
  14. Auto merge of #117336 - workingjubilee:rollup-6negquv, r=workingjubilee

    Rollup of 4 pull requests
    
    Successful merges:
    
     - #117170 (Add support for i586-unknown-netbsd as target.)
     - #117259 (Declare rustc_target's dependency on object/macho)
     - #117322 (change default output mode of `BootstrapCommand`)
     - #117325 (Small ty::print cleanups)
    
    r? `@ghost`
    `@rustbot` modify labels: rollup
    bors committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    bbcc169 View commit details
    Browse the repository at this point in the history
  15. rustdoc: Use ThinVec in GenericParamDefKind

    This should hopefully reduce memory usage and improve performance since
    these vectors are often empty (and `GenericParamDefKind` is constructed
    *a lot*).
    camelid committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    3784adc View commit details
    Browse the repository at this point in the history
  16. Rollup merge of #115968 - git-bruh:master, r=workingjubilee

    Don't use LFS64 symbols on musl
    
    Supersedes #106246
    
    ~~Note to packagers: If your distro's musl package has already been updated, then you won't be able to build a newer version of rust until a new rust release is made with these changes merged (which can be used to bootstrap). I'm using a super hacky method to bypass this by creating a stub library with LFS64 symbols and building a patched rust, so the symbols satisfy the build requirements while the final compiler build has no references to LFS64 symbols, example: https://codeberg.org/kiss-community/repo/pulls/160/files~~ Doesn't seem to be necessary with new rustup nightly builds, likely due to updates to vendored crates
    
    cc ```@alyssais```
    GuillaumeGomez committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    e9c7ebe View commit details
    Browse the repository at this point in the history
  17. Rollup merge of #117043 - onur-ozkan:skip-stage0-validation, r=Mark-S…

    …imulacrum
    
    add bootstrap flag `--skip-stage0-validation`
    
    This change introduces the `--skip-stage0-validation` flag, which permits the use of any desired version of the stage0 compiler without verifying its version.
    
    Additionally, stage0 compiler validation check is reverted(#115103) to its default enabled state.
    
    Helps to #115065
    
    r? Mark-Simulacrum
    GuillaumeGomez committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    20debcd View commit details
    Browse the repository at this point in the history
  18. Rollup merge of #117082 - fortanix:raoul/fix_closure_inherit_target_f…

    …eature_sgx, r=Mark-Simulacrum
    
    Fix closure-inherit-target-feature test for SGX platform
    
    PR #116078 adds the `closure-inherit-target-feature.rs` test that checks the generated assembly code for closures. These checks explicitly check the presence of `ret` instructions. This is incompatible with the SGX target as it explicitly rewrites all `ret` instructions to mitigate LVI vulnerabilities of certain processors. This PR simply ignores these tests for the SGX platform.
    
    cc: ```@jethrogb```
    GuillaumeGomez committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    2b98ecd View commit details
    Browse the repository at this point in the history
  19. Rollup merge of #117312 - RalfJung:memcpy-assumptions, r=Mark-Simulacrum

    memcpy assumptions: link to source showing that GCC makes the same assumption
    
    I finally stumbled upon a source showing that GCC also generates overlapping `memcpy`. So if we're linking major C compilers making such assumptions here, let's have both clang and GCC.
    GuillaumeGomez committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    7201240 View commit details
    Browse the repository at this point in the history
  20. Rollup merge of #117337 - camelid:genparamdefkind-thinvec, r=Guillaum…

    …eGomez
    
    rustdoc: Use `ThinVec` in `GenericParamDefKind`
    
    This should hopefully reduce memory usage and improve performance since
    these vectors are often empty (and `GenericParamDefKind` is constructed *a lot*).
    GuillaumeGomez committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    8b461d0 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    82b447a View commit details
    Browse the repository at this point in the history
  22. Auto merge of #117354 - GuillaumeGomez:rollup-k9xtq0g, r=GuillaumeGomez

    Rollup of 5 pull requests
    
    Successful merges:
    
     - #115968 (Don't use LFS64 symbols on musl)
     - #117043 (add bootstrap flag `--skip-stage0-validation`)
     - #117082 (Fix closure-inherit-target-feature test for SGX platform)
     - #117312 (memcpy assumptions: link to source showing that GCC makes the same assumption)
     - #117337 (rustdoc: Use `ThinVec` in `GenericParamDefKind`)
    
    r? `@ghost`
    `@rustbot` modify labels: rollup
    bors committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    160fd3c View commit details
    Browse the repository at this point in the history
  23. handle dry runs in dist::CodegenBackend

    self.number_of_times_dry_runs_have_caused_issues += 1;
    lqd committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    f656acc View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    2e7364a View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    5e6c313 View commit details
    Browse the repository at this point in the history
  26. Auto merge of #116270 - cjgillot:gvn-aggregate, r=oli-obk,RalfJung

    See through aggregates in GVN
    
    This PR is extracted from rust-lang/rust#111344
    
    The first 2 commit are cleanups to avoid repeated work. I propose to stop removing useless assignments as part of this pass, and let a later `SimplifyLocals` do it. This makes tests easier to read (among others).
    
    The next 3 commits add a constant folding mechanism to the GVN pass, presented in rust-lang/rust#116012. ~This pass is designed to only use global allocations, to avoid any risk of accidental modification of the stored state.~
    
    The following commits implement opportunistic simplifications, in particular:
    - projections of aggregates: `MyStruct { x: a }.x` gets replaced by `a`, works with enums too;
    - projections of arrays: `[a, b][0]` becomes `a`;
    - projections of repeat expressions: `[a; N][x]` becomes `a`;
    - transform arrays of equal operands into a repeat rvalue.
    
    Fixes rust-lang/miri#3090
    
    r? `@oli-obk`
    bors committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    83c9732 View commit details
    Browse the repository at this point in the history
  27. Use the LLVM rustc backend as external assembler

    The LLVM backend is generally available, while the gnu assembler is not
    on Windows and many other platforms by default.
    bjorn3 committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    827a6d8 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    b1e7051 View commit details
    Browse the repository at this point in the history
  29. Stabilize inline asm usage on all platforms

    But exclude sym operands for now as they are somewhat broken.
    bjorn3 committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    35453ac View commit details
    Browse the repository at this point in the history
  30. Auto merge of #116889 - MU001999:master, r=petrochenkov

    Eat close paren if capture_cfg to avoid unbalanced parens
    
    Fixes #116781
    bors committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    88ae8c9 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    e53b18f View commit details
    Browse the repository at this point in the history
  32. Auto merge of #116733 - compiler-errors:alias-liveness-but-this-time-…

    …sound, r=aliemjay
    
    Consider alias bounds when computing liveness in NLL (but this time sound hopefully)
    
    This is a revival of #116040, except removing the changes to opaque lifetime captures check to make sure that we're not triggering any unsoundness due to the lack of general existential regions and the currently-existing `ReErased` hack we use instead.
    
    r? `@aliemjay` -- I appreciate you pointing out the unsoundenss in the previous iteration of this PR, and I'd like to hear that you're happy with this iteration of this PR before this goes back into FCP :>
    
    Fixes #116794 as well
    
    ---
    
    (mostly copied from #116040 and reworked slightly)
    
    # Background
    
    Right now, liveness analysis in NLL is a bit simplistic. It simply walks through all of the regions of a type and marks them as being live at points. This is problematic in the case of aliases, since it requires that we mark **all** of the regions in their args[^1] as live, leading to bugs like #42940.
    
    In reality, we may be able to deduce that fewer regions are allowed to be present in the projected type (or "hidden type" for opaques) via item bounds or where clauses, and therefore ideally, we should be able to soundly require fewer regions to be live in the alias.
    
    For example:
    ```rust
    trait Captures<'a> {}
    impl<T> Captures<'_> for T {}
    
    fn capture<'o>(_: &'o mut ()) -> impl Sized + Captures<'o> + 'static {}
    
    fn test_two_mut(mut x: ()) {
        let _f1 = capture(&mut x);
        let _f2 = capture(&mut x);
        //~^ ERROR cannot borrow `x` as mutable more than once at a time
    }
    ```
    
    In the example above, we should be able to deduce from the `'static` bound on `capture`'s opaque that even though `'o` is a captured region, it *can never* show up in the opaque's hidden type, and can soundly be ignored for liveness purposes.
    
    # The Fix
    
    We apply a simple version of RFC 1214's `OutlivesProjectionEnv` and `OutlivesProjectionTraitDef` rules to NLL's `make_all_regions_live` computation.
    
    Specifically, when we encounter an alias type, we:
    1. Look for a unique outlives bound in the param-env or item bounds for that alias. If there is more than one unique region, bail, unless any of the outlives bound's regions is `'static`, and in that case, prefer `'static`. If we find such a unique region, we can mark that outlives region as live and skip walking through the args of the opaque.
    2. Otherwise, walk through the alias's args recursively, as we do today.
    
    ## Limitation: Multiple choices
    
    This approach has some limitations. Firstly, since liveness doesn't use the same type-test logic as outlives bounds do, we can't really try several options when we're faced with a choice.
    
    If we encounter two unique outlives regions in the param-env or bounds, we simply fall back to walking the opaque via its args. I expect this to be mostly mitigated by the special treatment of `'static`, and can be fixed in a forwards-compatible by a more sophisticated analysis in the future.
    
    ## Limitation: Opaque hidden types
    
    Secondly, we do not employ any of these rules when considering whether the regions captured by a hidden type are valid. That causes this code (cc #42940) to fail:
    
    ```rust
    trait Captures<'a> {}
    impl<T> Captures<'_> for T {}
    
    fn a() -> impl Sized + 'static {
        b(&vec![])
    }
    
    fn b<'o>(_: &'o Vec<i32>) -> impl Sized + Captures<'o> + 'static {}
    ```
    
    We need to have existential regions to avoid [unsoundness](rust-lang/rust#116040 (comment)) when an opaque captures a region which is not represented in its own substs but which outlives a region that does.
    
    ## Read more
    
    Context: rust-lang/rust#115822 (comment) (for the liveness case)
    More context: rust-lang/rust#42940 (comment) (for the opaque capture case, which this does not fix)
    
    [^1]: except for bivariant region args in opaques, which will become less relevant when we move onto edition 2024 capture semantics for opaques.
    bors committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    ec2b311 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    69c6aa5 View commit details
    Browse the repository at this point in the history
  34. Merge pull request #1403 from rust-lang/use_llvm_backend_as_assembler

    Support and stabilize inline asm on all platforms
    bjorn3 committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    9436eae View commit details
    Browse the repository at this point in the history
  35. Sync from rust e5cfc55

    bjorn3 committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    e281e6f View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    dde5880 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    a9b21bb View commit details
    Browse the repository at this point in the history
  38. Auto merge of #117089 - wesleywiser:update_backtrace, r=Mark-Simulacrum

    Update backtrace submodule
    
    This pulls in a few notable changes (see the [complete list](rust-lang/backtrace-rs@99faef8...e9da96e) for details):
    
    - rust-lang/backtrace-rs#508
    - rust-lang/backtrace-rs#566
    - rust-lang/backtrace-rs#569
      - Fixes #116403 by no longer using `dbghelp.dll` during backtrace capture.
    bors committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    608e968 View commit details
    Browse the repository at this point in the history
  39. Remove memoffset dependency from rustc_query_impl.

    The comment explains it's for `unstable_offset_of`, but `offset_of` is
    now stable.
    nnethercote committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    28e60de View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    c561325 View commit details
    Browse the repository at this point in the history
  41. Clean up rustc_*/Cargo.toml.

    - Sort dependencies and features sections.
    - Add `tidy` markers to the sorted sections so they stay sorted.
    - Remove empty `[lib`] sections.
    - Remove "See more keys..." comments.
    
    Excluded files:
    - rustc_codegen_{cranelift,gcc}, because they're external.
    - rustc_lexer, because it has external use.
    - stable_mir, because it has external use.
    nnethercote committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    8ff624a View commit details
    Browse the repository at this point in the history
  42. On object safety error, mention new enum as alternative

    When we encounter a `dyn Trait` that isn't object safe, look for its
    implementors. If there's one, mention using it directly If there are
    less than 9, mention the possibility of creating a new enum and using
    that instead.
    
    Account for object unsafe `impl Trait on dyn Trait {}`.  Make a
    distinction between public and sealed traits.
    
    Fix #80194.
    estebank committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    8c04999 View commit details
    Browse the repository at this point in the history

Commits on Oct 30, 2023

  1. Auto merge of #117332 - saethlin:panic-immediate-abort, r=workingjubilee

    Increase the reach of panic_immediate_abort
    
    I wanted to use/abuse this recently as part of another project, and I was surprised how many panic-related things were left in my binaries if I built a large crate with the feature enabled along with LTO. These changes get all the panic-related symbols that I could find out of my set of locally installed Rust utilities.
    bors committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    bcb5798 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6d69eb1 View commit details
    Browse the repository at this point in the history
  3. coverage: Inline the "recursive" worker methods for assigning counters

    Now that we don't manually pass around indent levels, there's no need for these
    worker methods to exist separately from their main callers.
    Zalathar committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    2f1be08 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    10c4734 View commit details
    Browse the repository at this point in the history
  5. Auto merge of #117328 - lqd:cranelift-rocket, r=Mark-Simulacrum

    pass `CODEGEN_BACKENDS` to docker
    
    The backends to build are now defined in the `CODEGEN_BACKENDS` env var. It's correctly set in CI, but wasn't passed to docker, hence cg_clif wasn't actually built in #81746.
    
    r? `@Kobzol:` I locally tried `CODEGEN_BACKENDS="cranelift" DEPLOY=1 src/ci/docker/run.sh dist-x86_64-linux` and this change was enough for `ci/run.sh` to read the env var.
    
    So I'll try as-is and we'll see.
    bors committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    1dfb6b1 View commit details
    Browse the repository at this point in the history
  6. Delay parsing of --cfg and --check-cfg options.

    By storing the unparsed values in `Config` and then parsing them within
    `run_compiler`, the parsing functions can use the main symbol interner,
    and not create their own short-lived interners.
    
    This change also eliminates the need for one `EarlyErrorHandler` in
    rustdoc, because parsing errors can be reported by another, slightly
    later `EarlyErrorHandler`.
    nnethercote committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    678e01a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    bfcff79 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    8e4ac98 View commit details
    Browse the repository at this point in the history
  9. Make Cfg and CheckCfg non-generic.

    They now only ever contains symbols.
    nnethercote committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    5c6a12c View commit details
    Browse the repository at this point in the history
  10. Auto merge of #116485 - coastalwhite:stabilize-riscv-target-features,…

    … r=Amanieu
    
    Stabilize Ratified RISC-V Target Features
    
    Stabilization PR for the ratified RISC-V target features. This stabilizes some of the target features tracked by #44839. This is also a part of #114544 and eventually needed for the RISC-V part of rust-lang/rfcs#3268.
    
    There is a similar PR for the the stdarch crate which can be found at rust-lang/stdarch#1476.
    
    This was briefly discussed on Zulip
    (https://rust-lang.zulipchat.com/#narrow/stream/250483-t-compiler.2Frisc-v/topic/Stabilization.20of.20RISC-V.20Target.20Features/near/394793704).
    
    Specifically, this PR stabilizes the:
    * Atomic Instructions (A) on v2.0
    * Compressed Instructions (C) on v2.0
    * ~Double-Precision Floating-Point (D) on v2.2~
    * ~Embedded Base (E) (Given as `RV32E` / `RV64E`) on v2.0~
    * ~Single-Precision Floating-Point (F) on v2.2~
    * Integer Multiplication and Division (M) on v2.0
    * ~Vector Operations (V) on v1.0~
    * Bit Manipulations (B) on v1.0 listed as `zba`, `zbc`, `zbs`
    * Scalar Cryptography (Zk) v1.0.1 listed as `zk`, `zkn`, `zknd`, `zkne`, `zknh`, `zkr`, `zks`, `zksed`, `zksh`, `zkt`, `zbkb`, `zbkc` `zkbx`
    * ~Double-Precision Floating-Point in Integer Register (Zdinx) on v1.0~
    * ~Half-Precision Floating-Point (Zfh) on v1.0~
    * ~Minimal Half-Precision Floating-Point (Zfhmin) on v1.0~
    * ~Single-Precision Floating-Point in Integer Register (Zfinx) on v1.0~
    * ~Half-Precision Floating-Point in Integer Register (Zhinx) on v1.0~
    * ~Minimal Half-Precision Floating-Point in Integer Register (Zhinxmin) on v1.0~
    
    r? `@Amanieu`
    bors committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    91bbdd9 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    371f972 View commit details
    Browse the repository at this point in the history
  12. Remove out-of-date comment.

    It was added in 51938c6, a commit with
    a 7,720 line diff and a one line commit message. Even then the comment
    was incorrect; there was a removed a `build_output_filenames` call with
    a `&[]` argument in rustdoc, but the commit removed that call. In such a
    large commit, it's easy for small errors to occur.
    nnethercote committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    85e56e8 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    a60d643 View commit details
    Browse the repository at this point in the history
  14. Remove check_output.

    Using `find` and `any` from `std` makes the code shorter and clearer.
    nnethercote committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    95b0088 View commit details
    Browse the repository at this point in the history
  15. Use ImageDataType for allocation type

    Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
    Ayush1325 committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    441068b View commit details
    Browse the repository at this point in the history
  16. Fail typeck for illegal break-with-value

    This is fixes the issue wherein typeck was succeeding for break-with-value
    at illegal locations such as inside `while`, `while let` and `for` loops which
    eventually caused an ICE during MIR interpetation for const eval.
    
    Now we fail typeck for such code which prevents faulty MIR from being generated
    and interpreted, thus fixing the ICE.
    gurry committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    0c8bdd0 View commit details
    Browse the repository at this point in the history
  17. bootstrap: bump fd-lock, clap and windows.

    this also updates target-sensitive dependencies like rustix
    and libc.
    chenx97 committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    2409ea3 View commit details
    Browse the repository at this point in the history
  18. improve and fix x install

    Fix: Write access check of `prefix` and `sysconfdir`
    when DESTDIR is present.
    
    Improvement: Instead of repeatedly reading `DESTDIR` within
    each `fn prepare_dir` usage, read it once and pass it to
    the `fn prepare_dir`.
    
    Signed-off-by: onur-ozkan <work@onurozkan.dev>
    onur-ozkan committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    4b14048 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    3f7e506 View commit details
    Browse the repository at this point in the history
  20. Streamline collect_crate_types.

    - The early return can be right at the top.
    - The control flow is simplified with `if let`.
    - The `collect` isn't necessary.
    - The "Unconditionally" comment is erroneously duplicated from
      `check_attr_crate_type`, and can be removed.
    nnethercote committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    be8fd8b View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    90862f6 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    0c381ec View commit details
    Browse the repository at this point in the history
  23. Rollup merge of #117147 - DaniPopes:pphir-fn-variadic, r=compiler-errors

    Print variadic argument pattern in HIR pretty printer
    
    Variadic argument name/pattern was ignored during HIR pretty printing.
    Could not figure out why it only works on normal functions (`va2`) and not in foreign ones (`va1`).
    fmease committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    2915707 View commit details
    Browse the repository at this point in the history
  24. Rollup merge of #117177 - Ayush1325:uefi-alloc-type, r=workingjubilee

    Use ImageDataType for allocation type
    
    Suggested at #100499
    
    cc `@dvdhrm`
    cc `@nicholasbishop`
    fmease committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    098bb37 View commit details
    Browse the repository at this point in the history
  25. Rollup merge of #117205 - weiznich:multiple_notes_for_on_unimplemente…

    …d, r=compiler-errors
    
    Allows `#[diagnostic::on_unimplemented]` attributes to have multiple
    
    notes
    
    This commit extends the `#[diagnostic::on_unimplemented]` (and `#[rustc_on_unimplemented]`) attributes to allow multiple `note` options. This enables emitting multiple notes for custom error messages. For now I've opted to not change any of the existing usages of `#[rustc_on_unimplemented]` and just updated the relevant compile tests.
    
    r? `@compiler-errors`
    
    I'm happy to adjust any of the existing changed location to emit the old error message if that's desired.
    fmease committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    5eb76fa View commit details
    Browse the repository at this point in the history
  26. Rollup merge of #117350 - Zalathar:counters-indent, r=oli-obk

    coverage: Replace manual debug indents with nested tracing spans in `counters`
    
    Instead of indenting these debug messages manually, we can get `#[instrument]` to do a better job of it for us, giving us some nice little simplifications.
    fmease committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    9a8d800 View commit details
    Browse the repository at this point in the history
  27. Rollup merge of #117365 - bjorn3:sync_cg_clif-2023-10-29, r=oli-obk

    Stabilize inline asm usage with rustc_codegen_cranelift
    
    Previously using inline asm with the cg_clif version built as part of rustc would return an error that inline asm support is unstable. Recently I implemented everything that remained for full support of inline asm with the exception of sym operands (which remain marked as unstable for cg_clif). As such I think it is time to declare the inline asm support of cg_clif stable.
    
    `@rustbot` label +A-codegen +A-cranelift +T-compiler
    fmease committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    fd5ffab View commit details
    Browse the repository at this point in the history
  28. Rollup merge of #117371 - compiler-errors:unique-params, r=oli-obk

    Ignore RPIT duplicated lifetimes in `opaque_types_defined_by`
    
    An RPIT's or TAIT's own generics are kinda useless -- so just ignore them. For TAITs, they will always be empty, and for RPITs, they're always duplicated lifetimes.
    
    Fixes #115013.
    fmease committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    12eb539 View commit details
    Browse the repository at this point in the history
  29. Rollup merge of #117382 - gurry:114529-ice-const-eval, r=oli-obk

    Fail typeck for illegal break-with-value
    
    This is fixes the issue wherein typeck was succeeding for break-with-value exprs at illegal locations such as inside `while`, `while let` and `for` loops which eventually caused an ICE during MIR interpretation for const eval.
    
    Now we fail typeck for such code which prevents faulty MIR from being generated and interpreted, thus fixing the ICE.
    
    Fixes #114529
    fmease committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    4f4b38c View commit details
    Browse the repository at this point in the history
  30. Rollup merge of #117385 - RalfJung:deduce_param_attrs, r=oli-obk

    deduce_param_attrs: explain a read-only case
    
    This takes the discussion [here](https://github.com/rust-lang/rust/pull/111517/files#r1243443625) and adds it as comment in the code.
    
    Cc `@lukas-code`
    fmease committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    288ab16 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    b48adef View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    745c600 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    bc926f7 View commit details
    Browse the repository at this point in the history
  34. Auto merge of #117387 - fmease:rollup-5958nsf, r=fmease

    Rollup of 8 pull requests
    
    Successful merges:
    
     - #117147 (Print variadic argument pattern in HIR pretty printer)
     - #117177 (Use ImageDataType for allocation type)
     - #117205 (Allows `#[diagnostic::on_unimplemented]` attributes to have multiple)
     - #117350 (coverage: Replace manual debug indents with nested tracing spans in `counters`)
     - #117365 (Stabilize inline asm usage with rustc_codegen_cranelift)
     - #117371 (Ignore RPIT duplicated lifetimes in `opaque_types_defined_by`)
     - #117382 (Fail typeck for illegal break-with-value)
     - #117385 (deduce_param_attrs: explain a read-only case)
    
    r? `@ghost`
    `@rustbot` modify labels: rollup
    bors committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    e324cf0 View commit details
    Browse the repository at this point in the history
  35. Auto merge of #116939 - chenx97:bootstrap-fd-lock, r=onur-ozkan

    bootstrap: bump fd-lock, clap and windows
    
    This update is proposed as an effort to update target-sensitive dependencies like `libc` and `rustix`.
    
    Since the Cargo.toml file is modified to prevent downgrading, cargo will update the dependencies automatically when you build the binary.
    bors committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    6d1fc53 View commit details
    Browse the repository at this point in the history
  36. Fix missing leading space in suggestion

    For a local pattern with no space between `let` and `(` e.g.:
    
      let(_a) = 3;
    
    we were previously suggesting this illegal code:
    
      let_a =3;
    
    After this change the suggestion will instead be:
    
      let _a =3;
    
    (Note the space after `let`)
    gurry committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    a2486db View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    82f34fd View commit details
    Browse the repository at this point in the history
  38. 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
  39. Configuration menu
    Copy the full SHA
    8d03e13 View commit details
    Browse the repository at this point in the history
  40. 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
  41. Configuration menu
    Copy the full SHA
    43ff2a7 View commit details
    Browse the repository at this point in the history
  42. Fix bad-c-variadic error being emitted multiple times

    If a function incorrectly contains multiple `...` args, and is also not
    foreign or `unsafe extern "C"`, only emit the latter error once.
    nicholasbishop committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    8508e65 View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    d5e836c View commit details
    Browse the repository at this point in the history
  44. Explicitly reject const C-variadic functions

    Trying to use C-variadics in a const function would previously fail with
    an error like "destructor of `VaListImpl<'_>` cannot be evaluated at
    compile-time".
    
    Add an explicit check for const C-variadics to provide a clearer error:
    "functions cannot be both `const` and C-variadic".
    nicholasbishop committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    f91b5ce View commit details
    Browse the repository at this point in the history
  45. Auto merge of #117267 - RalfJung:miri-tests, r=Mark-Simulacrum

    update which targets we test Miri on
    
    I hope this doesn't cost too much time; running only the "pass" tests should be reasonably fast (1-2 minutes on my system).
    
    Fixes rust-lang/rust#117167
    bors committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    e6e931d View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    58a80c8 View commit details
    Browse the repository at this point in the history
  47. 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
  48. Configuration menu
    Copy the full SHA
    224ddf8 View commit details
    Browse the repository at this point in the history
  49. Rollup merge of #112463 - fmease:rustdoc-elide-x-crate-def-gen-args, …

    …r=GuillaumeGomez
    
    rustdoc: elide cross-crate default generic arguments
    
    Elide cross-crate generic arguments if they coincide with their default.
    TL;DR: Most notably, no more `Box<…, Global>` in `std`'s docs, just `Box<…>` from now on.
    Fixes #80379.
    
    Also helps with #44306. Follow-up to #103885, #107637.
    
    r? ``@ghost``
    GuillaumeGomez committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    b9dce53 View commit details
    Browse the repository at this point in the history
  50. Rollup merge of #117068 - nnethercote:clean-up-Cargo-toml, r=wesleywiser

    Clean up `compiler/rustc*/Cargo.toml`
    
    Mostly by sorting dependencies, plus some other minor things.
    
    r? ``@wesleywiser``
    GuillaumeGomez committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    824e367 View commit details
    Browse the repository at this point in the history
  51. Rollup merge of #117132 - estebank:issue-80194, r=petrochenkov

    On object safety error, mention new enum as alternative
    
    When we encounter a `dyn Trait` that isn't object safe, look for its implementors. If there's one, mention using it directly If there are less than 9, mention the possibility of creating a new enum and using that instead.
    
    Fix #80194.
    GuillaumeGomez committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    95de91b View commit details
    Browse the repository at this point in the history
  52. Rollup merge of #117317 - RalfJung:track-caller, r=oli-obk

    share some track_caller logic between interpret and codegen
    
    Also move the code that implements the track_caller intrinsics out of the core interpreter engine -- it's just a helper creating a const-allocation, doesn't need to be part of the interpreter core.
    GuillaumeGomez committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    73100d8 View commit details
    Browse the repository at this point in the history
  53. Rollup merge of #117356 - he32:netbsd-mipsel, r=oli-obk

    Add support for mipsel-unknown-netbsd, 32-bit LE mips.
    GuillaumeGomez committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    99b032f View commit details
    Browse the repository at this point in the history
  54. Rollup merge of #117357 - tmiasko:terminate, r=wesleywiser

    Rename a few remaining references to abort terminator
    
    Follow up to e3f2edc
    GuillaumeGomez committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    5ac999f View commit details
    Browse the repository at this point in the history
  55. Rollup merge of #117370 - nicholasbishop:bishop-better-c-variadic-err…

    …ors, r=oli-obk
    
    C-variadic error improvements
    
    A couple improvements for c-variadic errors:
    
    1. Fix the bad-c-variadic error being emitted multiple times. If a function incorrectly contains multiple `...` args, and is also not foreign or `unsafe extern "C"`, only emit the latter error once rather than once per `...`.
    
    2. Explicitly reject `const` C-variadic functions. Trying to use C-variadics in a const function would previously fail with an error like "destructor of `VaListImpl<'_>` cannot be evaluated at compile-time". Add an explicit check for const C-variadics to provide a clearer error: "functions cannot be both `const` and C-variadic". This also addresses one of the concerns in rust-lang/rust#44930: "Ensure that even when this gets stabilized for regular functions, it is still rejected on const fn."
    GuillaumeGomez committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    784f04b View commit details
    Browse the repository at this point in the history
  56. Rollup merge of #117376 - nnethercote:rustc_interface-more, r=oli-obk

    More `rustc_interface` cleanups
    
    In particular, following up #117268 with more improvement to `--cfg`/`--check-cfg` handling.
    
    r? ``@oli-obk``
    GuillaumeGomez committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    d96bdbe View commit details
    Browse the repository at this point in the history
  57. Rollup merge of #117383 - onur-ozkan:fix-x-install, r=albertlarsan68

    improve and fix `x install`
    
    Fix: Write access check of `prefix` and `sysconfdir` when DESTDIR is present.
    
    Improvement: Instead of repeatedly reading `DESTDIR` within each `fn prepare_dir` usage, read it once and pass it to the `fn prepare_dir`.
    
    Fixes #117203
    GuillaumeGomez committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    c994bdb View commit details
    Browse the repository at this point in the history
  58. Rollup merge of #117390 - chenyukang:yukang-fix-117284-unused-macro, …

    …r=estebank
    
    Fix unused variables lint issue for args in macro
    
    Fixes #117284
    r? ````@estebank````
    GuillaumeGomez committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    02d32d2 View commit details
    Browse the repository at this point in the history
  59. Rollup merge of #117395 - gurry:117380-wrong-parent-sugg, r=Nilstrieb

    Fix missing leading space in suggestion
    
    For a local pattern with no space between `let` and `(` e.g.:
    ```rust
      let(_a) = 3;
    ```
    we were previously suggesting this illegal code:
    ```rust
      let_a = 3;
    ```
    After this change the suggestion will instead be:
    ```rust
      let _a = 3;
    ```
    Fixes #117380
    GuillaumeGomez committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    9e4ab9f View commit details
    Browse the repository at this point in the history
  60. Configuration menu
    Copy the full SHA
    162443b View commit details
    Browse the repository at this point in the history
  61. Configuration menu
    Copy the full SHA
    455cf5a View commit details
    Browse the repository at this point in the history
  62. Auto merge of #117405 - GuillaumeGomez:rollup-i3jxtwh, r=GuillaumeGomez

    Rollup of 11 pull requests
    
    Successful merges:
    
     - #112463 (rustdoc: elide cross-crate default generic arguments)
     - #117068 (Clean up `compiler/rustc*/Cargo.toml`)
     - #117132 (On object safety error, mention new enum as alternative)
     - #117317 (share some track_caller logic between interpret and codegen)
     - #117356 (Add support for mipsel-unknown-netbsd, 32-bit LE mips.)
     - #117357 (Rename a few remaining references to abort terminator)
     - #117370 (C-variadic error improvements)
     - #117376 (More `rustc_interface` cleanups)
     - #117383 (improve and fix `x install`)
     - #117390 (Fix unused variables lint issue for args in macro)
     - #117395 (Fix missing leading space in suggestion)
    
    r? `@ghost`
    `@rustbot` modify labels: rollup
    bors committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    236ac91 View commit details
    Browse the repository at this point in the history
  63. Configuration menu
    Copy the full SHA
    c91f60e View commit details
    Browse the repository at this point in the history
  64. Rollup merge of #116862 - estebank:issue-57457, r=oli-obk

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

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

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

    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/rust#117378
    matthiaskrgr committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    342483c View commit details
    Browse the repository at this point in the history
  68. Rollup merge of #117403 - oli-obk:the_gift_that_keeps_on_giving_11684…

    …9, r=compiler-errors
    
    Poison check_well_formed if method receivers are invalid to prevent typeck from running on it
    
    fixes #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 committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    24c6b6c View commit details
    Browse the repository at this point in the history
  69. Rollup merge of #117411 - oli-obk:query_merge_immobile_game, r=compil…

    …er-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 committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    3e95c6a View commit details
    Browse the repository at this point in the history
  70. Rollup merge of #117414 - compiler-errors:tait-forevert, r=oli-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 #117412
    
    r? `@oli-obk`
    matthiaskrgr committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    c5aec96 View commit details
    Browse the repository at this point in the history
  71. Auto merge of #117415 - matthiaskrgr:rollup-jr2p1t2, r=matthiaskrgr

    Rollup of 7 pull requests
    
    Successful merges:
    
     - #116862 (Detect when trait is implemented for type and suggest importing it)
     - #117389 (Some diagnostics improvements of `gen` blocks)
     - #117396 (Don't treat closures/coroutine types as part of the public API)
     - #117398 (Correctly handle nested or-patterns in exhaustiveness)
     - #117403 (Poison check_well_formed if method receivers are invalid to prevent typeck from running on it)
     - #117411 (Improve some diagnostics around `?Trait` bounds)
     - #117414 (Don't normalize to an un-revealed opaque when we hit the recursion limit)
    
    r? `@ghost`
    `@rustbot` modify labels: rollup
    bors committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    31bc7e2 View commit details
    Browse the repository at this point in the history
  72. Detect object safety errors when assoc type is missing

    When an associated type with GATs isn't specified in a `dyn Trait`, emit
    an object safety error instead of only complaining about the missing
    associated type, as it will lead the user down a path of three different
    errors before letting them know that what they were trying to do is
    impossible to begin with.
    
    Fix #103155.
    estebank committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    17a6ae2 View commit details
    Browse the repository at this point in the history
  73. Add test

    estebank committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    8c55772 View commit details
    Browse the repository at this point in the history
  74. Sort errors

    estebank committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    b8a8ba9 View commit details
    Browse the repository at this point in the history
  75. Auto merge of #116405 - estebank:issue-103155, r=davidtwco

    Detect object safety errors when assoc type is missing
    
    When an associated type with GATs isn't specified in a `dyn Trait`, emit an object safety error instead of only complaining about the missing associated type, as it will lead the user down a path of three different errors before letting them know that what they were trying to do is impossible to begin with.
    
    Fix #103155.
    bors committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    a395214 View commit details
    Browse the repository at this point in the history

Commits on Oct 31, 2023

  1. Auto merge of #117363 - saethlin:cross-crate-inline-when-inline, r=tm…

    …iasko
    
    Enable cross-crate-inlining when MIR inlining is enabled
    
    This would make rust-lang/rust#117355 generally less obscure, and also seems like a good idea, even if for some reason someone wants MIR opts but no codegen opts.
    bors committed Oct 31, 2023
    Configuration menu
    Copy the full SHA
    650991d View commit details
    Browse the repository at this point in the history
  2. remove excluded files from upstream

    This commit is generated by `ferrocene/tools/pull-upstream/pull.sh`.
    The list of excluded files is defined in `.gitattributes`.
    github-actions[bot] committed Oct 31, 2023
    Configuration menu
    Copy the full SHA
    2a97b14 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5280890 View commit details
    Browse the repository at this point in the history
  4. fix upstream-pull conflicts

    tshepang committed Oct 31, 2023
    Configuration menu
    Copy the full SHA
    9692b7e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    d896e90 View commit details
    Browse the repository at this point in the history
  6. annotated test moved

    tshepang committed Oct 31, 2023
    Configuration menu
    Copy the full SHA
    1af48ab View commit details
    Browse the repository at this point in the history
  7. annotated test moved

    tshepang committed Oct 31, 2023
    Configuration menu
    Copy the full SHA
    d9c5176 View commit details
    Browse the repository at this point in the history
  8. fix upstream-pull conflict

    tshepang committed Oct 31, 2023
    Configuration menu
    Copy the full SHA
    a39884b View commit details
    Browse the repository at this point in the history
  9. fix upstream pull conflict

    tshepang committed Oct 31, 2023
    Configuration menu
    Copy the full SHA
    2cc629e View commit details
    Browse the repository at this point in the history
  10. annotated test removed

    tshepang committed Oct 31, 2023
    Configuration menu
    Copy the full SHA
    dc5e876 View commit details
    Browse the repository at this point in the history
  11. these are actually auto-generated

    $ ./x run generate-completions
    
    Would have saved time by avoiding doing
    9692b7e manually
    tshepang committed Oct 31, 2023
    Configuration menu
    Copy the full SHA
    76733dd View commit details
    Browse the repository at this point in the history
  12. bless output of a newly-annotated test

    Should of been part of a39884b
    tshepang committed Oct 31, 2023
    Configuration menu
    Copy the full SHA
    31d5f2a View commit details
    Browse the repository at this point in the history