Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 12 pull requests #132546

Closed
wants to merge 83 commits into from

Commits on Sep 23, 2024

  1. Configuration menu
    Copy the full SHA
    32b608a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f3ae423 View commit details
    Browse the repository at this point in the history
  3. Rustfmt

    bjorn3 committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    9d8572d View commit details
    Browse the repository at this point in the history
  4. Merge branch 'sync_from_rust'

    bjorn3 committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    3a3a634 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    631ab21 View commit details
    Browse the repository at this point in the history

Commits on Sep 24, 2024

  1. unify dyn* coercions with other pointer coercions

    Lukas Markeffsky committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    1efad22 View commit details
    Browse the repository at this point in the history
  2. be even more precise about "cast" vs "coercion"

    Lukas Markeffsky committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    25b66d8 View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2024

  1. Add a debug assertion in codegen that unsize casts of the same princi…

    …pal trait def id are truly NOPs
    compiler-errors committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    6fdc133 View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2024

  1. Sync from rust 9e394f5

    bjorn3 committed Sep 26, 2024
    Configuration menu
    Copy the full SHA
    39440c5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    eccda69 View commit details
    Browse the repository at this point in the history
  3. Fix running rustc tests

    bjorn3 committed Sep 26, 2024
    Configuration menu
    Copy the full SHA
    764f1ba View commit details
    Browse the repository at this point in the history

Commits on Sep 29, 2024

  1. fix cranelift CI

    RalfJung committed Sep 29, 2024
    Configuration menu
    Copy the full SHA
    9b31c68 View commit details
    Browse the repository at this point in the history

Commits on Sep 30, 2024

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

Commits on Oct 3, 2024

  1. Update to Cranelift 0.112.0

    bjorn3 committed Oct 3, 2024
    Configuration menu
    Copy the full SHA
    743a2e4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9a48c44 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0a9ce96 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0f1284c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0ba0845 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    a146874 View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2024

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

Commits on Oct 6, 2024

  1. various fixes for naked_asm! implementation

    - fix for divergence
    - fix error message
    - fix another cranelift test
    - fix some cranelift things
    - don't set the NORETURN option for naked asm
    - fix use of naked_asm! in doc comment
    - fix use of naked_asm! in run-make test
    - use `span_bug` in unreachable branch
    folkertdev committed Oct 6, 2024
    Configuration menu
    Copy the full SHA
    2811ce7 View commit details
    Browse the repository at this point in the history

Commits on Oct 9, 2024

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

