Commit graph

18069 commits

Author SHA1 Message Date
est31
070fee2df3 Update miri, cargo-miri and miri-cript to edition 2024
Also update the format edition to 2024
2025-05-08 16:55:23 +02:00
Ralf Jung
4b8f88b251
Merge pull request #4310 from RalfJung/addr-space-conservation
alloc_addresses: when we are running out of addresses, start reusing more aggressively
2025-05-05 13:11:48 +00:00
Ralf Jung
84b3142e27
Merge pull request #4309 from RalfJung/both-borrows-tests
move tests that are identical between SB and TB to shared files
2025-05-05 13:10:12 +00:00
Ralf Jung
5c7f1d76cb alloc_addresses: when we are running out of addresses, start reusing more aggressively 2025-05-05 14:46:45 +02:00
Ralf Jung
aec861b5ae consistent folder naming: stacked-borrows -> stacked_borrows 2025-05-05 14:44:37 +02:00
Ralf Jung
70ef2504b9
Merge pull request #4306 from yoctocell/fix-unsafecell-inside-box
Tree Borrows: Correctly handle interior mutable data in `Box`
2025-05-05 11:58:34 +00:00
Ralf Jung
3f0d24ad4c move tests that are identical between SB and TB to shared files 2025-05-05 13:49:18 +02:00
Ralf Jung
f8a8bbd4c0
Merge pull request #4307 from JoJoDeveloping/remove-unique-is-unique
Remove -Zunique-is-unique
2025-05-05 06:47:59 +00:00
Johannes Hostert
30ecac8f74
Remove -Zunique-is-unique 2025-05-04 18:48:51 +02:00
The Miri Cronjob Bot
4d873493ad Merge from rustc 2025-05-03 05:00:21 +00:00
The Miri Cronjob Bot
8a166dc194 Preparing for merge from rustc 2025-05-03 04:53:15 +00:00
Xinglu Chen
45d4bb2541 Construct test so that it would fail for old code 2025-05-02 19:56:45 +02:00
Matthias Krüger
c796ef00f8
Rollup merge of #140521 - RalfJung:oob-error, r=saethlin
interpret: better error message for out-of-bounds pointer arithmetic and accesses

Fixes https://github.com/rust-lang/rust/issues/93881
r? `@saethlin`
2025-05-02 19:37:58 +02:00
Xinglu Chen
8b3637635b Correctly handle interior mutable data in Box
Previously, the pointee type would be behind a `*const` pointer, so
`ty_is_freeze` would always be `true`, even if there was an
`UnsafeCell` in `Box`.
2025-05-02 18:30:24 +02:00
Patrick-6
d940d0b758 Implement skeleton code for adding GenMC support to Miri (not yet functional).
- Add a cargo feature to enable GenMC support (off by default)
- Add support for GenMC datastructures to MiriMachine
- Adjust several functions where GenMC needs to be informed about relevant events (e.g., atomic accesses)
- Add skeleton code for parsing GenMC command line arguments
- Some cleanup
  - Finish sentences with a `.`
  - Fix some spelling errors/typos

Co-authored-by: Ralf Jung <post@ralfj.de>
2025-05-02 14:49:17 +02:00
bors
db074a06fe Auto merge of #140540 - flip1995:clippy-subtree-update, r=Manishearth
Clippy subtree update

r? `@Manishearth`
2025-05-02 07:33:32 +00:00
Ralf Jung
a8da0fd22d
Merge pull request #4305 from RalfJung/squash
add ./miri squash
2025-05-02 07:02:36 +00:00
Ralf Jung
e2d2c56b2e add ./miri squash 2025-05-02 08:35:56 +02:00
Guillaume Gomez
d42e3ace2b
Rollup merge of #140556 - GuillaumeGomez:improve-rustdoc-gui-tool-error-output, r=clubby789
Improve error output in case `nodejs` or `npm` is not installed for rustdoc-gui test suite

Fixes https://github.com/rust-lang/rust/issues/138134.

It now looks like this:

