Commit Graph

233883 Commits

Author SHA1 Message Date
Matthias Krüger
5dc37c1966
Rollup merge of #115736 - Zoxc:time-cleanup, r=wesleywiser
Remove `verbose_generic_activity_with_arg`

This removes `verbose_generic_activity_with_arg` and changes users to `generic_activity_with_arg`. This keeps the output of `-Z time` readable while these repeated events are still available with the self profiling mechanism.
2023-09-13 18:37:41 +02:00
bors
5adddad28c Auto merge of #115797 - cjgillot:const-prop-noclone, r=oli-obk
Do not clone the Body for ConstProp

~Based on https://github.com/rust-lang/rust/pull/115748 for the `POST_MONO_CHECKS` flag.~
2023-09-13 16:30:07 +00:00
bohan
7c53e87d55 fix: skip opt if body has tainted error 2023-09-13 23:07:39 +08:00
Matthew Jasper
e324a59eb6 Address review comments
- Add doc comment to new type
- Restore "only supported directly in conditions of `if` and `while` expressions" note
- Rename variant with clearer name
2023-09-13 15:00:31 +00:00
bors
76e59c71e8 Auto merge of #115803 - RalfJung:const-eval, r=oli-obk
make the eval() functions on our const types return the resulting value

This is a part of https://github.com/rust-lang/rust/pull/115748 that's hopefully perf-neutral, and that does not depend on https://github.com/rust-lang/rust/pull/115764.
2023-09-13 14:41:55 +00:00
Nikolay Arhipov
41ee874fa9 Disabled socketpair for Vita 2023-09-13 16:41:38 +03:00
bors
735bb7e5df Auto merge of #115269 - bvanjoi:fix-113834, r=petrochenkov
resolve: mark binding is determined after all macros had been expanded

Fixes #113834
Fixes #115377

r? `@petrochenkov`
2023-09-13 12:11:53 +00:00
Guillaume Gomez
9944f01c66 Merge settings.css into rustdoc.css 2023-09-13 13:59:43 +02:00
John Kåre Alsaker
c64e15e817 Bring back verbose_generic_activity_with_arg 2023-09-13 13:41:19 +02:00
John Kåre Alsaker
9624c30965 Generate MIR pass names for profiling on the fly and pass the body DefId as argument 2023-09-13 13:41:19 +02:00
bors
7e0261e7ea Auto merge of #115735 - bjorn3:better_list_crate_metadata, r=wesleywiser
Extend rustc -Zls

This makes it show a lot more things and thus a lot more useful.
2023-09-13 10:23:57 +00:00
Ralf Jung
8ef6b7a417 restore the old logic adjusting ty::UnevaluatedConst before evaluation 2023-09-13 11:47:21 +02:00
bohan
f1536507e1 resolve: determined binding after parent module macro expand 2023-09-13 16:38:05 +08:00
bors
38a16ef731 Auto merge of #115810 - nnethercote:folding-comments, r=WaffleLapkin
Folding comments

r? `@WaffleLapkin`
2023-09-13 07:38:50 +00:00
Nicholas Nethercote
4d8e50b2d3 Comments to clarify the working of HasTypeFlagsVisitor. 2023-09-13 16:50:35 +10:00
Nicholas Nethercote
df98a74c32 Explain why TypeFoldable is a sub-trait of TypeVisitable. 2023-09-13 16:50:35 +10:00
Nicholas Nethercote
593373f17d Fix some minor mistakes in comments. 2023-09-13 16:50:26 +10:00
Ralf Jung
11a4a24d8e make the set of methods between our two Const types more consistent 2023-09-13 07:29:34 +02:00
Ralf Jung
6e4779ab17 make the eval() functions on our const types return the resulting value 2023-09-13 07:29:34 +02:00
bors
1fe747c160 Auto merge of #115793 - spastorino:smir-explicit-predicates-of, r=oli-obk
Add explicit_predicates_of to SMIR

Adding `explicit_predicates_of` so we can use it from Mir formality.

r? `@oli-obk`
2023-09-13 04:51:19 +00:00
bors
8e455dba67 Auto merge of #115706 - RalfJung:compiletest-truncation, r=wesleywiser
Make compiletest output truncation less disruptive