Commits on Oct 10, 2024

  1. Configuration menu
    Copy the full SHA
    14f656e View commit details
    Browse the repository at this point in the history
  2. Sync from rust eb4e234

    bjorn3 committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    3cf701c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5d7d251 View commit details
    Browse the repository at this point in the history
  4. Fix rustc test suite

    bjorn3 committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    76dfce7 View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2024

  1. intrinsics.fmuladdf{16,32,64,128}: expose llvm.fmuladd.* semantics

    Add intrinsics `fmuladd{f16,f32,f64,f128}`. This computes `(a * b) +
    c`, to be fused if the code generator determines that (i) the target
    instruction set has support for a fused operation, and (ii) that the
    fused operation is more efficient than the equivalent, separate pair
    of `mul` and `add` instructions.
    
    https://llvm.org/docs/LangRef.html#llvm-fmuladd-intrinsic
    
    MIRI support is included for f32 and f64.
    
    The codegen_cranelift uses the `fma` function from libc, which is a
    correct implementation, but without the desired performance semantic. I
    think this requires an update to cranelift to expose a suitable
    instruction in its IR.
    
    I have not tested with codegen_gcc, but it should behave the same
    way (using `fma` from libc).
    jedbrown committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    270fb21 View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2024

  1. Sync from rust 798fb83

    bjorn3 committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    bf2da67 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    47a7e99 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    16067fd View commit details
    Browse the repository at this point in the history
  4. Stop copying libstd.so to dist/lib

    It is only necessary in dist/lib/rustlib/*/lib anymore. The jit mode now
    correctly find it there too.
    bjorn3 committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    bbaaecc View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6666435 View commit details
    Browse the repository at this point in the history
  6. Allow dropping dyn principal

    compiler-errors authored and WaffleLapkin committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    2f1b15f View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2024

  1. Fix tests

    compiler-errors committed Oct 19, 2024
    Configuration menu
    Copy the full SHA
    65201c2 View commit details
    Browse the repository at this point in the history

Commits on Oct 20, 2024

  1. Sync from rust da93539

    bjorn3 committed Oct 20, 2024
    Configuration menu
    Copy the full SHA
    383bb66 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    04f33cc View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    45c2002 View commit details
    Browse the repository at this point in the history

Commits on Oct 22, 2024

  1. Rename Receiver -> LegacyReceiver

    As part of the "arbitrary self types v2" project, we are going to
    replace the current `Receiver` trait with a new mechanism based on a
    new, different `Receiver` trait.
    
    This PR renames the old trait to get it out the way. Naming is hard.
    Options considered included:
    * HardCodedReceiver (because it should only be used for things in the
      standard library, and hence is sort-of hard coded)
    * LegacyReceiver
    * TargetLessReceiver
    * OldReceiver
    
    These are all bad names, but fortunately this will be temporary.
    Assuming the new mechanism proceeds to stabilization as intended, the
    legacy trait will be removed altogether.
    
    Although we expect this trait to be used only in the standard library,
    we suspect it may be in use elsehwere, so we're landing this change
    separately to identify any surprising breakages.
    
    It's known that this trait is used within the Rust for Linux project; a
    patch is in progress to remove their dependency.
    
    This is a part of the arbitrary self types v2 project,
    rust-lang/rfcs#3519
    rust-lang#44874
    
    r? @wesleywiser
    adetaylor committed Oct 22, 2024
    Configuration menu
    Copy the full SHA
    c5a5e86 View commit details
    Browse the repository at this point in the history

Commits on Oct 24, 2024

  1. Sync from rust 4f2f477

    bjorn3 committed Oct 24, 2024
    Configuration menu
    Copy the full SHA
    0093a4b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3f06952 View commit details
    Browse the repository at this point in the history
  3. Update Cranelift to 0.113

    bjorn3 committed Oct 24, 2024
    Configuration menu
    Copy the full SHA
    c28d433 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    bcb7de3 View commit details
    Browse the repository at this point in the history
  5. Merge pull request rust-lang#1537 from dpaoliello/debugunwind

    Don't panic about debug info for Arm64 Windows unwind info
    bjorn3 authored Oct 24, 2024
    Configuration menu
    Copy the full SHA
    616abf1 View commit details
    Browse the repository at this point in the history

Commits on Oct 25, 2024

  1. Re-do recursive const stability checks

    Fundamentally, we have *three* disjoint categories of functions:
    1. const-stable functions
    2. private/unstable functions that are meant to be callable from const-stable functions
    3. functions that can make use of unstable const features
    
    This PR implements the following system:
    - `#[rustc_const_stable]` puts functions in the first category. It may only be applied to `#[stable]` functions.
    - `#[rustc_const_unstable]` by default puts functions in the third category. The new attribute `#[rustc_const_stable_indirect]` can be added to such a function to move it into the second category.
    - `const fn` without a const stability marker are in the second category if they are still unstable. They automatically inherit the feature gate for regular calls, it can now also be used for const-calls.
    
    Also, several holes in recursive const stability checking are being closed.
    There's still one potential hole that is hard to avoid, which is when MIR
    building automatically inserts calls to a particular function in stable
    functions -- which happens in the panic machinery. Those need to *not* be
    `rustc_const_unstable` (or manually get a `rustc_const_stable_indirect`) to be
    sure they follow recursive const stability. But that's a fairly rare and special
    case so IMO it's fine.
    
    The net effect of this is that a `#[unstable]` or unmarked function can be
    constified simply by marking it as `const fn`, and it will then be
    const-callable from stable `const fn` and subject to recursive const stability
    requirements. If it is publicly reachable (which implies it cannot be unmarked),
    it will be const-unstable under the same feature gate. Only if the function ever
    becomes `#[stable]` does it need a `#[rustc_const_unstable]` or
    `#[rustc_const_stable]` marker to decide if this should also imply
    const-stability.
    
    Adding `#[rustc_const_unstable]` is only needed for (a) functions that need to
    use unstable const lang features (including intrinsics), or (b) `#[stable]`
    functions that are not yet intended to be const-stable. Adding
    `#[rustc_const_stable]` is only needed for functions that are actually meant to
    be directly callable from stable const code. `#[rustc_const_stable_indirect]` is
    used to mark intrinsics as const-callable and for `#[rustc_const_unstable]`
    functions that are actually called from other, exposed-on-stable `const fn`. No
    other attributes are required.
    RalfJung committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    6ca276d View commit details
    Browse the repository at this point in the history

Commits on Oct 26, 2024

  1. Effects cleanup

    - removed extra bits from predicates queries that are no longer needed in the new system
    - removed the need for `non_erasable_generics` to take in tcx and DefId, removed unused arguments in callers
    fee1-dead committed Oct 26, 2024
    Configuration menu
    Copy the full SHA
    83f1121 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#132168 - fee1-dead-contrib:fxclean, r=compi…

    …ler-errors
    
    Effects cleanup
    
    - removed extra bits from predicates queries that are no longer needed in the new system
    - removed the need for `non_erasable_generics` to take in tcx and DefId, removed unused arguments in callers
    
    r? compiler-errors
    matthiaskrgr authored Oct 26, 2024
    Configuration menu
    Copy the full SHA
    a29a8f5 View commit details
    Browse the repository at this point in the history

Commits on Oct 28, 2024

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

Commits on Oct 29, 2024

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

Commits on Oct 31, 2024

  1. Sync from rust 759e07f

    bjorn3 committed Oct 31, 2024
    Configuration menu
    Copy the full SHA
    28701aa View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    05126cd View commit details
    Browse the repository at this point in the history
  3. Fix rustc test suite

    bjorn3 committed Oct 31, 2024
    Configuration menu
    Copy the full SHA
    297e933 View commit details
    Browse the repository at this point in the history

Commits on Nov 2, 2024

  1. Configuration menu
    Copy the full SHA
    66351a6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    720d618 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    34432f7 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5266623 View commit details
    Browse the repository at this point in the history
  5. make codegen help output more consistent

    The output of `rustc -C help` generally has one option per line. There was one
    exception because of a (presumably) forgotten line continuation escape.
    senekor committed Nov 2, 2024
    Configuration menu
    Copy the full SHA
    8837fc7 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    afe1902 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    f341a19 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    36040aa View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    0fa86f9 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    90f2075 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    b919675 View commit details
    Browse the repository at this point in the history
  12. Sync from rust 705cfe0

    bjorn3 committed Nov 2, 2024
    Configuration menu
    Copy the full SHA
    b856716 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    5b1246b View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    60f0cd8 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    c959f6e View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    82f8b8f View commit details
    Browse the repository at this point in the history
  17. PassWrapper: adapt for llvm/llvm-project@b01e2a8

    We don't see a reason to explicitly pass the default here, so just use
    the default instead of explicitly passing it and needing an ifdef.
    
    @rustbot label: +llvm-main
    durin42 committed Nov 2, 2024
    Configuration menu
    Copy the full SHA
    ab5583e View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    c7b07d5 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    16394e9 View commit details
    Browse the repository at this point in the history
  20. Rollup merge of rust-lang#132393 - zedddie16:issue-131865-fix, r=tgro…

    …ss35
    
    Docs: added brief colon explanation
    
    rust-lang#131865
    (this is my first attempt at contributing, feedback is welcome)
    workingjubilee authored Nov 2, 2024
    Configuration menu
    Copy the full SHA
    6f1ff28 View commit details
    Browse the repository at this point in the history
  21. Rollup merge of rust-lang#132419 - durin42:llvm-20-type-test-thing, r…

    …=cuviper
    
    PassWrapper: adapt for llvm/llvm-project@b01e2a8b5620466c3b
    
    A boolean turned into an enum. None matches the old behavior of false, so we pass that.
    
    ```@rustbot``` label: +llvm-main
    workingjubilee authored Nov 2, 2024
    Configuration menu
    Copy the full SHA
    b32ecc2 View commit details
    Browse the repository at this point in the history
  22. Rollup merge of rust-lang#132437 - Zalathar:inline-mixed-regression, …

    …r=jieyouxu
    
    coverage: Regression test for inlining into an uninstrumented crate
    
    Regression test for rust-lang#132395, after I was able to figure out a simple way to reproduce it. See also rust-lang#132436.
    
    In addition to confirming that there is no ICE, this test also demonstrates that the affected code is undercounted, because executing the inlined copy doesn't increment coverage counters.
    workingjubilee authored Nov 2, 2024
    Configuration menu
    Copy the full SHA
    f3231a2 View commit details
    Browse the repository at this point in the history
  23. Rollup merge of rust-lang#132458 - RalfJung:rustc-const-unstable, r=A…

    …manieu
    
    get rid of a whole bunch of unnecessary rustc_const_unstable attributes
    
    In general, when a `const fn` is still unstable, it doesn't need a `#[rustc_const_unstable]` attribute. The only exception is functions that internally use things that can't be used in stable const fn yet.
    
    So this gets rid of a whole bunch of `#[rustc_const_unstable]` in libcore.
    workingjubilee authored Nov 2, 2024
    Configuration menu
    Copy the full SHA
    02fa0c3 View commit details
    Browse the repository at this point in the history
  24. Rollup merge of rust-lang#132499 - RalfJung:unicode_data.rs, r=tgross35

    unicode_data.rs: show command for generating file
    
    rust-lang#131647 made this an easily runnable tool, now we just have to mention that in the comment. :)
    
    Fixes rust-lang#131640.
    workingjubilee authored Nov 2, 2024
    Configuration menu
    Copy the full SHA
    8819385 View commit details
    Browse the repository at this point in the history
  25. Rollup merge of rust-lang#132503 - RalfJung:const-hash-map, r=Amanieu

    better test for const HashMap; remove const_hash leftovers
    
    The existing `const_with_hasher` test is kind of silly since the HashMap it constructs can never contain any elements. So this adjusts the test to construct a usable HashMap, which is a bit non-trivial since the default hash builder cannot be built in `const`. `BuildHasherDefault::new()` helps but is unstable (rust-lang#123197), so we also have a test that does not involve that type.
    
    The second commit removes the last remnants of rust-lang#104061, since they aren't actually useful -- without const traits, you can't do any hashing in `const`.
    
    Cc `@rust-lang/libs-api` `@rust-lang/wg-const-eval`
    Closes rust-lang#104061
    Related to rust-lang#102575
    workingjubilee authored Nov 2, 2024
    Configuration menu
    Copy the full SHA
    89d9d3d View commit details
    Browse the repository at this point in the history
  26. Rollup merge of rust-lang#132514 - Zalathar:print-target-cpus, r=jiey…

    …ouxu
    
    Port most of `--print=target-cpus` to Rust
    
    The logic and formatting needed by `--print=target-cpus` has historically been carried out in C++ code. Originally it used `printf` to write directly to the console, but later it switched over to writing to a `std::ostringstream` and then passing its buffer to a callback function pointer.
    
    This PR replaces that C++ code with a very simple function that writes a list of CPU names to a `&RustString`, with the rest of the logic and formatting being handled by ordinary safe Rust code.
    workingjubilee authored Nov 2, 2024
    Configuration menu
    Copy the full SHA
    133d86c View commit details
    Browse the repository at this point in the history
  27. Rollup merge of rust-lang#132520 - matthiaskrgr:knobu, r=jieyouxu

    NFC add known bug nr to test
    
    r? ```@jieyouxu```
    workingjubilee authored Nov 2, 2024
    Configuration menu
    Copy the full SHA
    b306ab7 View commit details
    Browse the repository at this point in the history
  28. Rollup merge of rust-lang#132522 - senekor:consistenst-codegen-help, …

    …r=compiler-errors
    
    make codegen help output more consistent
    
    The output of `rustc -C help` generally has one option per line. There was one exception because of a (presumably) forgotten line continuation escape.
    workingjubilee authored Nov 2, 2024
    Configuration menu
    Copy the full SHA
    42cb65e View commit details
    Browse the repository at this point in the history
  29. Rollup merge of rust-lang#132523 - ranger-ross:test-issue-117446, r=c…

    …ompiler-errors
    
    Added regression test for generics index out of bounds
    
    Added a regression test for  rust-lang#117446
    This ICE was fixed in Rust 1.75 but a regression test was never added.
    
    This PR adds a UI test with a reduced version of the original bug report that does not rely on external crates.
    workingjubilee authored Nov 2, 2024
    Configuration menu
    Copy the full SHA
    c7ea4f5 View commit details
    Browse the repository at this point in the history
  30. Rollup merge of rust-lang#132526 - bjorn3:sync_cg_clif-2024-11-02, r=…

    …bjorn3
    
    Subtree sync for rustc_codegen_cranelift
    
    The highlight this time is an update to Cranelift 0.113,
    
    r? `@ghost`
    
    `@rustbot` label +A-codegen +A-cranelift +T-compiler
    workingjubilee authored Nov 2, 2024
    Configuration menu
    Copy the full SHA
    13fecf5 View commit details
    Browse the repository at this point in the history
  31. Rollup merge of rust-lang#132528 - compiler-errors:fallback-sugg-opt,…

    … r=jieyouxu
    
    Use `*_opt` typeck results fns to not ICE in fallback suggestion
    
    Self-explanatory. Fixes rust-lang#132517.
    workingjubilee authored Nov 2, 2024
    Configuration menu
    Copy the full SHA
    46edfa3 View commit details
    Browse the repository at this point in the history
  32. Rollup merge of rust-lang#132540 - compiler-errors:gc, r=calebcartwright

    Do not format generic consts
    
    We introduced **nightly support** for generic const items in rust-lang#113522, but formatting of consts was not modified. Making them format *correctly* is hard, so let's just bail formatting them so we don't accidentally strip their generics and where clauses. This is essentially no-op formatting for generic const items.
    
    r? `@calebcartwright` or `@ytmimi`
    workingjubilee authored Nov 2, 2024
    Configuration menu
    Copy the full SHA
    5516671 View commit details
    Browse the repository at this point in the history