Commit Graph

234918 Commits

Author SHA1 Message Date
bors
a456149187 Auto merge of #3086 - eduardosm:x86-sse3-intrinsics, r=RalfJung
Implement SSE3 and SSSE3 intrinsics
2023-09-30 20:29:22 +00:00
bors
935ced529d Auto merge of #3096 - sthibaul:master, r=RalfJung
Bump libloading to 0.8
2023-09-30 15:33:42 +00:00
Samuel Thibault
97bb8c80ed Bump libloading to 0.8 2023-09-30 15:59:14 +02:00
Eduardo Sánchez Muñoz
2c13713de4 Implement llvm.x86.ssse3.* intrinsics 2023-09-30 11:30:03 +02:00
Eduardo Sánchez Muñoz
4b2b0eaff2 Implement llvm.x86.sse3.* intrinsics 2023-09-30 11:30:03 +02:00
bors
a2395767f4 Auto merge of #3093 - eduardosm:llvm.x86.sse2.pmadd.wd, r=RalfJung
Implement the `llvm.x86.sse2.pmadd.wd` intrinsic
2023-09-29 15:26:51 +00:00
Eduardo Sánchez Muñoz
0c0c088e57 Implement the llvm.x86.sse2.pmadd.wd intrinsic 2023-09-29 16:12:37 +02:00
bors
7619edbe7a Auto merge of #3094 - RalfJung:float, r=RalfJung
add some float tests

Fixes https://github.com/rust-lang/miri/issues/2649
2023-09-29 05:35:40 +00:00
Ralf Jung
71030bae75 add FMA test that would fail with apfloat 2023-09-29 07:33:45 +02:00
Ralf Jung
2f7fdd1ee9 add tests for '%' sign on floats 2023-09-29 07:33:45 +02:00
bors
6ef11ddc3b Auto merge of #3092 - RalfJung:ui-test, r=RalfJung
update ui_test

In particular this includes https://github.com/oli-obk/ui_test/pull/167 :)
2023-09-28 14:40:54 +00:00
Ralf Jung
e0f4ab84a7 update lockfile 2023-09-28 16:42:07 +02:00
Ralf Jung
377730efe4 update ui_test 2023-09-28 16:34:07 +02:00
bors
024279a2e9 Auto merge of #3089 - rust-lang:rustup-2023-09-28, r=RalfJung
Automatic sync from rustc
2023-09-28 05:42:54 +00:00
The Miri Conjob Bot
f2623ac49b Merge from rustc 2023-09-28 05:19:36 +00:00
The Miri Conjob Bot
3b091cb504 Preparing for merge from rustc 2023-09-28 05:11:51 +00:00
bors
2ba4eb2d49 Auto merge of #116208 - matthiaskrgr:the_loop_that_wasnt, r=GuillaumeGomez
rustdoc: while -> if

we will always return once we step inside the while-loop thus `if` is sufficient here
2023-09-28 02:34:16 +00:00
bors
b9dd2ce408 Auto merge of #116204 - Alexendoo:rustc-lint-macro-paths, r=cjgillot
Use absolute paths in rustc_lint::passes macros

A cosmetic change, so the callsite doesn't have to import things. Makes nicer for us to try in clippy
2023-09-28 00:44:08 +00:00
bors
fbd4423b97 Auto merge of #116148 - DaniPopes:rustdoc-type-layout-ws, r=jsha
Fix whitespace in rustdoc type_layout.html

`Size: <size>` was missing a space after the colon:

