Commit Graph

253577 Commits

Author SHA1 Message Date
bors
ca3defe245 Auto merge of #3532 - RalfJung:tb-protectors, r=RalfJung
Tree Borrows: first apply transition, then check protector with new 'initialized'
2024-05-02 09:17:18 +00:00
Ralf Jung
aa986f0800 Tree Borrows: first apply transition, then check protector with new 'initialized' 2024-05-02 11:09:01 +02:00
bors
b0bdbcc5e5 Auto merge of #3531 - narpfel:quiet-sysroot, r=RalfJung
Don’t print `Preparing a sysroot` when `-q`/`--quiet` is passed

Resolves #3530.

This also fixes a typo in `cargo miri --help` that I found while trying to run the `--print-sysroot` example.
2024-05-01 20:44:13 +00:00
Paul Gey
a2b3211b19 no longer strip Preparing a sysroot message from test output 2024-05-01 21:53:09 +02:00
Paul Gey
4b4262691d fix usage example for --print-sysroot 2024-05-01 21:53:09 +02:00
Paul Gey
1cf951e5c6 Don’t print Preparing a sysroot when -q/--quiet is passed 2024-05-01 21:53:02 +02:00
bors
1c7e82762f Auto merge of #3523 - saethlin:localtime_r-env, r=RalfJung
Use the interpreted program's TZ variable in localtime_r

This requires a bit of wiring and a new dependency, but the tests should correctly pass now regardless of what the host's time zone is.

Fixes https://github.com/rust-lang/miri/issues/3522
2024-04-29 15:35:27 +00:00
Ralf Jung
7afef08b6d don't leak UnixEnvVars impl details into get_env_var 2024-04-29 17:33:35 +02:00
Ben Kimock
9bed19edc4 Refactor UnixEnvVars::get so that it can be reused by getenv 2024-04-28 17:45:14 -04:00
Ben Kimock
622f697f5d Use the interpreted program's TZ variable in localtime_r 2024-04-28 11:09:29 -04:00
bors
bc8ea9324c Auto merge of #3524 - RalfJung:fd-write, r=RalfJung
file descriptors: make write take &mut self
2024-04-28 08:00:44 +00:00
Ralf Jung
b5482aad01 file descriptors: make write take &mut self 2024-04-28 09:39:20 +02:00
bors
5c6f95ca30 Auto merge of #3521 - eduardosm:avx2-2, r=RalfJung
Handle post-merge comments of AVX2 PR
2024-04-28 06:42:56 +00:00
Eduardo Sánchez Muñoz
b26153555f Do not implement x86 SIMD abs with host integers 2024-04-27 17:43:39 +02:00
Eduardo Sánchez Muñoz
b3b1b498b9 Clarify behavior of AVX2 gather when dest and offsets have different numbers of elements 2024-04-27 16:41:27 +02:00
Eduardo Sánchez Muñoz
ee47a8e6b6 Add doc comment to pack_generic 2024-04-27 16:23:44 +02:00
bors
45d93945ad Auto merge of #3520 - RalfJung:josh-check, r=RalfJung
josh rustc-pull: check that no new root commits get created

