Commit Graph

253185 Commits

Author SHA1 Message Date
bors
cdd6336386 Auto merge of #12682 - cuviper:muopb-asm, r=llogiq
The `multiple_unsafe_ops_per_block` test needs `asm!`

changelog: none
2024-04-17 07:50:05 +00:00
Ralf Jung
9f156d38a5 no need to use miri's native stderr here 2024-04-17 09:47:16 +02:00
Ralf Jung
d7f79cc2b2 tests/utils: add fmt::Write implementations for miri's native stdout/stderr 2024-04-17 09:47:16 +02:00
Ralf Jung
d10f61313f alloc_error_handler tests: directly call handle_alloc_error; test more codepaths 2024-04-17 09:27:55 +02:00
bors
6c6b3027ef Auto merge of #123678 - DianQK:docker-local, r=Kobzol
Improve the experience of running Docker locally

When running locally, the absence of the `GITHUB_STEP_SUMMARY` environment variable will lead to the following error:

```
::endgroup::
./src/ci/docker/run.sh: line 349: : No such file or directory
```

I've also changed the output artifacts directory to `obj/$image_name`, allowing me to easily run all images locally. We always encounter various strange issues when modifying the test cases in the `codegen` directory.

r? Kobzol cc `@saethlin`
2024-04-17 06:47:39 +00:00
bors
1ba78212ff Auto merge of #12680 - Alexendoo:cargo-dev-setup-toolchain, r=llogiq
Add `cargo dev setup toolchain`

Adds a `cargo dev setup toolchain` subcommand that creates a rustup toolchain with symlinks to the local `cargo-clippy` and `clippy-driver`. Allows you to then do `cargo +clippy clippy` in other projects to run the locally built Clippy

Sometimes more convenient when you're testing changes on a separate project than `cd`ing back & forth to use `cargo dev lint [project]`

changelog: none
2024-04-17 05:46:07 +00:00
Ralf Jung
ae7b07f2dc interpret: rename base_pointer -> root_pointer
also in Miri, "base tag" -> "root tag"
2024-04-17 07:35:48 +02:00
Ralf Jung
9e239bdc76 interpret: pass MemoryKind to adjust_alloc_base_pointer 2024-04-17 07:35:48 +02:00
Noa
87db7c32a7
Address comments 2024-04-17 00:18:04 -05:00
The Miri Cronjob Bot
2cb03ef739 fmt 2024-04-17 05:09:14 +00:00
The Miri Cronjob Bot
e8739886f2 Merge from rustc 2024-04-17 05:08:05 +00:00
The Miri Cronjob Bot
af28716f19 Preparing for merge from rustc 2024-04-17 04:57:09 +00:00
bors
b7581490aa Auto merge of #124055 - matthiaskrgr:rollup-waq2e68, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #122813 (Qualifier tweaking)
 - #122883 (refactor clippy in bootstrap)
 - #123997 (Delay span bug when `Self` kw resolves to `DefKind::{Mod,Trait}`)
 - #124045 (Reinstate nnethercote to the review rotation.)
 - #124051 (Fix empty-set symbol in comments)
 - #124052 (Make the comments for `ReturnDest` variants doc comments)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-04-17 04:13:31 +00:00
Matthias Krüger
854303b1f9
Rollup merge of #124052 - beetrees:return-dest-doc-comment, r=fmease
Make the comments for `ReturnDest` variants doc comments

This PR converts the documentation for `ReturnDest` from comments to doc comments.
2024-04-17 05:44:54 +02:00
Matthias Krüger
d783ea0c0e
Rollup merge of #124051 - dtolnay:emptyset, r=compiler-errors
Fix empty-set symbol in comments

