Commit Graph

253519 Commits

Author SHA1 Message Date
Zalathar
97bf553682 coverage: Detach MC/DC branch spans from regular branch spans
MC/DC's reliance on the existing branch coverage types is making it much harder
to improve branch coverage.
2024-04-22 21:55:33 +10:00
Zalathar
a892c2387e coverage: Add a mir-opt test for branch coverage of match arms 2024-04-22 21:55:33 +10:00
Zalathar
da37b14121 coverage: Move mir-opt coverage tests into a subdirectory 2024-04-22 21:55:33 +10:00
Zalathar
3de87feba2 coverage: Branch coverage tests for match arms 2024-04-22 21:55:33 +10:00
Zalathar
7f432dfb23 coverage: Branch coverage test for if-let and let-chains 2024-04-22 21:55:33 +10:00
Zalathar
4f7a47798e coverage: Branch coverage test for let-else 2024-04-22 21:55:33 +10:00
Michael Woerister
c373ec07c4 Improve ICE message for forbidden dep-graph reads. 2024-04-22 12:11:07 +02:00
bors
290d792411 Auto merge of #124250 - matthiaskrgr:rollup-b8tqsup, r=matthiaskrgr
Rollup of 3 pull requests

Successful merges:

 - #124240 (add a couple tests for fixed ICEs.)
 - #124245 (bootstrap: Promote some build_steps comments to docs)
 - #124246 (Add comma at one place in `abs()` documentation)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-04-22 10:01:27 +00:00
Matthias Krüger
c597ccf3f1
Rollup merge of #124246 - gurry:add-comma-in-abs-doc, r=jhpratt
Add comma at one place in `abs()` documentation

As suggested  by ``@RalfJung`` here: https://github.com/rust-lang/rust/pull/124184#discussion_r1573670533
2024-04-22 10:02:56 +02:00
Matthias Krüger
e4e660ef5d
Rollup merge of #124245 - workingjubilee:bootstrap-some-doc-comments, r=onur-ozkan
bootstrap: Promote some build_steps comments to docs

No new content, just makes some comments readable when viewing the docs with `--document-private-items`.
2024-04-22 10:02:55 +02:00
Matthias Krüger
3cd56f3bda
Rollup merge of #124240 - matthiaskrgr:tests_sunday, r=compiler-errors
add a couple tests for fixed ICEs.

Fixes https://github.com/rust-lang/rust/issues/121413
Fixes https://github.com/rust-lang/rust/issues/121463
Fixes https://github.com/rust-lang/rust/issues/114463
2024-04-22 10:02:55 +02:00
bors
b3e117044c Auto merge of #124236 - matthiaskrgr:n-ice, r=jieyouxu
crashes: add a couple more ICE tests
2024-04-22 07:57:04 +00:00
bors
2ca55244a9 Auto merge of #3461 - tiif:add_localtime_r_shim, r=RalfJung
Add localtime_r shim

- Implement ``localtime_r`` shim as mentioned in #2057

Note:
- ``tm_zone``, ``tm_gmtoff`` might not be consistent with ``libc::localtime_r`` as custom implementation is provided through ``chrono``. Due to the lack of daylight saving information in ``chrono``, ``is_dst`` value will always be ``-1``.
2024-04-22 06:41:07 +00:00
tiif
fde24ed5bf Add localtime_r shim 2024-04-22 06:30:10 +00:00
bors
32885838c0 Auto merge of #124112 - beetrees:incremental-os-str, r=Nadrieril
Fix ICE when there is a non-Unicode entry in the incremental crate directory

Fix the ICE that occurs when there is a non-Unicode entry in the incremental crate directory by replacing uses of `to_string_lossy` + `assert_no_characters_lost` with `to_str`. The added test would cause the compiler to ICE before this PR.
2024-04-22 04:00:58 +00:00
Gurinder Singh
06cd79bb5b Fix ICE when ADT tail has type error 2024-04-22 09:12:36 +05:30
Gurinder Singh
f31e4aef0b Add comma at one place in abs() documentation 2024-04-22 08:16:47 +05:30
bors
eb70af2e03 Auto merge of #124244 - saethlin:stdarch, r=workingjubilee
Update stdarch submodule

Most importantly, this pulls in https://github.com/rust-lang/stdarch/pull/1567 which is part of https://github.com/rust-lang/rust/pull/124050
2024-04-22 01:56:40 +00:00
Jubilee Young
9470e05550 bootstrap: Promote some build_steps comments to docs 2024-04-21 18:55:53 -07:00
Ben Kimock
9989d009c4 Update stdarch submodule 2024-04-21 21:35:17 -04:00
Michael Goulet
8995c2c4a2 Use sup instead of eq when unifying self type 2024-04-21 20:10:12 -04:00
Michael Goulet
93c6c0445d Restore error messaging 2024-04-21 20:10:12 -04:00
Michael Goulet
9d4f1d8b7e Check that predicate may hold BEFORE registering it in ocx 2024-04-21 20:10:12 -04:00
Michael Goulet
d9fec1321a Normalize xform_ret_ty after constrained 2024-04-21 20:10:12 -04:00
Michael Goulet
ff4653a08f Use fulfillment, not evaluate, during method probe 2024-04-21 20:10:12 -04:00
Michael Goulet
c13af7db21 Some early clean-ups in method probe 2024-04-21 20:10:12 -04:00
Eduardo Sánchez Muñoz
9b9c548156 Add -Zmiri-env-set to set environment variables without modifying the host environment
This option allows to pass environment variables to the interpreted program without needing to modify the host environment (which may have undesired effects in some cases).
2024-04-21 23:08:07 +02:00
bors
fb898629a2 Auto merge of #124241 - matthiaskrgr:rollup-xhu90xr, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #123840 (Add an intrinsic for `ptr::from_raw_parts(_mut)`)
 - #124224 (cleanup: unnecessary clone during lower generics args)
 - #124229 (Add gnullvm targets to manifest)
 - #124231 (remove from reviewers)
 - #124235 (Move some tests)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-04-21 21:08:03 +00:00
