Commit Graph

3443 Commits

Author SHA1 Message Date
bjorn3
d2a8023948 Fix CirrusCI 2023-05-14 10:17:12 +00:00
bjorn3
e39191594f Support _mm_movemask_ps 2023-05-12 17:07:38 +00:00
bjorn3
899d193c9d Implement a couple more platform intrinsics 2023-05-12 17:07:31 +00:00
bjorn3
ecbb33a71b Implement and fix a couple more simd intrinsics 2023-05-12 13:25:58 +00:00
bjorn3
f6ba10dead Fix rustc test suite 2023-05-12 12:58:56 +00:00
bjorn3
9b2a0984e9 Rustup to rustc 1.71.0-nightly (2a8221dbd 2023-05-11) 2023-05-12 12:50:44 +00:00
bjorn3
d6656403a3 Sync from rust 2a8221dbdf 2023-05-12 12:45:38 +00:00
Kyle Matsuda
db3faa78d0 use EarlyBinder in tcx.(try_)subst_mir_and_normalize_erasing_regions 2023-05-06 22:32:39 -06:00
bjorn3
dfb11195da Replace once_cell with the newly stabilized std::sync::OnceLock 2023-05-05 18:55:34 +00:00
bjorn3
4ef286c038 Fix rustc test suite 2023-05-05 12:46:12 +00:00
bjorn3
332b54a6d3 Rustup to rustc 1.71.0-nightly (74c482104 2023-05-04) 2023-05-05 12:45:06 +00:00
bjorn3
7905fa92ce Fix rustc test suite 2023-05-04 11:24:58 +00:00
bjorn3
edd0e5df3b Rustup to rustc 1.71.0-nightly (473f916d8 2023-05-03) 2023-05-04 10:21:07 +00:00
bjorn3
b7decf2899 Sync from rust 473f916d83 2023-05-04 10:14:36 +00:00
Nicholas Nethercote
a4c49374cb Restrict From<S> for {D,Subd}iagnosticMessage.
Currently a `{D,Subd}iagnosticMessage` can be created from any type that
impls `Into<String>`. That includes `&str`, `String`, and `Cow<'static,
str>`, which are reasonable. It also includes `&String`, which is pretty
weird, and results in many places making unnecessary allocations for
patterns like this:
```
self.fatal(&format!(...))
```
This creates a string with `format!`, takes a reference, passes the
reference to `fatal`, which does an `into()`, which clones the
reference, doing a second allocation. Two allocations for a single
string, bleh.

This commit changes the `From` impls so that you can only create a
`{D,Subd}iagnosticMessage` from `&str`, `String`, or `Cow<'static,
str>`. This requires changing all the places that currently create one
from a `&String`. Most of these are of the `&format!(...)` form
described above; each one removes an unnecessary static `&`, plus an
allocation when executed. There are also a few places where the existing
use of `&String` was more reasonable; these now just use `clone()` at
the call site.

As well as making the code nicer and more efficient, this is a step
towards possibly using `Cow<'static, str>` in
`{D,Subd}iagnosticMessage::{Str,Eager}`. That would require changing
the `From<&'a str>` impls to `From<&'static str>`, which is doable, but
I'm not yet sure if it's worthwhile.
2023-05-03 08:44:39 +10:00
Ben Kimock
249a6f8fe1 Box AssertKind 2023-05-01 23:12:41 -04:00
Ralf Jung
d530c043f7 Merge from rustc 2023-04-30 22:35:29 +02:00
bjorn3
215dd7aa0d Add some extra instructions for using the precompiled builds 2023-04-29 13:31:06 +00:00
bjorn3
456ef8b39f Merge branch 'sync_from_rust' 2023-04-29 12:05:00 +00:00
bjorn3
8bf550e616 Merge commit 'ef07e8e60f994ec014d049a95591426fb92ebb79' into sync_cg_clif-2023-04-29 2023-04-29 12:00:43 +00:00
bjorn3
ef07e8e60f Integrate better with Cranelift's profiling infrastructure 2023-04-29 11:27:28 +00:00
bjorn3
517b5c1f1b Update Cranelift to 0.95.1
This version was released as part of a security fix for Wasmtime. The
fix didn't change Cranelift though, so this commit is not strictly
necessary, but also doesn't hurt.
2023-04-29 11:24:05 +00:00
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
Ralf Jung
7a77541c06 Merge from rustc 2023-04-28 15:49:39 +02:00
Boxy
2f624db5ea rename needs_infer to has_infer 2023-04-27 08:35:19 +01:00
Ralf Jung
20571f60bb Merge from rustc 2023-04-26 09:51:54 +02: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
Ralf Jung
fc7b3ebfe9 Merge from rustc 2023-04-24 11:59:11 +02: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
Ralf Jung
b05a03b4c5 Merge from rustc 2023-04-22 10:35:35 +02: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
Oli Scherer
fcbdfe1369 Merge from rustc 2023-04-17 09:14:45 +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