![image](https://github.com/rust-lang/rust/assets/57450786/c5a672f3-a28a-4b56-91e7-a4e6ffc8106e)
2023-09-27 22:56:40 +00:00
bors
e7c502d930 Auto merge of #109597 - cjgillot:gvn, r=oli-obk
Implement a global value numbering MIR optimization

The aim of this pass is to avoid repeated computations by reusing past assignments. It is based on an analysis of SSA locals, in order to perform a restricted form of common subexpression elimination.

By opportunity, this pass allows for some simplifications by combining assignments. For instance, this pass could be able to see through projections of aggregates to directly reuse the aggregate field (not in this PR).

We handle references by assigning a different "provenance" index to each `Ref`/`AddressOf` rvalue. This ensure that we do not spuriously merge borrows that should not be merged. Meanwhile, we consider all the derefs of an immutable reference to a freeze type to give the same value:
```rust
_a = *_b // _b is &Freeze
_c = *_b // replaced by _c = _a
```
2023-09-27 21:06:30 +00:00
Matthias Krüger
809ab64e97 rustdoc: while -> if
we will always return once we step inside the while-loop thus `if` is sufficient here
2023-09-27 22:07:33 +02:00
bors
7b4b1b08b6 Auto merge of #114901 - compiler-errors:style-guide-wc, r=calebcartwright
Amend style guide section for formatting where clauses in type aliases

This PR has two parts:
1. Amend wording about breaking before or after the `=`, which is a style guide bugfix to align it with current rustfmt behavior.
2. Explain how to format trailing (#89122) where clauses, which are preferred in both GATs (#90076) and type aliases (#114662).

r? `@joshtriplett`
2023-09-27 19:17:30 +00:00
bors
d4589a492f Auto merge of #116202 - emmanuel-ferdman:wip, r=ehuss
Update location of `personality/gcc.rs`

**PR Summary**:
PR updates the location of `personality/gcc.rs` file in the docs.
2023-09-27 16:09:54 +00:00
Emmanuel Ferdman
08c4963a32
Update location of personality 2023-09-27 18:30:33 +03:00
Alex Macleod
17b1026448 Use absolute paths in rustc_lint::passes macros
A cosmetic change, so the callsite doesn't have to import things
2023-09-27 15:06:59 +00:00
bors
c4ce33cfbc Auto merge of #115887 - RalfJung:pat, r=oli-obk
thir::pattern: update some comments and error type names

Follow-up to [these comments](https://github.com/rust-lang/rust/pull/105750#pullrequestreview-1629697578). Please carefully fact-check, I'm new to this area of the compiler!
2023-09-27 13:20:53 +00:00
bors
92009f217a Auto merge of #116093 - RalfJung:link_llvm_intrinsics, r=oli-obk
make link_llvm_intrinsics and platform_intrinsics features internal

These are both a lot like `feature(intrinsics)`, just slightly different syntax, so IMO it should be treated the same (also in terms of: if you get ICEs with this feature, that's on you -- we are not doing "nice" type-checking for intrinsics).
2023-09-27 11:28:36 +00:00
bors
085acd02d4 Auto merge of #116193 - matthiaskrgr:rollup-wpt7m5t, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - #115934 (Split out the stable part of smir into its own crate to prevent accidental usage of forever unstable things)
 - #116149 (Anonymize binders for `refining_impl_trait` check)
 - #116178 (Add test for `const async fn`)
 - #116187 (Add context to `let: Ty = loop { break };`)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-09-27 08:45:44 +00:00
Matthias Krüger
a6f066596b
Rollup merge of #116187 - estebank:small-tweak, r=compiler-errors
Add context to `let: Ty = loop { break };`

We weren't accounting for the case where `break` was immediately within the `loop` block.
2023-09-27 10:42:35 +02:00
Matthias Krüger
243ce35b9f
Rollup merge of #116178 - Milo123459:milo/add-test-for-const-async-function-in-main, r=wesleywiser
Add test for `const async fn`

This adds a test for #102796
2023-09-27 10:42:35 +02:00
Matthias Krüger
50417a5457
Rollup merge of #116149 - compiler-errors:anonymize, r=lcnr
Anonymize binders for `refining_impl_trait` check

We're naively using the equality impl for `ty::Clause` in the refinement check, which is okay *except* for binders, which carry some information about where they come from in the AST. Those locations are not gonna be equal between traits and impls, so anonymize those clauses so that this doesn't matter.

Fixes #116135
2023-09-27 10:42:34 +02:00
Matthias Krüger
d4858878c1
Rollup merge of #115934 - oli-obk:smir_identity, r=spastorino
Split out the stable part of smir into its own crate to prevent accidental usage of forever unstable things

Some groundwork for being able to work on https://github.com/rust-lang/project-stable-mir/issues/27 at all

r? `@spastorino`
2023-09-27 10:42:34 +02:00
bors
1a3dd7ea7d Auto merge of #3087 - rust-lang:rustup-2023-09-27, r=RalfJung
Automatic sync from rustc
2023-09-27 06:51:43 +00:00
Ralf Jung
c8a44b1eaf clippy 2023-09-27 08:50:16 +02:00
The Miri Conjob Bot
b1f5c6683b Merge from rustc 2023-09-27 05:48:00 +00:00
The Miri Conjob Bot
fc0d833f6f Preparing for merge from rustc 2023-09-27 05:38:37 +00:00
bors
376f3f0590 Auto merge of #116166 - Zalathar:unreachable, r=cjgillot
Skip MIR pass `UnreachablePropagation` when coverage is enabled

When coverage instrumentation and MIR opts are both enabled, coverage relies on two assumptions:

- MIR opts that would delete `StatementKind::Coverage` statements instead move them into bb0 and change them to `CoverageKind::Unreachable`.

- MIR opts won't delete all `CoverageKind::Counter` statements from an instrumented function.

Most MIR opts naturally satisfy the second assumption, because they won't remove coverage statements from bb0, but `UnreachablePropagation` can do so if it finds that bb0 is unreachable. If this happens, LLVM thinks the function isn't instrumented, and it vanishes from coverage reports.

A proper solution won't be possible until after per-function coverage info lands in #116046, but for now we can avoid the problem by turning off this particular pass when coverage instrumentation is enabled.

---

cc `@cjgillot` since I found this while investigating coverage problems encountered by #113970
`@rustbot` label +A-code-coverage +A-mir-opt
2023-09-27 05:31:15 +00:00
bors
d206f2c085 Auto merge of #116189 - weihanglo:update-cargo, r=weihanglo
Update cargo

11 commits in 414d9e3a6d8096f3e276234ce220c868767a8792..e6aabe8b3fcf639be3a5bf68e77853bd7b3fa27d
2023-09-22 07:03:57 +0000 to 2023-09-26 16:31:53 +0000
- Use full target spec for `cargo rustc --print --target` (rust-lang/cargo#12743)
- feat(embedded): Hack in code fence support (rust-lang/cargo#12681)
- chore(ci): Update Renovate schema (rust-lang/cargo#12741)
- more specific registry index not found msg (rust-lang/cargo#12732)
- docs: warn about upload timeout (rust-lang/cargo#12733)
- Fix some typos (rust-lang/cargo#12730)
- upgrade gitoxide to v0.54 (rust-lang/cargo#12731)
- Update target-arch-aware crates to support mips r6 targets (rust-lang/cargo#12720)
- Buffer console status messages. (rust-lang/cargo#12727)
- Fix spurious errors with networking tests. (rust-lang/cargo#12726)
- refactor(SourceId): merge `name` and `alt_registry_key` into one enum (rust-lang/cargo#12675)

r? ghost
2023-09-27 03:41:23 +00:00
bors
6b99cf1d35 Auto merge of #116163 - compiler-errors:lazyness, r=oli-obk
Don't store lazyness in `DefKind::TyAlias`

1. Don't store lazyness of a type alias in its `DefKind`, but instead via a query.
2. This allows us to treat type aliases as lazy if `#[feature(lazy_type_alias)]` *OR* if the alias contains a TAIT, rather than having checks for both in separate parts of the codebase.

r? `@oli-obk` cc `@fmease`
2023-09-27 01:48:53 +00:00
Weihang Lo
0ff1254d91
Update cargo
New license exceptions from gix:

* (byteyarn", "Apache-2.0")
* ("encoding_rs", "(Apache-2.0 OR MIT) AND BSD-3-Clause")
2023-09-27 09:22:42 +08:00
bors
e1636a0939 Auto merge of #116156 - oli-obk:opaque_place_unwrap, r=compiler-errors
Only prevent field projections into opaque types, not types containing opaque types

fixes https://github.com/rust-lang/rust/issues/115778

I did not think that original condition through properly... I'll also need to check the similar check around the other `ProjectionKind::OpaqueCast` creation site (this one is in hir, the other one is in mir), but I'll do that change in another PR that doesn't go into a beta backport.
2023-09-27 00:03:53 +00:00
Esteban Küber
4b15959218 Add context to let: Ty = loop { break };
We weren't accounting for the case where `break` was immediately within
the `loop` block.
2023-09-26 23:46:10 +00:00
bors
5ae769f06b Auto merge of #116144 - lcnr:subst-less, r=oli-obk
subst -> instantiate

continues #110793, there are still quite a few uses of `subst` and `substitute`, but changing them all in the same PR was a bit too much, so I've stopped here for now.
2023-09-26 21:32:44 +00:00
Milo
35f9345076 add test
fix tidy

remove dir
2023-09-26 20:15:28 +00:00
bors
5899a80ae6 Auto merge of #116102 - cjgillot:indirect-scalar, r=oli-obk
Correct codegen of `ConstValue::Indirect` scalar and scalar pair

This concerns 3 tricky cases with `ConstValue::Indirect`:
- if we want a non-pointer scalar;
- if we have non-zero offset;
- if offset points to uninit memory => generate `poison` instead of an ICE. This case could happen in unreachable code, trying to extract a field from the wrong variant.

Those cases are not currently emitted by the compiler, but are exercised by https://github.com/rust-lang/rust/pull/116012.
2023-09-26 19:04:32 +00:00
Michael Goulet
305524d1d6 Anonymize binders for refining_impl_trait check 2023-09-26 18:11:12 +00:00
bors
6710e3312d Auto merge of #116154 - cjgillot:retain-cfg, r=oli-obk
Use Vec::retain in remove_dead_blocks.

r? `@ghost`
2023-09-26 17:16:20 +00:00
Camille GILLOT
901be42bc0 Explicit simplify_place. 2023-09-26 16:41:40 +00:00
bors
21627d60cf Auto merge of #116175 - matthiaskrgr:rollup-cwteiwy, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #116099 (Add regression test for issue #79865)
 - #116131 (Rename `cold_path` to `outline`)
 - #116151 (Fix typo in rustdoc unstable features doc)
 - #116153 (Update books)
 - #116162 (Gate and validate `#[rustc_safe_intrinsic]`)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-09-26 15:27:19 +00:00
Matthias Krüger
6f4a0a1eb2
Rollup merge of #116162 - fmease:gate-n-validate-rustc_safe_intrinsic, r=Nilstrieb
Gate and validate `#[rustc_safe_intrinsic]`

Copied over from #116159:

> This was added as ungated in https://github.com/rust-lang/rust/pull/100719/files#diff-09c366d3ad3ec9a42125253b610ca83cad6b156aa2a723f6c7e83eddef7b1e8fR502, probably because the author looked at the surrounding attributes, which are ungated because they are gated specially behind the staged_api feature.
>
> I don't think we need to crater this, the attribute is entirely useless without the intrinsics feature, which is already unstable..

r? ``@Nilstrieb``
2023-09-26 15:57:26 +02:00