When the test output becomes too large, compiletest stops recording all of it. However:
- this can lead to invalid JSON, which then causes compiletest itself to throw further errors
- the note that output was truncated is in the middle of the output, with >100kb of text on each side; that makes it almost impossible to actually see that note in the terminal

So assuming that we do need to keep the output truncation, I propose that we only ever do a cut at the end, so that it is very clear by looking at the end of the log that truncation happened. I added a message at the beginning of the output as well. Also I added some logic to make it less likely that we'll cut things off in the middle of a JSON record. (I tested that successfully by reducing the output limit to something very low and running a few ui tests.) Furthermore I increased the max buffer size to 512KB; that's really not a lot of memory compared to how much RAM it takes to build rustc (it's ~25% more than the previous maximum HEAD+TAIL length). And finally, the information that things got truncated is now propagated to the higher levels, so that we can fail the test instead of comparing the truncated output with the reference.

Fixes https://github.com/rust-lang/rust/issues/115675
Fixes https://github.com/rust-lang/rust/issues/96229
Fixes https://github.com/rust-lang/rust/issues/94322
Fixes https://github.com/rust-lang/rust/issues/92211
2023-09-13 01:54:47 +00:00
bors
367db835dc Auto merge of #115785 - fmease:fix-pat-regression, r=wesleywiser
Only suggest turbofish in patterns if we may recover

Fixes [after backport] #115780.

CC #103534.
2023-09-13 00:05:33 +00:00
bors
d9c8274fb7 Auto merge of #115800 - RalfJung:miri, r=RalfJung
update Miri

r? `@ghost`
2023-09-12 21:30:25 +00:00
Camille GILLOT
d0cba3df97 Do not fetch type to check generator. 2023-09-12 20:17:55 +00:00
Camille GILLOT
108decec53 Do not clone body for ConstProp. 2023-09-12 20:17:55 +00:00
Camille GILLOT
32fe00ae85 Reuse CollectAndPatch for normal ConstProp. 2023-09-12 20:17:55 +00:00
Camille GILLOT
8a3a0dd64e Store a ConstantKind in CollectAndPatch. 2023-09-12 20:17:55 +00:00
Camille GILLOT
054ed8e7eb Introduce Machine::POST_MONO_CHECKS. 2023-09-12 20:17:52 +00:00
bors
960a5edf67 Auto merge of #115128 - davidtwco:re-enable-debuginfo-test, r=wesleywiser
tests: re-enable pretty-std-collections on macOS

Fixes #78665.

I made some small modifications to this test so that it would pass for me locally (though I was only able to test using lldb without built-in Rust support, but that seems to be the mode in which it would fail). I ran it a few hundred times with stage one and stage two to see if I could re-produce the spurious failures that were being reported in #78665 and couldn't. From the discussion in #78665, it seemed like this was related to Xcode versions and could be reproduced locally fairly easily. It's been a couple years since this was disabled so a lot has changed. If this starts failing spuriously again then we can disable it and I can look into that.

r? `@wesleywiser` (discussed in wg-debugging's triage meeting)
2023-09-12 19:39:27 +00:00
bors
8cd31eadba Auto merge of #3055 - eduardosm:x86-sse2-intrinsics, r=RalfJung
Implement some `llvm.x86.sse2.*` intrinsics and add tests

Continuation of https://github.com/rust-lang/miri/pull/2989 with SSE2 intrinsics.

Thankfully, a significant amount of SSE2 functions use `simd_*` intrinsics, which are already implemented in Miri.
2023-09-12 18:55:17 +00:00
Ralf Jung
60091fe924 add helper method for finding the one non-1-ZST field 2023-09-12 20:52:05 +02:00
Santiago Pastorino
3678dbc382
Add explicit_predicates_of to SMIR 2023-09-12 15:12:02 -03:00
Eduardo Sánchez Muñoz
ab927c87cd Implement some llvm.x86.sse2.* intrinsics and add tests
Implements LLVM intrisics needed to run most SSE2 functions from `core::arch::x86{,_64}`.

Also adds miri tests for those functions (mostly copied from core_arch tests).
2023-09-12 19:44:59 +02:00
Eduardo Sánchez Muñoz
9df62ad5e1 Ignore all archs except x86 and x86_64 in SSE tests 2023-09-12 19:44:59 +02:00
Eduardo Sánchez Muñoz
8a5f7f25af Fix a few typos in shims/x86/sse.rs comments 2023-09-12 19:29:07 +02:00
Philipp Krones
780cbf34a0
Update Cargo.lock (ui_test update) 2023-09-12 18:44:34 +02:00
Philipp Krones
9ff2e4e5d1
Merge commit '98363cbf6a7c3f8b571a7d92a3c645bb4376e4a6' into clippyup 2023-09-12 18:44:06 +02:00
bjorn3
026faca4ca Fix two typos 2023-09-12 14:42:53 +00:00
León Orell Valerian Liehr
3ed77e98fa
Only suggest turbofish in patterns if we may recover 2023-09-12 16:38:59 +02:00
bors
e5fedceabf Auto merge of #115215 - ouz-a:mir_issue, r=lcnr
Remove assert that checks type equality

https://github.com/rust-lang/rust/pull/112307 although this prevented `unsound` issues it also seems to introduce regressions https://github.com/rust-lang/rust/issues/114858 is example of this regression. I locally tested this https://github.com/rust-lang/rust/issues/114858#issuecomment-1686502262 issue and failing assert is [this](https://www.diffchecker.com/cjb7jSQm/).

This is also related to https://github.com/rust-lang/rust/pull/115025
2023-09-12 13:27:29 +00:00
Ralf Jung
fd91dfb494 cleanup leftovers of const_err lint 2023-09-12 13:41:42 +02:00
bors
5f6ee65f59 Auto merge of #115728 - chenyukang:yukang-fix-diag-generic-parameters, r=cjgillot
Cleanup unused labels in messages.ftl

These labels were not used, maybe because we removed the diagnostics but forgot them.
2023-09-12 11:29:22 +00:00
bors
cc7a9d6972 Auto merge of #115705 - cjgillot:const-prop-aggregate, r=oli-obk
Read from non-scalar constants and statics in dataflow const-prop

DataflowConstProp is designed to handle scalar values. When MIR features an assignment from a non-scalar constant, we need to manually decompose it into the custom state space.

This PR tweaks interpreter callbacks to allow reusing `eval_mir_constant` without having a stack frame to get a span from.

r? `@oli-obk`
cc `@jachris`
2023-09-12 09:02:27 +00:00
bors
deb708af12 Auto merge of #115678 - RalfJung:abi-compat-test, r=petrochenkov
test ABI compatibility for some unsized types as well

and test for what `DispatchFromDyn` needs.

Also I ran this on a whole bunch of targets via Miri and added enough `cfg` to make it all work, as documentation for what does and doesn't currently work. (Most of those targets do not have their tests run on CI anyway.)

Here's the shell rune I used for that:
```
for TARGET in x86_64-unknown-linux-gnu x86_64-pc-windows-gnu aarch64-unknown-linux-gnu s390x-unknown-linux-gnu mips64-unknown-linux-gnuabi64 sparc64-unknown-linux-gnu  powerpc64-unknown-linux-gnu powerpc64le-unknown-linux-gnu riscv64gc-unknown-linux-gnu loongarch64-unknown-linux-gnu wasm32-unknown-unknown; do
   BOOTSTRAP_SKIP_TARGET_SANITY=1 ./x.py run miri --stage 0 --args tests/ui/abi/compatibility.rs --target $TARGET;
done
```
2023-09-12 07:11:48 +00:00
bors
259b4f0b1c Auto merge of #3060 - RalfJung:abi, r=RalfJung
extra ABI tests, in particular for DispatchFromDyn
2023-09-12 06:51:36 +00:00
Ralf Jung
f8809ab911 extra ABI tests, in particular for DispatchFromDyn 2023-09-12 08:50:31 +02:00
bors
ea488f7864 Auto merge of #3059 - rust-lang:rustup-2023-09-12, r=RalfJung
Automatic sync from rustc
2023-09-12 05:38:25 +00:00
The Miri Conjob Bot
1916a4a524 fmt 2023-09-12 05:33:59 +00:00
The Miri Conjob Bot
5e992f334c Merge from rustc 2023-09-12 05:31:58 +00:00
Ralf Jung
6f2c051aba add some DispatchFromDyn ABI compatibility tests 2023-09-12 07:27:17 +02:00