The symbol in the original code is U+00D8 "LATIN CAPITAL LETTER O WITH STROKE" (https://en.wikipedia.org/wiki/%C3%98) which is an uppercase letter in Danish, Norwegian, Faroese, and Southern Sámi alphabets.

The symbol that was intended is U+2205 "EMPTY SET" (https://en.wikipedia.org/wiki/Empty_set#Notation).

| Before | After |
|---|---|
| ![Screenshot from 2024-04-16 18-25-01](https://github.com/rust-lang/rust/assets/1940490/9b8b0624-cfa5-4b89-84e5-4c2b39c2cb8f) | ![Screenshot from 2024-04-16 18-25-05](https://github.com/rust-lang/rust/assets/1940490/6f6b34c3-0e47-4ba0-856d-be1dc164c94c) |
2024-04-17 05:44:54 +02:00
Matthias Krüger
1134f442f9
Rollup merge of #124045 - nnethercote:add-nnethercote-review, r=nnethercote
Reinstate nnethercote to the review rotation.

I'm back from vacation.

r? nnethercote
2024-04-17 05:44:53 +02:00
Matthias Krüger
90af17ddcb
Rollup merge of #123997 - compiler-errors:self-res, r=fmease
Delay span bug when `Self` kw resolves to `DefKind::{Mod,Trait}`

Catch the case where `kw::Self` is recovered in the parser and causes us to subsequently resolve `&self`'s implicit type to something that's not a type.

This check could be made more accurate, though I'm not sure how hard we have to try here.

Fixes #123988
2024-04-17 05:44:53 +02:00
Matthias Krüger
432bce6583 Rollup merge of #122813 - nnethercote:nicer-quals, r=compiler-errors
Qualifier tweaking

Adding and removing qualifiers in some cases that make things nicer. Details in individual commits.

r? `@compiler-errors`
2024-04-17 05:44:52 +02:00
Matthias Krüger
8229a34102
Rollup merge of #122883 - onur-ozkan:clippy-build-step, r=albertlarsan68
refactor clippy in bootstrap

Previously, using clippy in bootstrap was not very useful as explained in #122825. In short, regardless of the given path clippy would always check the entire compiler and std tree. This makes it impossible to run clippy on different paths with different set of rules. This PR fixes that by allowing developers to run clippy with specific rules on specific paths (e.g., we can run `x clippy compiler -Aclippy::all -Dclippy::correctness` and `x clippy library/std -Dclippy::all` and none of them will affect each other).

Resolves #122825
2024-04-17 05:44:52 +02:00
Matthias Krüger
45940fe6d8
Rollup merge of #122813 - nnethercote:nicer-quals, r=compiler-errors
Qualifier tweaking

Adding and removing qualifiers in some cases that make things nicer. Details in individual commits.

r? `@compiler-errors`
2024-04-17 05:44:52 +02:00
Zalathar
25b9f84413 coverage: Branch coverage tests for lazy boolean operators 2024-04-17 12:32:30 +10:00
beetrees
c021367de1
Make the comments for ReturnDest variants doc comments 2024-04-17 03:10:09 +01:00
bors
803e33a446 Auto merge of #124039 - weihanglo:update-cargo, r=weihanglo
Update cargo

11 commits in 48eca1b164695022295ce466b64b44e4e0228b08..6f06fe908a5ee0f415c187f868ea627e82efe07d
2024-04-12 21:16:36 +0000 to 2024-04-16 18:47:44 +0000
- fix(toml): Error on `[project]` in Edition 2024 (rust-lang/cargo#13747)
- feat(update): Include a Locking message (rust-lang/cargo#13759)
- chore(deps): update rust crate gix to 0.62.0 [security] (rust-lang/cargo#13760)
- test(schemas): Ensure tests cover the correct case (rust-lang/cargo#13761)
- feat(resolve): Tell the user the style of resovle done (rust-lang/cargo#13754)
- Make sure to also wrap the initial `-vV` invocation (rust-lang/cargo#13659)
- docs: update `checkout` GitHub action version (rust-lang/cargo#13757)
- Recategorize cargo test's `--doc` flag under "Target Selection" (rust-lang/cargo#13756)
- Reword sentence describing workspace toml for clarity (rust-lang/cargo#13753)
- docs(ref): Update unstable docs for msrv-policy (rust-lang/cargo#13751)
- refactor(config): Consistently use kebab-case (rust-lang/cargo#13748)

r? ghost
2024-04-17 02:06:45 +00:00
Zalathar
40cfc2de77 coverage: Move branch coverage tests into a subdirectory 2024-04-17 11:41:40 +10:00
David Tolnay
e480cabe3a
Fix empty-set symbol in comments 2024-04-16 18:19:27 -07:00
Mark Rousskov
9ab6e36d8d Fix broken test
Testing for ASLR by casting &ZST to *const _ is not useful, there's no
guarantee that &ZST produces an ASLR'd pointer.
2024-04-16 21:13:21 -04:00
Mark Rousskov
649e80184b Codegen ZSTs without an allocation
This makes sure that &[] is just as efficient as indirecting through
unsafe code (from_raw_parts). No new stable guarantee is intended about
whether or not we do this, this is just an optimization.

Co-authored-by: Ralf Jung <post@ralfj.de>
2024-04-16 21:13:21 -04:00
Slanterns
b7f4332737
Stabilize const_io_structs 2024-04-17 08:09:13 +08:00
bors
7e3ba5b8b7 Auto merge of #124040 - GuillaumeGomez:rollup-hrrvsgh, r=GuillaumeGomez
Rollup of 7 pull requests

Successful merges:

 - #123673 (Don't ICE for kind mismatches during error rendering)
 - #123675 (Taint const qualifs if a static is referenced that didn't pass wfcheck)
 - #123975 (Port the 2 `rust-lld` run-make tests to `rmake`)
 - #124000 (Use `/* value */` as a placeholder)
 - #124013 (Box::into_raw: make Miri understand that this is a box-to-raw cast)
 - #124027 (Prefer identity equality over equating types during coercion.)
 - #124036 (Remove `default_hidden_visibility: false` from wasm targets)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-04-17 00:04:40 +00:00
Josh Stone
245fbeef49 The multiple_unsafe_ops_per_block test needs asm! 2024-04-16 16:45:59 -07:00
Nicholas Nethercote
9a67a6cb04 Reinstate nnethercote to the review rotation. 2024-04-17 08:37:04 +10:00
DianQK
374b7821a5
Update LLVM to 1deeee3 2024-04-17 06:28:22 +08:00
Elisha Hollander
dd615004ea restore line-break 2024-04-16 22:23:15 +00:00
Elisha Hollander
9cdf3ca600 default to no testing 2024-04-16 22:23:12 +00:00
Elisha Hollander
f71d2a2af6 update cargo manifest 2024-04-16 22:22:49 +00:00
Elisha Hollander
2196d65cf2 update lockfile 2024-04-16 22:20:16 +00:00
Elisha Hollander
331fd31e20 use FxHashMap
* add `rustc-hash` to cargo manifest

* use `FxHashMap`
2024-04-16 22:20:13 +00:00
Elisha Hollander
cfa007f1d1 use one use for std 2024-04-16 22:20:10 +00:00
Elisha Hollander
f275a3c65b refactor 2024-04-16 22:20:07 +00:00
Elisha Hollander
ab15157960 revert using regex 2024-04-16 22:20:04 +00:00
Elisha Hollander
047a0c6fa5 use regex to check for problems 2024-04-16 22:20:01 +00:00
Elisha Hollander
7b7a26bee5 remove redundant whitespace 2024-04-16 22:19:58 +00:00
Elisha Hollander
586d9d6daf format 2024-04-16 22:19:55 +00:00
Elisha Hollander
4ff9f25467 restore original consts
Co-authored-by: David Tolnay <dtolnay@gmail.com>
2024-04-16 22:19:52 +00:00
Elisha Hollander
48cb8649f7 use generate_problems 2024-04-16 22:19:49 +00:00
Elisha Hollander
8ced53e0cc format style.rs 2024-04-16 22:19:45 +00:00
Elisha Hollander
a1f228bcd2 add more PROBLEMATIC_CONSTS 2024-04-16 22:19:42 +00:00
Guillaume Gomez
a0ca1184da
Rollup merge of #124036 - alexcrichton:wasm-use-default-visbility, r=jieyouxu
Remove `default_hidden_visibility: false` from wasm targets

To the best of my ability I believe that this is no longer necessary. I don't fully recall why this was first added but I believe it had to do with symbols all being exported by default and this was required to undo that. Regardless nowadays the default output of rustc seems suitable so it seems best to keep wasm in line with other targets.
2024-04-17 00:00:25 +02:00
Guillaume Gomez
c7b009f38a
Rollup merge of #124027 - oli-obk:define_opaque_types9, r=compiler-errors
Prefer identity equality over equating types during coercion.

These types are always generic only over their own generic parameters with no inference variables involved.

r? `@compiler-errors`

I love touching code that [hasn't changed meaningfully since 2016](https://github.com/rust-lang/rust/pull/41937)
2024-04-17 00:00:24 +02:00
Guillaume Gomez
51cfa95668
Rollup merge of #124013 - RalfJung:box-to-raw, r=oli-obk
Box::into_raw: make Miri understand that this is a box-to-raw cast

Turns out https://github.com/rust-lang/rust/pull/122647 went a bit too far in cleaning up `Box`... we still need a hack in `Box::into_raw`. The nicer fix would be to make Stacked Borrows not care about reference-to-raw-pointer casts, but it's unclear whether that will ever be possible without going to full Tree Borrows.

Fixes https://github.com/rust-lang/miri/issues/3473.
2024-04-17 00:00:24 +02:00