Commit Graph

160 Commits

Author SHA1 Message Date
bjorn3
b71483b2a1 Rustup to rustc 1.84.0-nightly (854980293 2024-11-06) 2024-11-07 10:40:15 +00:00
bjorn3
28701aa46d Sync from rust 759e07f063 2024-10-31 09:20:43 +00:00
Ralf Jung
6ca276df2e 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.
2024-10-25 20:31:40 +02:00
bjorn3
3f06952be3 Rustup to rustc 1.84.0-nightly (4f2f477fd 2024-10-23) 2024-10-24 09:16:08 +00:00
bjorn3
45c2002f08 Update abi-cafe test expectations for a recent fix of the rust abi 2024-10-20 14:29:22 +00:00
bjorn3
04f33cc839 Rustup to rustc 1.84.0-nightly (da935398d 2024-10-19) 2024-10-20 14:14:00 +00:00
bjorn3
47a7e994f2 Rustup to rustc 1.84.0-nightly (798fb83f7 2024-10-16) 2024-10-17 10:55:09 +00:00
bjorn3
3cf701c845 Sync from rust eb4e234674 2024-10-10 16:13:20 +00:00
bjorn3
14f656ede3 Compile all abi-cafe tests with debuginfo enabled 2024-10-10 16:09:42 +00:00
Ralf Jung
9b31c68c0e fix cranelift CI 2024-09-29 07:32:08 +02:00
bjorn3
32b608a439 Merge commit '6d35b4c9a04580366fd800692a5b5db79d766530' into sync_cg_clif-2024-09-22 2024-09-23 11:20:46 +00:00
bjorn3
27b21af624 Rustup to rustc 1.83.0-nightly (1d68e6dd1 2024-09-21) 2024-09-22 17:35:29 +00:00
bjorn3
dcae9acda0 Rustup to rustc 1.83.0-nightly (0ee7cb5e3 2024-09-10) 2024-09-11 19:31:20 +00:00
bjorn3
b4d55a8799 Add missing dbghelp link directive for windows 2024-09-11 17:38:03 +00:00
bjorn3
87e74fe80b Rustup to rustc 1.82.0-nightly (a32d4a0e8 2024-08-21) 2024-08-22 19:24:47 +00:00
bjorn3
3ea9313de3 Merge commit '69b3f5a426a5c1c05236a45b36f6679d95fbe01b' into sync_cg_clif-2024-08-09 2024-08-09 17:18:46 +00:00
bjorn3
0e20a762f1 Stop using a custom Cargo.toml and Cargo.lock for the standard library
The rust-src component now ships a working copy of both.
2024-08-09 15:59:30 +00:00
bjorn3
d515e881a7 Disable f16 and f128 in compiler-builtins when running rustc tests 2024-08-09 15:51:43 +00:00
Daniel Paoliello
2756bd6ff7 Add support for raw-dylib 2024-08-08 13:51:58 -07:00
bjorn3
52f1ea4915 Don't skip running abi-cafe tests that give SIGILL on Windows 2024-08-05 19:13:52 +00:00
Rémy Rakic
1f19cdf659 mark busted tests for aarch64-apple-darwin and aarch64-unknown-linux-gnu 2024-08-05 16:44:30 +00:00
bjorn3
e52af665f5 Update abi-cafe
This has found a couple of new abi issues. I also had to disable the
abi-cafe tests for the MinGW target as one of these abi issues causes a
hang and abi-cafe doesn't yet support timeouts.
2024-08-02 18:08:29 +00:00
bjorn3
7bdafb5f6a Rustup to rustc 1.82.0-nightly (8e86c9567 2024-08-01) 2024-08-02 11:40:01 +00:00
bjorn3
d768359716 Rustup to rustc 1.82.0-nightly (c1a6199e9 2024-07-24) 2024-07-25 15:16:41 +00:00
bjorn3
5adaed06a0 Merge commit '49cd5dd454d0115cfbe9e39102a8b3ba4616aa40' into sync_cg_clif-2024-06-30 2024-06-30 11:28:14 +00:00
bjorn3
a4b36e5adb Rustup to rustc 1.81.0-nightly (d7f6ebace 2024-06-16) 2024-06-17 08:27:46 +00:00
bjorn3
0d1d00478c Sync from rust d7f6ebacee 2024-06-17 07:50:36 +00:00
Nicholas Nethercote
02b20f8871 Update a cranelift patch file for formatting changes.
PR #125443 will reformat all the use declarations in the repo. This
would break a patch kept in `rustc_codegen_cranelift` that gets applied
to `library/std/src/sys/pal/windows/rand.rs`.