A second root was a bad sign in Miri (judging from the description in https://github.com/rust-lang/miri/pull/2583) and seems to be a [bad sign in RA](https://github.com/rust-lang/rust-analyzer/pull/17025#issuecomment-2080390014). So let's add this to the sanity checks.
2024-04-27 08:20:22 +00:00
bors
f5ceb4ed60 Auto merge of #3519 - hamirmahal:fix/usage-of-deprecated-version-of-nodejs, r=RalfJung
bump actions/cache to v4

fixes #3518.
2024-04-27 07:49:27 +00:00
Hamir Mahal
39f7a46d63
fix: usage of deprecated version of Node.js 2024-04-27 00:15:39 -07:00
Ralf Jung
2681edf934 josh rustc-pull: check that no new root commits get created 2024-04-27 08:57:55 +02:00
bors
3a74fae72d Auto merge of #3517 - RalfJung:env-vars, r=RalfJung
env: split up Windows and Unix environment variable handling

On Windows, manage them entirely outside the AM state; this also means we no longer report any data races for environment variable memory.

Fixes https://github.com/rust-lang/rust/issues/124411
2024-04-26 20:17:35 +00:00
Ralf Jung
454f09d891 env: split up Windows and Unix environment variable handling 2024-04-26 22:16:16 +02:00
Ralf Jung
26af88aced add test for concurrent env var access 2024-04-26 19:47:35 +02:00
bors
d7c89cfbf8 Auto merge of #3516 - RalfJung:pathbuf, r=RalfJung
add smoke tests for basic PathBuf interactions

I wrote these while debugging [this](https://github.com/rust-lang/miri-test-libstd/actions/runs/8849912635/job/24302962983); it turns out the issue is [more complicated](https://github.com/rust-lang/rust/issues/124409) but these tests still seemed worth keeping.
2024-04-26 15:47:17 +00:00
Ralf Jung
2935cd93c2 add smoke tests for basic PathBuf interactions 2024-04-26 17:44:37 +02:00
bors
82921058e7 Auto merge of #3515 - rust-lang:rustup-2024-04-26, r=oli-obk
Automatic Rustup
2024-04-26 05:27:00 +00:00
The Miri Cronjob Bot
4be9c689f6 Merge from rustc 2024-04-26 05:08:12 +00:00
The Miri Cronjob Bot
4dcc2fac06 Preparing for merge from rustc 2024-04-26 04:58:30 +00:00
bors
6acb9e75eb Auto merge of #120845 - petrochenkov:debmac, r=oli-obk
debuginfo: Stabilize `-Z debug-macros`, `-Z collapse-macro-debuginfo` and `#[collapse_debuginfo]`

`-Z debug-macros` is "stabilized" by enabling it by default and removing.

`-Z collapse-macro-debuginfo` is stabilized as `-C collapse-macro-debuginfo`.
It now supports all typical boolean values (`parse_opt_bool`) in addition to just yes/no.

Default value of `collapse_debuginfo` was changed from `false` to `external` (i.e. collapsed if external, not collapsed if local) - https://github.com/rust-lang/rust/issues/100758#issuecomment-1935815625 describes some debugging scenarios that motivate this default as reasonable.
`#[collapse_debuginfo]` attribute without a value is no longer supported to avoid guessing the default.

Stabilization report: https://github.com/rust-lang/rust/pull/120845#issuecomment-1939145242

Closes https://github.com/rust-lang/rust/issues/100758
Closes https://github.com/rust-lang/rust/issues/41743
Closes https://github.com/rust-lang/rust/issues/39153
2024-04-26 02:13:08 +00:00
Vadim Petrochenkov
683ad6b607 Update lldb only tests 2024-04-26 04:11:05 +03:00
bors
e59f2c544a Auto merge of #124388 - compiler-errors:rollup-v17b8fm, r=compiler-errors
Rollup of 4 pull requests

Successful merges:

 - #124076 (Stablise io_error_downcast)
 - #124378 (Keep the LIB env var in the compiler-builtins test)
 - #124379 (Remove special-casing for `SimplifiedType` for next solver)
 - #124381 (Renamed `DerivedObligation` to `WellFormedDeriveObligation`)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-04-26 00:10:56 +00:00
Michael Goulet
88eae31261
Rollup merge of #124381 - compiler-errors:derived-for-wf, r=lcnr
Renamed `DerivedObligation` to `WellFormedDeriveObligation`

It's used when computing `WellFormed` obligations, so let's give it a less ambiguous name.
2024-04-25 20:07:41 -04:00
Michael Goulet
4494140244
Rollup merge of #124379 - compiler-errors:remove-new-solver-lookup-behavior, r=lcnr
Remove special-casing for `SimplifiedType` for next solver

It's unnecessary due to the way that we fully normalize the self type before assembly begins.

r? lcnr
2024-04-25 20:07:41 -04:00
Michael Goulet
ef5e42af59
Rollup merge of #124378 - dpaoliello:keeplib, r=jieyouxu
Keep the LIB env var in the compiler-builtins test

The `tests/run-make/compiler-builtins` test was failing for me with Visual Studio 2022, complaining that it couldn't find `kernel32.lib`.

For whatever reason, with VS 2022 we need to keep the `LIB` environment variable when invoking Cargo so that the linker can find the Windows SDK libs.
2024-04-25 20:07:41 -04:00
Michael Goulet
6f5c69e65f
Rollup merge of #124076 - NobodyXu:patch-1, r=dtolnay
Stablise io_error_downcast

Tracking issue #99262
Closes #99262

FCP completed in https://github.com/rust-lang/rust/issues/99262#issuecomment-2077374397
2024-04-25 20:07:40 -04:00
Michael Goulet
132f8ce3dc Renamed DerivedObligation to WellFormedDeriveObligation 2024-04-25 16:55:15 -04:00
Daniel Paoliello
29f2e27156 Keep the LIB env var in the compiler-builtins test 2024-04-25 13:49:46 -07:00
bors
3a36386dc1 Auto merge of #124386 - matthiaskrgr:rollup-0a6yr00, r=matthiaskrgr
Rollup of 3 pull requests

Successful merges:

 - #124313 (Detect borrow error involving sub-slices and suggest `split_at_mut`)
 - #124374 (Don't ICE when `codegen_select_candidate` returns ambiguity in new solver)
 - #124380 (`Range` iteration specialization: remove trivial bounds)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-04-25 20:31:14 +00:00
Vadim Petrochenkov
98804c1786 debuginfo: Stabilize -Z debug-macros, -Z collapse-macro-debuginfo and #[collapse_debuginfo]
`-Z debug-macros` is "stabilized" by enabling it by default and removing.

`-Z collapse-macro-debuginfo` is stabilized as `-C collapse-macro-debuginfo`.
It now supports all typical boolean values (`parse_opt_bool`) in addition to just yes/no.

Default value of `collapse_debuginfo` was changed from `false` to `external` (i.e. collapsed if external, not collapsed if local).
`#[collapse_debuginfo]` attribute without a value is no longer supported to avoid guessing the default.
2024-04-25 22:14:47 +03:00
Matthias Krüger
3c0c5b4e46
Rollup merge of #124380 - lcnr:std-unnecessary-params, r=Nilstrieb
`Range` iteration specialization: remove trivial bounds

These bounds on impl items are trivially true and never checked by a caller. They end up shadowing the actual impls, currently preventing normalization in the new solver. While we may have to fix the underlying issue in the new solver at some point, for now this is an easy way to get us closer to compiling core with `-Znext-solver`.

r? `@Nilstrieb`
2024-04-25 21:12:18 +02:00
Matthias Krüger
6c21abf291
Rollup merge of #124374 - compiler-errors:fix-ambiguity-ice, r=lcnr
Don't ICE when `codegen_select_candidate` returns ambiguity in new solver

Because we merge identical candidates, we may have >1 impl candidate to in `codegen_select_error` but *not* have a trait error.

r? lcnr
2024-04-25 21:12:17 +02:00
Matthias Krüger
60c825f1e1
Rollup merge of #124313 - estebank:split-at-mut, r=fee1-dead
Detect borrow error involving sub-slices and suggest `split_at_mut`

```
error[E0499]: cannot borrow `foo` as mutable more than once at a time
  --> $DIR/suggest-split-at-mut.rs:13:18
   |
LL |     let a = &mut foo[..2];
   |                  --- first mutable borrow occurs here
LL |     let b = &mut foo[2..];
   |                  ^^^ second mutable borrow occurs here
LL |     a[0] = 5;
   |     ---- first borrow later used here
   |
   = help: use `.split_at_mut(position)` or similar method to obtain two mutable non-overlapping sub-slices
```

Address most of #58792.

For follow up work, we should emit a structured suggestion for cases where we can identify the exact `let (a, b) = foo.split_at_mut(2);` call that is needed.
2024-04-25 21:12:17 +02:00
Michael Goulet
f2518cd798 Remove special-casing for SimplifiedType for next solver 2024-04-25 14:27:39 -04:00
Esteban Küber
64a4cdcfd4 review comment: rename method 2024-04-25 18:26:36 +00:00
lcnr
ce70584753 remove trivial bounds 2024-04-25 17:31:00 +00:00
bors
38dd569150 Auto merge of #124377 - matthiaskrgr:rollup-ajxjq35, r=matthiaskrgr
Rollup of 2 pull requests

Successful merges:

 - #124287 (Improved code with clippy)
 - #124326 (tests: remove few ignore-stage2)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-04-25 17:12:29 +00:00
Matthias Krüger
c125e9d9e0
Rollup merge of #124326 - klensy:ignore-stage2, r=compiler-errors
tests: remove few ignore-stage2

beta was branched long ago, so can be removed
2024-04-25 18:57:56 +02:00
Matthias Krüger
b28721fd96
Rollup merge of #124287 - 41Leahcim:master, r=fmease
Improved code with clippy

I haven't used the bootstrapped compiler, but I think I have made some improvements using clippy. I have already made the following changes to the compiler:
Replaced `self.first().is_digit(10)` with `self.first().is_ascii_digit()` on lines 633, 664, and 680 of compiler/rust_lexer/src/lib.rs.

Removed unnecessary cast on line 262 of compiler/rustc_lexer/src/unescape.rs

Replaced ok_or_else with ok_or on line 303 of compiler/rustc_lexer/src/unescape.rs

Replaced `!std::env::var("RUSTC_BOOTSTRAP").is_ok()` with `std::env::var("RUSTC_BOOTSTRAP").is_err()` on line 4 of compiler/rustc_macros/build.rs

Removed needless borrow for generic argument `env`on line 53 of compiler/rust_llvm/build.rs
2024-04-25 18:57:56 +02:00
Esteban Küber
abdb64d4ea Check equivalence of indices in more cases 2024-04-25 16:55:33 +00:00
Esteban Küber
ad6ae61246 Don't suggest split_at_mut when the multiple borrows have the same index 2024-04-25 16:55:33 +00:00