Commit Graph

3416 Commits

Author SHA1 Message Date
bjorn3
ee3721eec6 Rustup to rustc 1.71.0-nightly (f49560538 2023-04-28) 2023-04-29 11:16:48 +00:00
bjorn3
72022bb24d Sync from rust f495605381 2023-04-29 11:10:56 +00:00
Boxy
2f624db5ea rename needs_infer to has_infer 2023-04-27 08:35:19 +01:00
Scott McMurray
065d81ac6f Lower intrinsics::offset to mir::BinOp::Offset
They're semantically the same, so this means the backends don't need to handle the intrinsic and means fewer MIR basic blocks in pointer arithmetic code.
2023-04-25 19:23:45 -07:00
bjorn3
0c79ce3bac Add two fixmes 2023-04-25 17:40:12 +00:00
bjorn3
c5be67ba36 Pass all extra args in rustc-clif before user supplied args
This allows the user to overwrite them and prevents confusing error
messages if the last argument supplied expects a value.
2023-04-25 17:39:20 +00:00
bjorn3
a7c797909c Make rustdoc using run-make tests work 2023-04-25 13:43:27 +00:00
bjorn3
b56d4ab66b Update portable-simd test 2023-04-25 12:32:24 +00:00
bjorn3
669b1e367c Rustup to rustc 1.71.0-nightly (f5559e338 2023-04-24) 2023-04-25 11:37:18 +00:00
bjorn3
1c978ee516 Sync from rust f5559e3382 2023-04-25 11:32:28 +00:00
Matthias Krüger
b908472a93 Revert "Remove #[alloc_error_handler] from the compiler and library"
This reverts commit abc0660118.
2023-04-25 00:08:35 +02:00
Maybe Waffle
106db3ef59 Fix rustc_index imports outside the compiler 2023-04-24 13:53:37 +00:00
Maybe Waffle
dd172d08d4 Split {Idx, IndexVec, IndexSlice} into their own modules 2023-04-24 13:53:35 +00:00
bors
c7155f2a78 Auto merge of #109507 - Amanieu:panic-oom-payload, r=davidtwco
Report allocation errors as panics

OOM is now reported as a panic but with a custom payload type (`AllocErrorPanicPayload`) which holds the layout that was passed to `handle_alloc_error`.

This should be review one commit at a time:
- The first commit adds `AllocErrorPanicPayload` and changes allocation errors to always be reported as panics.
- The second commit removes `#[alloc_error_handler]` and the `alloc_error_hook` API.

ACP: https://github.com/rust-lang/libs-team/issues/192

Closes #51540
Closes #51245
2023-04-22 12:27:45 +00:00
bors
6b80e9c0a6 Auto merge of #106934 - DrMeepster:offset_of, r=WaffleLapkin
Add offset_of! macro (RFC 3308)

Implements https://github.com/rust-lang/rfcs/pull/3308 (tracking issue #106655) by adding the built in macro `core::mem::offset_of`. Two of the future possibilities are also implemented:

* Nested field accesses (without array indexing)
* DST support (for `Sized` fields)

I wrote this a few months ago, before the RFC merged. Now that it's merged, I decided to rebase and finish it.

cc `@thomcc` (RFC author)
2023-04-22 00:10:44 +00:00
bjorn3
805c4a27f5 Rustup to rustc 1.71.0-nightly (8bdcc62cb 2023-04-20) 2023-04-21 10:30:13 +00:00
bjorn3
8b229bb245 Update Cranelift to 0.95.0 2023-04-21 09:38:59 +00:00
DrMeepster
9dd0653ed5 offset_of 2023-04-21 02:14:02 -07:00
Camille GILLOT
22e6885de0 Remove WithOptconstParam. 2023-04-20 17:48:32 +00:00
bjorn3
10bdc6a99e Rustup to rustc 1.71.0-nightly (d0f204e4d 2023-04-16) 2023-04-17 09:40:38 +00:00
bjorn3
ea641ed35b Sync from rust d0f204e4d7 2023-04-17 09:35:42 +00:00
Amanieu d'Antras
2ead2f56c0 Remove #[alloc_error_handler] from the compiler and library 2023-04-16 08:35:50 -07:00
Camille GILLOT
fe3e38306f Remove from cranelift too. 2023-04-14 16:26:11 +00:00
bjorn3
4ece6d0e44 Minor build perf optimization 2023-04-13 13:29:00 +00:00
bjorn3
41866bf2f4 Fix a couple of 2018 edition warnings 2023-04-13 13:17:26 +00:00
bjorn3
4435686a48 Fix warnings when building the build system in rust's CI 2023-04-13 13:17:01 +00:00
bjorn3
51ac38190f Enable tls test on MSVC Windows 2023-04-13 13:15:36 +00:00
bjorn3
7b83e16d5b Workaround bug in rustc when panicking for -Cpanic=abort 2023-04-13 13:15:13 +00:00
bjorn3
dfaeab8c5c Fix rustc test suite
A lot of tests were moved from run-make-fulldeps to run-make. Only the
later test suite is currently tested.
2023-04-10 13:43:51 +00:00
bjorn3
45eb938b09 Rustup to rustc 1.70.0-nightly (af06dce64 2023-04-08) 2023-04-09 15:12:19 +00:00
bjorn3
8b447bcdd8 Sync from rust af06dce64b 2023-04-09 15:06:45 +00:00
bjorn3
c4b379460f Use --nocapture instead of RUST_TEST_NOCAPTURE
RUST_TEST_NOCAPTURE is no longer respected
2023-04-09 13:25:41 +00:00
bjorn3
c7053b391c Set a timeout of 1h for the "Various rustc tests" GHA workflow
Fixes #1368
2023-04-09 13:01:10 +00:00
bjorn3
9970b04646 Don't deadlock when failing to acquire a jobserver token 2023-04-09 12:58:45 +00:00
Gary Guo
446650cb00 Rename Abort terminator to Terminate
Unify terminology used in unwind action and terminator, and reflect
the fact that a nounwind panic is triggered instead of an immediate
abort is triggered for this terminator.
2023-04-06 09:34:16 +01:00
Gary Guo
9da329d243 Refactor unwind from Option to a new enum 2023-04-06 09:34:16 +01:00
Scott McMurray
dc5a8c8881 Use FieldIdx in various things related to aggregates
Shrank `AggregateKind` by 8 bytes on x64, since the active field of a union is tracked as an `Option<FieldIdx>` instead of `Option<usize>`.
2023-04-01 20:32:50 -07:00
bors
e2e598f5fb Auto merge of #98112 - saethlin:mir-alignment-checks, r=oli-obk
Insert alignment checks for pointer dereferences when debug assertions are enabled