![Screenshot From 2025-05-01 17-41-12](https://github.com/user-attachments/assets/ae7f2b37-3619-47ff-941d-5d9a7cdd9b6b)

cc ``@kpreid``
2025-05-01 22:27:25 +02:00
Guillaume Gomez
5a25a7a020
Rollup merge of #140034 - RalfJung:simd_select_bitmask-padding, r=workingjubilee
simd_select_bitmask: the 'padding' bits in the mask are just ignored

Fixes https://github.com/rust-lang/rust/issues/137942: we documented simd_select_bitmask to require the 'padding' bits in the mask (the mask can sometimes be longer than the vector; I am referring to these extra bits as 'padding' here)  to be zero, mostly because nobody felt like doing the research for what should be done when they are non-zero. However, codegen is already perfectly happy just ignoring them, so in practice they can have any value. Some of the intrinsic wrappers in stdarch have trouble ensuring that they are zero. So let's just adjust the docs and Miri to permit non-zero 'padding' bits.

Cc ````@Amanieu```` ````@workingjubilee````
2025-05-01 22:27:22 +02:00
Guillaume Gomez
bc68d3a144 Improve error output in case nodejs or npm is not installed for rustdoc-gui test suite 2025-05-01 17:42:22 +02:00
Ralf Jung
8bbea47fdb
Merge pull request #4273 from yoctocell/new-cell-state
TB: add `Cell` state to support more fine-grained tracking of interior mutable data
2025-05-01 10:06:52 +00:00
Xinglu Chen
8cc866d25e Add Cell state to Tree Borrows 2025-05-01 09:41:19 +00:00
Philipp Krones
c9992d6c54
Merge commit '03a5b6b976' into clippy-subtree-update 2025-05-01 10:22:55 +02:00
The Miri Cronjob Bot
7adaa50448 fmt 2025-05-01 05:02:17 +00:00
The Miri Cronjob Bot
326d77516d Merge from rustc 2025-05-01 05:01:02 +00:00
The Miri Cronjob Bot
589200ea5e Preparing for merge from rustc 2025-05-01 04:53:52 +00:00
Matthias Krüger
5cb54f99b4
Rollup merge of #140486 - calebcartwright:rustfmt-let-chain-bool-lit, r=calebcartwright
rustfmt: Also allow bool literals as first item of let chain

This is a functional cherry-pick of https://github.com/rust-lang/rustfmt/pull/6492

I'm bringing this change over directly as the subtree sync is taking more effort than anticipated (some unrelated r-l/rustfmt changes need to be reverted before we perform the full sync) and we need to ensure that rustfmt behavior accounts with the final style guide rules as part of let chain stabilization.

r? ````@ghost````
2025-04-30 22:36:43 +02:00
Matthias Krüger
f8f4d2d82a
Rollup merge of #140385 - lnicola:sync-from-ra, r=Veykril
Subtree update of `rust-analyzer`

r? ````@ghost````
2025-04-30 22:36:38 +02:00
Ralf Jung
00f25a8e1c interpret: better error message for out-of-bounds pointer arithmetic and accesses 2025-04-30 18:45:41 +02:00
bors
7188f45311 Auto merge of #140503 - matthiaskrgr:rollup-n7zigts, r=matthiaskrgr
Rollup of 11 pull requests

Successful merges:

 - #136160 (Remove backticks from `ShouldPanic::YesWithMessage`'s `TrFailedMsg`)
 - #139059 (uses_power_alignment: wording tweaks)
 - #139192 (mention provenance in the pointer::wrapping_offset docs)
 - #140312 (Improve pretty-printing of braces)
 - #140404 (rm `TypeVistable` impls for `Canonical`)
 - #140437 (enable msa feature for mips in codegen tests)
 - #140438 (Add `rust.debug-assertions-tools` option)
 - #140439 (miri: algebraic intrinsics: bring back float non-determinism)
 - #140445 (Treat ManuallyDrop as ~const Destruct)
 - #140446 (chore: fix some tests)
 - #140448 (Rename `rustc_query_append!` to `rustc_with_all_queries!`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-04-30 12:09:10 +00:00
Matthias Krüger
89ad574330
Rollup merge of #140446 - mejrs:test1, r=jieyouxu
chore: fix some tests
2025-04-30 10:18:29 +02:00
Matthias Krüger
254f050eb4
Rollup merge of #140439 - RalfJung:miri-algebraic-float-nondet, r=oli-obk
miri: algebraic intrinsics: bring back float non-determinism

Fixes https://github.com/rust-lang/miri/issues/4289
Cc ```@bjoernager```
r? ```@oli-obk```
2025-04-30 10:18:28 +02:00
Vadim Petrochenkov
20faf8532b compiletest: Make diagnostic kind mandatory on line annotations 2025-04-30 10:44:24 +03:00
Caleb Cartwright
04300d84bd Also allow bool literals as first item of let chain
Co-authored-by: est31 <est31@users.noreply.github.com>
2025-04-29 15:36:23 -05:00
Ralf Jung
bbcc6a24cd add -Zmiri-deterministic-concurrency flag and use it for concurrency tests 2025-04-29 20:08:25 +02:00
Trevor Gross
f7110fa756
Rollup merge of #140392 - Zalathar:goodbye-libtest, r=jieyouxu
compiletest: Remove the libtest-based executor and its dependency

Now that #140288 has landed and the new compiletest executor is used by default, we can now move forward with removing the libtest dependency from compiletest.

My hope is that after landing this, we can configure bootstrap to build compiletest with the pre-built stage0 library by default, instead of the in-tree stage0 library. That would give the stage0 redesign one less thing to worry about.

---

This PR has deliberately been kept small and simple, to make it easier to revert if necessary. Further cleanup can take palce after we're confident that it won't need to be reverted.

r? jieyouxu

Blocker for https://github.com/rust-lang/rust/pull/119899
2025-04-29 12:28:23 -04:00
Trevor Gross
a20fe8ff23
Rollup merge of #139909 - oli-obk:or-patterns, r=BoxyUwU
implement or-patterns for pattern types

These are necessary to represent `NonZeroI32`, as the range for that is `..0 | 1..`. The `rustc_scalar_layout_range_*` attributes avoided this by just implementing wraparound and having a single `1..=-1` range effectively. See https://rust-lang.zulipchat.com/#narrow/channel/481660-t-lang.2Fpattern-types/topic/.60or.20pattern.60.20representation.20in.20type.20system/with/504217694 for some background discussion

cc https://github.com/rust-lang/rust/issues/123646

r? `@BoxyUwU`
2025-04-29 12:28:22 -04:00
Ralf Jung
f521fa0c54
Merge pull request #4272 from geetanshjuneja/scheduling
Make thread scheduling fully random
2025-04-29 15:49:27 +00:00
Ralf Jung
76992ce41e
fix comment typos 2025-04-29 17:24:48 +02:00
Ralf Jung
47e111a03c move EnvVars::cleanup into the main-thread-exit handler 2025-04-29 17:08:51 +02:00
geetanshjuneja
ef5834968e Added random scheduling 2025-04-29 19:38:58 +05:30
mejrs
a4ce307c01 Coalesce duplicate missing clone tests 2025-04-29 12:46:26 +02:00
Ralf Jung
2393e447eb miri: algebraic intrinsics: bring back float non-determinism 2025-04-29 11:05:06 +02:00
Ralf Jung
0917a07264 suppress dangerous_implicit_autorefs in TB test 2025-04-29 08:53:22 +02:00
The Miri Cronjob Bot
c2973c949d fmt 2025-04-29 06:25:01 +00:00
The Miri Cronjob Bot
55e2c01d9c Merge from rustc 2025-04-29 06:23:41 +00:00
The Miri Cronjob Bot
7953c9dda4 Preparing for merge from rustc 2025-04-29 06:16:28 +00:00
Chris Denton
17495e0030
Rollup merge of #139656 - scottmcm:stabilize-slice-as-chunks, r=dtolnay
Stabilize `slice_as_chunks` library feature

~~Draft as this needs #139163 to land first.~~

FCP: https://github.com/rust-lang/rust/issues/74985#issuecomment-2769963395

Methods being stabilized are:
```rust
impl [T] {
    const fn as_chunks<const N: usize>(&self) -> (&[[T; N]], &[T]);
    const fn as_rchunks<const N: usize>(&self) -> (&[T], &[[T; N]]);
    const unsafe fn as_chunks_unchecked<const N: usize>(&self) -> &[[T; N]];
    const fn as_chunks_mut<const N: usize>(&mut self) -> (&mut [[T; N]], &mut [T]);
    const fn as_rchunks_mut<const N: usize>(&mut self) -> (&mut [T], &mut [[T; N]]);
    const unsafe fn as_chunks_unchecked_mut<const N: usize>(&mut self) -> &mut [[T; N]];
}
```

~~(FCP's not done quite yet, but will in another day if I'm counting right.)~~ FCP Complete: https://github.com/rust-lang/rust/issues/74985#issuecomment-2797951535
2025-04-28 23:29:15 +00:00
bors
25cdf1f674 Auto merge of #140388 - GuillaumeGomez:rollup-aj9o3ch, r=GuillaumeGomez
Rollup of 7 pull requests

Successful merges:

 - #140056 (Fix a wrong error message in 2024 edition)
 - #140220 (Fix detection of main function if there are expressions around it)
 - #140249 (Remove `weak` alias terminology)
 - #140316 (Introduce `BoxMarker` to improve pretty-printing correctness)
 - #140347 (ci: clean more disk space in codebuild)
 - #140349 (ci: use aws codebuild for the `dist-x86_64-linux` job)
 - #140379 (rustc-dev-guide subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-04-28 17:22:11 +00:00