Matthias Krüger
a42adf2f95 add test for ICE caused by using feature(generic_const_exprs) #114463
Fixes #114463
2024-04-21 22:00:38 +02:00
Matthias Krüger
751f662b70 add test for ice #121463
Fixes #121463
2024-04-21 22:00:38 +02:00
Matthias Krüger
28f60ff9a4 add test for #121413
Fixes #121413
2024-04-21 22:00:38 +02:00
Matthias Krüger
3315bf961d
Rollup merge of #124235 - c410-f3r:tests98765, r=jieyouxu
Move some tests

r? `@petrochenkov`
2024-04-21 21:56:34 +02:00
Matthias Krüger
f277f3d653
Rollup merge of #124231 - BoxyUwU:dereview, r=Mark-Simulacrum
remove from reviewers

not gonna be around for a few weeks
2024-04-21 21:56:33 +02:00
Matthias Krüger
e96ed6d35d
Rollup merge of #124229 - mati865:add-gnullvm-targets-to-manifest, r=Mark-Simulacrum
Add gnullvm targets to manifest

Fixes an oversight from https://github.com/rust-lang/rust/pull/121712
2024-04-21 21:56:33 +02:00
Matthias Krüger
cd92422180
Rollup merge of #124224 - bvanjoi:cleanup, r=fmease
cleanup: unnecessary clone during lower generics args
2024-04-21 21:56:32 +02:00
Matthias Krüger
67872e740e
Rollup merge of #123840 - scottmcm:aggregate-kind-rawptr, r=cjgillot
Add an intrinsic for `ptr::from_raw_parts(_mut)`

Fixes #123174
cc `@CAD97` `@saethlin`
r? `@cjgillot`

As suggested in https://github.com/rust-lang/rust/pull/123190#issuecomment-2028717967, this adds a new `AggregateKind::RawPtr` for creating a pointer from its data pointer and its metadata.

That means that `slice::from_raw_parts` and friends no longer need to hard-code pointer layout into `libcore`, and because it no longer does union hacks the MIR is shorter and more amenable to optimizations.
2024-04-21 21:56:32 +02:00
bors
1b3fba066c Auto merge of #124203 - lukas-code:delete-deleting-caches, r=compiler-errors
fix normalizing in different `ParamEnv`s with the same `InferCtxt`

This PR changes the key of the projection cache from just `AliasTy` to `(AliasTy, ParamEnv)` to allow normalizing in different `ParamEnv`s without resetting caches. Previously, normalizing the same alias in different param envs would always reuse the cached result from the first normalization, which is incorrect if the projection clauses in the param env have changed.

Fixing this bug allows us to get rid of `InferCtxt::clear_caches`, which was only used by the `AutoTraitFinder`, because it requires normalizing in different param envs.

r? `@fmease`
2024-04-21 19:05:08 +00:00
Matthias Krüger
6774801563 crashes: add a couple more ICE tests 2024-04-21 21:04:32 +02:00
Caio
3aaa3941fd Move some tests 2024-04-21 15:43:43 -03:00
Scott McMurray
5e785b1420 Update tests after 123949 2024-04-21 11:24:54 -07:00
Scott McMurray
1398fe7a5e Address more PR feedback 2024-04-21 11:08:38 -07:00
Scott McMurray
e654877b2f Also handle AggregateKind::RawPtr in cg_cranelift 2024-04-21 11:08:37 -07:00
Scott McMurray
bb8d6f790b Address PR feedback 2024-04-21 11:08:37 -07:00
Scott McMurray
5e1d16ca55 Also handle AggregateKind::RawPtr in cg_cranelift 2024-04-21 11:08:37 -07:00
Scott McMurray
9520cebfc5 InstSimplify from_raw_parts(p, ())p as _ 2024-04-21 11:08:37 -07:00
Scott McMurray
de64ff76f8 Use it in the library, and InstSimplify it away in the easy places 2024-04-21 11:08:37 -07:00
Scott McMurray
4f4442655e Add an intrinsic that lowers to AggregateKind::RawPtr 2024-04-21 11:08:37 -07:00
Scott McMurray
e6b2b764ec Add AggregateKind::RawPtr and enough support to compile 2024-04-21 11:08:37 -07:00
Scott McMurray
70df9d9a13 Add a mir-opt test for byte_add on pointers 2024-04-21 11:08:36 -07:00
Scott McMurray
b76faff1b2 Add a MIR pre-codegen test for Vec::deref 2024-04-21 11:08:36 -07:00