Closes https://github.com/rust-lang/rust/issues/54915

- [x] Jake tells me this sounds like a place to use `MirPatch`, but I can't figure out how to insert a new basic block with a new terminator in the middle of an existing basic block, using `MirPatch`. (if nobody else backs up this point I'm checking this as "not actually a good idea" because the code looks pretty clean to me after rearranging it a bit)
- [x] Using `CastKind::PointerExposeAddress` is definitely wrong, we don't want to expose. Calling a function to get the pointer address seems quite excessive. ~I'll see if I can add a new `CastKind`.~ `CastKind::Transmute` to the rescue!
- [x] Implement a more helpful panic message like slice bounds checking.

r? `@oli-obk`
2023-03-31 08:50:35 +00:00
Scott McMurray
69b57c2db5 Update ty::VariantDef to use IndexVec<FieldIdx, FieldDef>
And while doing the updates for that, also uses `FieldIdx` in `ProjectionKind::Field` and `TypeckResults::field_indices`.

There's more places that could use it (like `rustc_const_eval` and `LayoutS`), but I tried to keep this PR from exploding to *even more* places.

Part 2/? of https://github.com/rust-lang/compiler-team/issues/606
2023-03-30 09:23:40 -07:00
bjorn3
fd4e1d55ea Fix rustc test suite 2023-03-30 12:38:09 +00:00
bjorn3
dc7409c8ec Rustup to rustc 1.70.0-nightly (17c116721 2023-03-29) 2023-03-30 12:22:46 +00:00
bjorn3
86a71bf45b Sync from rust 17c1167216 2023-03-30 12:13:44 +00:00
Matthias Krüger
e88c4052c3 Rollup merge of #109716 - scottmcm:field-to-fieldidx, r=oli-obk
Move `mir::Field` → `abi::FieldIdx`

The first PR for https://github.com/rust-lang/compiler-team/issues/606

This is just the move-and-rename, because it's plenty big already.  Future PRs will start using `FieldIdx` more broadly, and concomitantly removing `FieldIdx::new`s.
2023-03-29 21:19:51 +02:00
John Kåre Alsaker
5a7ce4609e Support TLS access into dylibs on Windows 2023-03-29 08:55:21 +02:00
Scott McMurray
406eb96437 Move mir::Fieldabi::FieldIdx
The first PR for https://github.com/rust-lang/compiler-team/issues/606

This is just the move-and-rename, because it's plenty big-and-bitrotty already.  Future PRs will start using `FieldIdx` more broadly, and concomitantly removing `FieldIdx::new`s.
2023-03-28 22:22:37 -07:00
nils
37ab4bd419 Rollup merge of #108480 - Zoxc:rayon-tlv, r=cuviper
Use Rayon's TLV directly

This accesses Rayon's `TLV` thread local directly avoiding wrapper functions. This makes rustc work with https://github.com/rust-lang/rustc-rayon/pull/10.

r? `@cuviper`
2023-03-28 12:51:12 +02:00
bjorn3
b2796ecb77 Add issue reference to fixmes 2023-03-27 17:52:37 +00:00
bjorn3
edc05ae489 Improve public interface of CValue and CPlace 2023-03-27 17:14:40 +00:00
bjorn3
174b73e3c9 Refactor write_cvalue_maybe_transmute to clarify code flow 2023-03-27 16:50:04 +00:00
bjorn3
a5f11c7aeb Avoid CValue::const_val in a couple of places 2023-03-27 16:30:50 +00:00