So this commit formats the use declarations in
`library/std/src/sys/pal/windows/rand.rs` in advance of #125443 and
updates the patch file accordingly.

The motivation is that #125443 is a huge change and we want to get
fiddly little changes like this out of the way so it can be nothing more
than an `x fmt --all`.
2024-06-12 08:52:40 +10:00
bjorn3
c06cbc8dbe Rustup to rustc 1.81.0-nightly (b5b13568f 2024-06-10) 2024-06-11 12:18:15 +00:00
bjorn3
a255965849 Rustup to rustc 1.80.0-nightly (debd22da6 2024-05-29) 2024-05-30 16:34:21 +00:00
bjorn3
ed7d97e4c8 Merge commit '3270432f4b0583104c8b9b6f695bf97d6bbf3ac2' into sync_cg_clif-2024-05-13 2024-05-13 13:26:33 +00:00
bjorn3
250d0832a1 Rustup to rustc 1.80.0-nightly (6e1d94708 2024-05-10) 2024-05-11 13:51:22 +00:00
bjorn3
4ad6c6c581 Merge commit 'de5d6523738fd44a0521b6abf3e73ae1df210741' into sync_cg_clif-2024-04-23 2024-04-23 09:37:28 +00:00
bjorn3
041666a0bd Update abi-cafe ui128 test expectations 2024-04-22 21:04:56 +00:00
Chris Denton
fbac8ef01c Cranelift: Revert raw-dylib for Windows futex APIs 2024-04-16 15:53:35 +00:00
bjorn3
e243f8d0e3 Merge commit '89f54caacf90e99fc8ba0d60a28bdadea3cfdf1e' into sync_cg_clif-2024-04-11 2024-04-11 10:42:48 +00:00
bjorn3
c5c31447a7 Merge commit '09fae60a86b848a2fc0ad219ecc4e438dc1eef86' into sync_cg_clif-2024-03-28 2024-03-28 11:43:35 +00:00
bjorn3
4b61629951 Merge commit '4cf4ffc6ba514f171b3f52d1c731063e4fc45be3' into sync_cg_clif-2024-03-16 2024-03-16 17:23:11 +00:00
bjorn3
5ec45d3d7a Merge commit '54cbb6e7531f95e086d5c3dd0d5e73bfbe3545ba' into sync_cg_clif-2024-03-08 2024-03-08 20:41:29 +00:00
Chris Denton
fcb86c871f Cranelift: Don't use raw-dylib in std 2024-02-25 10:22:34 -03:00
bjorn3
0061bb7faf Merge commit '3e50cf65025f96854d6597e80449b0d64ad89589' into sync_cg_clif-2024-01-26 2024-01-26 18:33:45 +00:00
David Tolnay
b192f911d5 Rebase slice_group_by stabilization PR 2024-01-25 22:20:59 -08:00
bjorn3
a4be90ed16 Merge commit '3a9bf729322fb5035518f99b9d76a742bf7c124e' into sync_cg_clif-2023-12-19 2023-12-19 12:46:39 +00:00
bjorn3
d49fd9f877 Merge commit 'c84d1871dc4456539b7b578830268ab3539915d0' into sync_cg_clif-2023-11-10 2023-11-10 11:30:51 +00:00
bjorn3
41dcb52153 Merge commit 'dde58803fd6cbb270c7a437f36a8a3a29fbef679' into sync_cg_clif-2023-10-29 2023-10-29 20:30:50 +00:00
bjorn3
a302610016 Merge commit '93a5433f17ab5ed48cc88f1e69b0713b16183373' into sync_cg_clif-2023-10-24 2023-10-24 12:22:23 +00:00
bjorn3
e472b5573a Merge commit 'c07d1e2f88cb3b1a0604ae8f18b478c1aeb7a7fa' into sync_cg_clif-2023-10-21 2023-10-21 19:54:51 +00:00
bjorn3
5d85a24442 Merge commit '81dc066758ec150b43822d4a0c84aae20fe10f40' into sync_cg_clif-2023-10-09 2023-10-09 08:52:46 +00:00
bjorn3
f2211c5242 Merge commit 'dda103b1e33c4902deca8bccf614991ada781fa6' into sync_cg_clif-2023-09-06 2023-09-06 18:51:03 +00:00
bjorn3
59cabd7032 Merge commit '8f9ac9c22d6594cf059d8e6c71d414cc5ccd7975' into sync_cg_clif-2023-08-09 2023-08-09 18:20:12 +00:00