Commit Graph

147097 Commits

Author SHA1 Message Date
Matthias Krüger
80d592cc24
Rollup merge of #122964 - joboet:pointer_expose, r=Amanieu
Rename `expose_addr` to `expose_provenance`

`expose_addr` is a bad name, an address is just a number and cannot be exposed. The operation is actually about the provenance of the pointer.

This PR thus changes the name of the method to `expose_provenance` without changing its return type. There is sufficient precedence for returning a useful value from an operation that does something else without the name indicating such, e.g. [`Option::insert`](https://doc.rust-lang.org/nightly/std/option/enum.Option.html#method.insert) and [`MaybeUninit::write`](https://doc.rust-lang.org/nightly/std/mem/union.MaybeUninit.html#method.write).

Returning the address is merely convenient, not a fundamental part of the operation. This is implied by the fact that integers do not have provenance since
```rust
let addr = ptr.addr();
ptr.expose_provenance();
let new = ptr::with_exposed_provenance(addr);
```
must behave exactly like
```rust
let addr = ptr.expose_provenance();
let new = ptr::with_exposed_provenance(addr);
```
as the result of `ptr.expose_provenance()` and `ptr.addr()` is the same integer. Therefore, this PR removes the `#[must_use]` annotation on the function and updates the documentation to reflect the important part.

~~An alternative name would be `expose_provenance`. I'm not at all opposed to that, but it makes a stronger implication than we might want that the provenance of the pointer returned by `ptr::with_exposed_provenance`[^1] is the same as that what was exposed, which is not yet specified as such IIUC. IMHO `expose` does not make that connection.~~

A previous version of this PR suggested `expose` as name, libs-api [decided on](https://github.com/rust-lang/rust/pull/122964#issuecomment-2033194319) `expose_provenance` to keep the symmetry with `with_exposed_provenance`.

CC `@RalfJung`
r? libs-api

[^1]: I'm using the new name for `from_exposed_addr` suggested by #122935 here.
2024-04-03 22:11:00 +02:00
Ralf Jung
a6803b9de4 add 'x.py miri', and make it work for 'library/{core,alloc,std}' 2024-04-03 20:27:20 +02:00
Taiki Endo
6edb021fd3 Fix target name in NetBSD platform-support doc 2024-04-04 01:31:04 +09:00
Matthias Krüger
658c8f7367
Rollup merge of #123412 - Kobzol:ci-artifacts-in-summary, r=Mark-Simulacrum
Output URLs of CI artifacts to GitHub summary

I often want to download CI artifacts published from our workflows (I suspect others might do the same), but it's a bit annoying to extract their links from the CI logs currently. This PR also outputs URLs to them to the GitHub Actions summaries.

r? `@Mark-Simulacrum`
2024-04-03 17:15:50 +02:00
Matthias Krüger
29c72ce183
Rollup merge of #123386 - Rajveer100:branch-for-issue-123227, r=onur-ozkan
Set `CARGO` instead of `PATH` for Rust Clippy

Resolves #123227

Previously, clippy was using `cargo` from `PATH`, but since [PR](https://github.com/rust-lang/rust-clippy/pull/11944), it now prioritises checking `CARGO` first.
2024-04-03 17:15:49 +02:00
Matthias Krüger
f7c34c03be
Rollup merge of #123342 - RalfJung:noskip, r=onur-ozkan
x.py test: remove no-op --skip flag

None of the test commands seems to do anything with this flag, so we might as well remove it.
2024-04-03 17:15:48 +02:00
Matthias Krüger
1bde86b18b
Rollup merge of #123209 - ObsidianMinor:doc/external-clangrt, r=michaelwoerister
Add section to sanitizer doc for `-Zexternal-clangrt`

After spending a week looking for answers to how to do the very thing this flag lets me do, it felt appropriate to document it where I would've expected it to be.
2024-04-03 17:15:47 +02:00
joboet
989660c3e6
rename expose_addr to expose_provenance 2024-04-03 16:00:38 +02:00
Jakub Beránek
508530dbc5 Output URLs of CI artifacts to GitHub summary 2024-04-03 15:33:40 +02:00
Ralf Jung
f2120893c6 epoll: note a FIXME 2024-04-03 15:19:33 +02:00
Ralf Jung
23fba86c3b eventfd: fix flag check and note a FIXME 2024-04-03 15:17:33 +02:00
Guillaume Gomez
2815edc671 Update rustdoc_css_themes.rs to take into account new selectors 2024-04-03 14:27:20 +02:00
Guillaume Gomez
2edc54c830 Default to light theme is JS is enabled but not working 2024-04-03 14:27:19 +02:00
Rajveer
66dee4a9aa Set CARGO instead of PATH for Rust Clippy
Resolves #123227
2024-04-03 17:17:40 +05:30
Ralf Jung
2cfb3a6750 shims/linux: move epoll and eventfd into their own files, together with their FD types 2024-04-03 11:33:38 +02:00
bors
9c502781ff Auto merge of #3441 - RalfJung:fds, r=RalfJung
shims/unix: split general FD management from FS access

`fd.rs` was a mix of general file descriptor infrastructure and file system access. Split those things up properly.

Also add a `socket.rs` file where support for sockets can go eventually. For now it just contains the socketpair stub.
2024-04-03 07:29:41 +00:00
Ralf Jung
229d41731a shims/unix: split general FD management from FS access; make a place for sockets 2024-04-03 08:56:37 +02:00
Jubilee
f700fb24f3
Rollup merge of #123349 - compiler-errors:async-closure-captures, r=oli-obk
Fix capture analysis for by-move closure bodies

The check we were doing to figure out if a coroutine was borrowing from its parent coroutine-closure was flat-out wrong -- a misunderstanding of mine of the way that `tcx.closure_captures` represents its captures.

Fixes #123251 (the miri/ui test I added should more than cover that issue)

r? `@oli-obk` -- I recognize that this PR may be underdocumented, so please ask me what I should explain further.
2024-04-02 23:44:29 -07:00
The Miri Cronjob Bot
22382ebd5c Merge from rustc 2024-04-03 05:03:14 +00:00
The Miri Cronjob Bot
d6334ae4d2 Preparing for merge from rustc 2024-04-03 04:55:58 +00:00
bors
8938f887d3 Auto merge of #123398 - weihanglo:update-cargo, r=weihanglo
Update cargo

8 commits in a59aba136aab5510c16b0750a36cbd9916f91796..0637083df5bbdcc951845f0d2eff6999cdb6d30a
2024-03-28 21:21:41 +0000 to 2024-04-02 23:55:05 +0000
- chore(deps): update compatible (rust-lang/cargo#13674)
- Maintain sorting of dependency features (rust-lang/cargo#13682)
- Update `der` crate (rust-lang/cargo#13692)
- fix: bash completion fallback in `nounset` mode (rust-lang/cargo#13686)
- CI: Update macos images to macos-13 (rust-lang/cargo#13685)
- chore(deps): update rust crate opener to 0.7.0 (rust-lang/cargo#13679)
- Remove useless parameters (rust-lang/cargo#13678)
- chore(deps): update rust crate supports-unicode to v3 (rust-lang/cargo#13680)

r? ghost
2024-04-03 04:14:41 +00:00
Weihang Lo
c6348a9768
Update cargo 2024-04-02 21:38:06 -04:00
Aaron Loyd
382459e047 Add section to sanitizer doc for -Zexternal-clangrt
After spending a week looking for answers to how to do the very thing
this flag lets me do, it felt appropriate to document it where I would've
expected it to be.
2024-04-02 19:51:20 -05:00
Jacob Pratt
f756095571
Rollup merge of #123380 - Nilstrieb:bomments, r=clubby789
Improve bootstrap comments

Rewrote a comment I found hard to understand, added some more.
2024-04-02 20:37:41 -04:00
Jacob Pratt
e9ef8e1efa
Rollup merge of #122935 - RalfJung:with-exposed-provenance, r=Amanieu
rename ptr::from_exposed_addr -> ptr::with_exposed_provenance

As discussed on [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/136281-t-opsem/topic/To.20expose.20or.20not.20to.20expose/near/427757066).

The old name, `from_exposed_addr`, makes little sense as it's not the address that is exposed, it's the provenance. (`ptr.expose_addr()` stays unchanged as we haven't found a better option yet. The intended interpretation is "expose the provenance and return the address".)

The new name nicely matches `ptr::without_provenance`.
2024-04-02 20:37:39 -04:00
Michael Goulet
ec74a304bb Comments, comments, comments 2024-04-02 20:07:49 -04:00
Michael Goulet
a1a1f41027 Fix capture analysis for by-move closure bodies 2024-04-02 20:07:48 -04:00
Matthias Krüger
8e271d70a2
Rollup merge of #123375 - fmease:rustdoc-sati-re-hotfix, r=GuillaumeGomez
rustdoc: synthetic auto trait impls: accept unresolved region vars for now

https://github.com/rust-lang/rust/pull/123348#issuecomment-2032494255:

> Right, [in #123340] I've intentionally changed a `vid_map.get(vid).unwrap_or(r)` to a `vid_map[vid]` making rustdoc panic if `rustc::AutoTraitFinder` returns a region inference variable that cannot be resolved because that is really fishy.  I can change it back with a `FIXME: investigate` […]. [O]nce I [fully] understand [the arcane] `rustc::AutoTraitFinder` [I] can fix the underlying issue if there's one.
>
> `rustc::AutoTraitFinder` can also return placeholder regions `RePlaceholder` which doesn't seem right either and which makes rustdoc ICE, too (we have a GitHub issue for that already[, namely #120606]).

Fixes #123370.
Fixes #112242.

r? ``@GuillaumeGomez``
2024-04-02 21:22:04 +02:00
Nilstrieb
a0721036b6 Improve bootstrap comments
Rewrote a comment I found hard to understand, added some more.
2024-04-02 20:36:48 +02:00
León Orell Valerian Liehr
70b4ace09d
rustdoc: synthetic auto trait impls: accept unresolved region vars for now 2024-04-02 18:59:17 +02:00
Guillaume Gomez
c3a124e9d6
Rollup merge of #123338 - GuillaumeGomez:update-browser-ui-test, r=notriddle
Update to new browser-ui-test version

This new version brings a lot of new internal improvements (mostly around validating the commands input).

It also improved some command names and arguments.

r? `@notriddle`
2024-04-02 18:18:51 +02:00
Guillaume Gomez
3aab05eecb
Rollup merge of #122614 - notriddle:notriddle/search-desc, r=GuillaumeGomez
rustdoc-search: shard the search result descriptions

## Preview

This makes no visual changes to rustdoc search. It's a pure perf improvement.

<details><summary>old</summary>

Preview: <http://notriddle.com/rustdoc-html-demo-10/doc/std/index.html?search=vec>

WebPageTest Comparison with before branch on a sort of worst case (searching `vec`, winds up downloading most of the shards anyway): <https://www.webpagetest.org/video/compare.php?tests=240317_AiDc61_2EM,240317_AiDcM0_2EN>

Waterfall diagram:
![image](https://github.com/rust-lang/rust/assets/1593513/39548f0c-7ad6-411b-abf8-f6668ff4da18)

</details>

Preview: <http://notriddle.com/rustdoc-html-demo-10/doc2/std/index.html?search=vec>

WebPageTest Comparison with before branch on a sort of worst case (searching `vec`, winds up downloading most of the shards anyway): <https://www.webpagetest.org/video/compare.php?tests=240322_BiDcCH_13R,240322_AiDcJY_104>

![image](https://github.com/rust-lang/rust/assets/1593513/4be1f9ff-c3ff-4b96-8f5b-b264df2e662d)

## Description

r? `@GuillaumeGomez`

The descriptions are, on almost all crates[^1], the majority of the size of the search index, even though they aren't really used for searching. This makes it relatively easy to separate them into their own files.

Additionally, this PR pulls out information about whether there's a description into a bitmap. This allows us to sort, truncate, *then* download.

This PR also bumps us to ES8. Out of the browsers we support, all of them support async functions according to caniuse.

https://caniuse.com/async-functions

[^1]:
    <https://microsoft.github.io/windows-docs-rs/>, a crate with
    44MiB of pure names and no descriptions for them, is an outlier
    and should not be counted. But this PR should improve it, by replacing a long line of empty strings with a compressed bitmap with a single Run section. Just not very much.

## Detailed sizes

```console
$ cat test.sh
set -ex
cp ../search-index*.js search-index.js
awk 'FNR==NR {a++;next} FNR<a-3' search-index.js{,} | awk 'NR>1 {gsub(/\],\\$/,""); gsub(/^\["[^"]+",/,""); print} {next}' | sed -E "s:\\\\':':g" > search-index.json
jq -c '.t' search-index.json > t.json
jq -c '.n' search-index.json > n.json
jq -c '.q' search-index.json > q.json
jq -c '.D' search-index.json > D.json
jq -c '.e' search-index.json > e.json
jq -c '.i' search-index.json > i.json
jq -c '.f' search-index.json > f.json
jq -c '.c' search-index.json > c.json
jq -c '.p' search-index.json > p.json
jq -c '.a' search-index.json > a.json
du -hs t.json n.json q.json D.json e.json i.json f.json c.json p.json a.json
$ bash test.sh
+ cp ../search-index1.78.0.js search-index.js
+ awk 'FNR==NR {a++;next} FNR<a-3' search-index.js search-index.js
+ awk 'NR>1 {gsub(/\],\\$/,""); gsub(/^\["[^"]+",/,""); print} {next}'
+ sed -E 's:\\'\'':'\'':g'
+ jq -c .t search-index.json
+ jq -c .n search-index.json
+ jq -c .q search-index.json
+ jq -c .D search-index.json
+ jq -c .e search-index.json
+ jq -c .i search-index.json
+ jq -c .f search-index.json
+ jq -c .c search-index.json
+ jq -c .p search-index.json
+ jq -c .a search-index.json
+ du -hs t.json n.json q.json D.json e.json i.json f.json c.json p.json a.json
64K     t.json
800K    n.json
8.0K    q.json
4.0K    D.json
16K     e.json
192K    i.json
544K    f.json
4.0K    c.json
36K     p.json
20K     a.json
```

These are, roughly, the size of each section in the standard library (this tool actually excludes libtest, for parsing-json-with-awk reasons, but libtest is tiny so it's probably not important).

t = item type, like "struct", "free fn", or "type alias". Since one byte is used for every item, this implies that there are approximately 64 thousand items in the standard library.

n = name, and that's now the largest section of the search index with the descriptions removed from it

q = parent *module* path, stored parallel to the items within

D = the size of each description shard, stored as vlq hex numbers

e = empty description bit flags, stored as a roaring bitmap

i = parent *type* index as a link into `p`, stored as decimal json numbers; used only for associated types; might want to switch to vlq hex, since that's shorter, but that would be a separate pr

f = function signature, stored as lists of lists that index into `p`

c = deprecation flag, stored as a roaring bitmap

p = parent *type*, stored separately and linked into from `i` and `f`

a = alias, as [[key, value]] pairs

## Search performance

http://notriddle.com/rustdoc-html-demo-11/perf-shard/index.html

For example, in stm32f4:

<table><thead><tr><th>before<th>after</tr></thead>
<tbody><tr><td>

```
Testing T -> U ... in_args = 0, returned = 0, others = 200
wall time = 617

Testing T, U ... in_args = 0, returned = 0, others = 200
wall time = 198

Testing T -> T ... in_args = 0, returned = 0, others = 200
wall time = 282

Testing crc32 ... in_args = 0, returned = 0, others = 0
wall time = 426

Testing spi::pac ... in_args = 0, returned = 0, others = 0
wall time = 673
```

</td><td>

```
Testing T -> U ... in_args = 0, returned = 0, others = 200
wall time = 716

Testing T, U ... in_args = 0, returned = 0, others = 200
wall time = 207

Testing T -> T ... in_args = 0, returned = 0, others = 200
wall time = 289

Testing crc32 ... in_args = 0, returned = 0, others = 0
wall time = 418

Testing spi::pac ... in_args = 0, returned = 0, others = 0
wall time = 687
```

</td></tr><tr><td>

```
user: 005.345 s
sys:  002.955 s
wall: 006.899 s
child_RSS_high:     583664 KiB
group_mem_high:     557876 KiB
```

</td><td>

```
user: 004.652 s
sys:  000.565 s
wall: 003.865 s
child_RSS_high:     538696 KiB
group_mem_high:     511724 KiB
```

</td></tr>

</table>

This perf tester is janky and unscientific enough that the apparent differences might just be noise. If it's not an order of magnitude, it's probably not real.

## Future possibilities

* Currently, results are not shown until the descriptions are downloaded. Theoretically, the description-less results could be shown. But actually doing that, and making sure it works properly, would require extra work (we have to be careful to avoid layout jumps).
* More than just descriptions can be sharded this way. But we have to be careful to make sure the size wins are worth the round trips. Ideally, data that’s needed only for display should be sharded while data needed for search isn’t.
* [Full text search](https://internals.rust-lang.org/t/full-text-search-for-rustdoc-and-doc-rs/20427) also needs this kind of infrastructure. A good implementation might store a compressed bloom filter in the search index, then download the full keyword in shards. But, we have to be careful not just of the amount readers have to download, but also of the amount that [publishers](https://gist.github.com/notriddle/c289e77f3ed469d1c0238d1d135d49e1) have to store.
2024-04-02 18:18:50 +02:00
Adam Gastineau
72aeeaf480 Updated comments 2024-04-02 08:11:58 -07:00
Michael Howell
a272007a20 Clean up src/librustdoc/html/render/search_index/encode.rs
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
2024-04-02 07:57:26 -07:00
bors
5dbaafdb93 Auto merge of #123340 - fmease:rustdoc-simplify-auto-trait-impl-synth, r=GuillaumeGomez
rustdoc: heavily simplify the synthesis of auto trait impls

`gd --numstat HEAD~2 HEAD src/librustdoc/clean/auto_trait.rs`
**+315 -705** 🟩🟥🟥🟥

---

As outlined in issue #113015, there are currently 3[^1] large separate routines that “clean” `rustc_middle::ty` data types related to generics & predicates to rustdoc data types. Every single one has their own kinds of bugs. While I've patched a lot of bugs in each of the routines in the past, it's about time to unify them. This PR is only the first in a series. It completely **yanks** the custom “bounds cleaning” of mod `auto_trait` and reuses the routines found in mod `simplify`. As alluded to, `simplify` is also flawed but it's still more complete than `auto_trait`'s routines. [See also my review comment over at `tests/rustdoc/synthetic_auto/bounds.rs`](https://github.com/rust-lang/rust/pull/123340#discussion_r1546900539).

This is preparatory work for rewriting “bounds cleaning” from scratch in follow-up PRs in order to finally [fix] #113015.

Apart from that, I've eliminated all potential sources of *instability* in the rendered output.
See also #119597. I'm pretty sure this fixes #119597.

This PR does not attempt to fix [any other issues related to synthetic auto trait impls](https://github.com/rust-lang/rust/issues?q=is%3Aissue+is%3Aopen+label%3AA-synthetic-impls%20label%3AA-auto-traits).
However, it's definitely meant to be a *stepping stone* by making `auto_trait` more contributor-friendly.

---

* Replace `FxHash{Map,Set}` with `FxIndex{Map,Set}` to guarantee a stable iteration order
  * Or as a perf opt, `UnordSet` (a thin wrapper around `FxHashSet`) in cases where we never iterate over the set.
  * Yes, we do make use of `swap_remove` but that shouldn't matter since all the callers are deterministic. It does make the output less “predictable” but it's still better than before. Ofc, I rely on `rustc_infer` being deterministic. I hope that holds.
* Utilizing `clean::simplify` over the custom “bounds cleaning” routines wipes out the last reference to `collect_referenced_late_bound_regions` in rustdoc (`simplify` uses `bound_vars`) which was a source of instability / unpredictability (cc #116388)
* Remove the types `RegionTarget` and `RegionDeps` from `librustdoc`. They were duplicates of the identical types found in `rustc`. Just import them from `rustc`. For some reason, they were duplicated when splitting `auto_trait` in two in #49711.
* Get rid of the useless “type namespace” `AutoTraitFinder` in `librustdoc`
  * The struct only held a `DocContext`, it was over-engineered
  * Turn the associated functions into free ones
    * Eliminates rightward drift; increases legibility
  * `rustc` also contains a useless `AutoTraitFinder` struct but I plan on removing that in a follow-up PR
* Rename a bunch of methods to be way more descriptive
* Eliminate `use super::*;`
  * Lead to `clean/mod.rs` accumulating a lot of unnecessary imports
  * Made `auto_traits` less modular
* Eliminate a custom `TypeFolder`: We can just use the rustc helper `fold_regions` which does that for us

I plan on adding extensive documentation to `librustdoc`'s `auto_trait` in follow-up PRs.
I don't want to do that in this PR because further refactoring & bug fix PRs may alter the overall structure of `librustdoc`'s & `rustc`'s `auto_trait` modules to a great degree. I'm slowly digging into the dark details of `rustc`'s `auto_trait` module again and once I have the full picture I will be able to provide proper docs.

---

While this PR does indeed touch `rustc`'s `auto_trait` — mostly tiny refactorings — I argue this PR doesn't need any compiler reviewers next to rustdoc ones since that module falls under the purview of rustdoc — it used to be part of `librustdoc` after all (#49711).

Sorry for not having split this into more commits. If you'd like me to I can try to split it into more atomic commits retroactively. However, I don't know if that would actually make reviewing easier. I think the best way to review this might just be to place the master version of `auto_trait` on the left of your screen and the patched one on the right, not joking.

r? `@GuillaumeGomez`

[^1]: Or even 4 depending on the way you're counting.
2024-04-02 12:13:44 +00:00
Jakub Beránek
ad75760637
CI: Redirect stderr to stdout to order GHA logs 2024-04-02 12:08:47 +02:00
bors
2531d08e34 Auto merge of #123336 - workingjubilee:strip-the-trace-off-my-back, r=Nilstrieb
Note impact of `-Cstrip` on backtraces

It is not always clear to people what the impact of `-Cstrip` options are. They are a common question on sites like StackOverflow, and sometimes people even report bugs with "no backtrace" after deliberately mangling the symbol table. We cannot exhaustively document every permutation, but we should warn people about common effects.
2024-04-02 07:39:10 +00:00
Jubilee
347c579648
Rollup merge of #123330 - jfgoog:pass-backtrace, r=Kobzol
Pass RUST_BACKTRACE when running docker.
2024-04-01 17:22:11 -07:00
León Orell Valerian Liehr
069e7f2a76
rustdoc: heavily simplify synthesis of auto trait impls 2024-04-02 01:49:57 +02:00
Ralf Jung
5a887942a5 x.py test: remove no-op --skip flag 2024-04-02 00:06:04 +02:00
Ralf Jung
b390f2f458 set miri sysroots inside Cargo::new 2024-04-01 23:55:50 +02:00
Jubilee Young
1dcaf70c0e Note -Cstrip is not a security measure 2024-04-01 14:13:56 -07:00
Jubilee Young
4994f73a27 Revise strip-symbols paragraph 2024-04-01 14:07:59 -07:00
Jubilee Young
973663db9d Discourage stripping symbols in devtools 2024-04-01 13:50:29 -07:00
Guillaume Gomez
59120d0ef5 Update to new browser-ui-test version 2024-04-01 22:25:01 +02:00
James Farrell
652f6f71eb Pass RUST_BACKTRACE when running docker. 2024-04-01 20:24:54 +00:00
León Orell Valerian Liehr
cbd593ed18
rustdoc: synthetic impls: auto traits: Fx{Hash↦Index}{Map,Set} 2024-04-01 22:15:09 +02:00
Jubilee Young
3896f07627 Note impact of -Cstrip on backtraces
It is not always clear to people what the impact of `-Cstrip` options are.
They are a common question on sites like StackOverflow, and sometimes
people even report bugs with "no backtrace" after deliberately mangling
the symbol table. We cannot exhaustively document every permutation, but
we should warn people about common effects.
2024-04-01 12:51:37 -07:00
许杰友 Jieyou Xu (Joe)
fad8213150
Rebless allow list 2024-04-01 17:07:49 +01:00
许杰友 Jieyou Xu (Joe)
142d02d472
Modify compiletest and run-make-support to support CC invocations in rmake.rs 2024-04-01 17:07:49 +01:00
clubby789
629d69412a Bump dependencies 2024-04-01 13:06:32 +00:00
Tom French
edb7aeafba
chore: fix footnotes/links in platform-support.md 2024-04-01 11:43:52 +01:00
bors
871df0d13a Auto merge of #123192 - RalfJung:bootstrap-test-miri, r=onur-ozkan
Refactor the way bootstrap invokes `cargo miri`

Instead of basically doing `cargo run --manifest-path=<cargo-miri's manifest> -- miri`, let's invoke the `cargo-miri` binary directly. That means less indirections, and also makes it easier to e.g. run the libcore test suite in Miri. (But there are still other issues with that.)

Also also adjusted Miri's stage numbering so that it is consistent with rustc/rustdoc.

This also makes `./x.py test miri` honor `--no-doc`.

And this fixes https://github.com/rust-lang/rust/issues/123177 by moving where we handle parallel_compiler.
2024-04-01 07:19:57 +00:00
beetrees
0bbaa2505b
Fix error message for env! when env var is not valid Unicode 2024-04-01 05:44:45 +01:00
Ralf Jung
85d460e829 checktools: make it easier to trace what is happening 2024-03-31 23:47:26 +02:00
Ralf Jung
b08b06e3a8 fix not finding the right libraries on Windows 2024-03-31 23:09:33 +02:00
Jubilee
17737bfece
Rollup merge of #123180 - Oneirical:master, r=Mark-Simulacrum
Rewrite `core-no-fp-fmt-parse` test in Rust

Claiming the simple "core-no-fp-fmt-parse" test from #121876. `run_make_support` was altered with `arg_path` written in #121918 by `@abhay-51,` with additional doc comment.

Preliminary GSoC contribution for the project proposal mentored by `@jieyouxu.`
2024-03-31 13:18:16 -07:00
Caio
4c0aea0d47 Move some tests 2024-03-31 14:58:17 -03:00
Ralf Jung
4797fba3b7 add FIXME for making the cargo cmd properly typed 2024-03-31 19:44:54 +02:00
Ralf Jung
288daeb14f move parallel_compiler handling into prepare_tool_cargo so that it is done everywhere 2024-03-31 19:44:54 +02:00
Ralf Jung
7ac5f604c1 remove a pointless env var
CARGO_EXTRA_FLAGS is respected by the ./miri script which we are not invoking here
2024-03-31 19:44:54 +02:00
Ralf Jung
fb8abe5fcf shift Miri's stage so that it matches other rustc-based tools 2024-03-31 19:44:54 +02:00
Ralf Jung
b5fe655ae8 bootstrap/rustc: remove a miri hack 2024-03-31 19:44:54 +02:00
Ralf Jung
4056df5cf7 cargo-miri: better debug output; reorder a comment to make it less confusing 2024-03-31 19:44:21 +02:00
bors
a8cfc83801 Auto merge of #123246 - Kobzol:tarball-reproducible, r=Mark-Simulacrum
Make source tarball generation more reproducible

This PR performs several changes to source tarball generation (`x dist rustc-src`) in order to make it more reproducible (in light of the recent "xz backdoor"...). I want to follow up on it with making a separate CI workflow for generating the tarball.

After this PR, running this locally produces identical checksums:
```bash
$ ./x dist rustc-src
$ sha256sum build/dist/rustc-1.79.0-src.tar.gz

$ ./x dist rustc-src
$ sha256sum build/dist/rustc-1.79.0-src.tar.gz
```

r? `@Mark-Simulacrum`
2024-03-31 12:36:23 +00:00
Ralf Jung
e25c6243ca update josh version and guidance 2024-03-31 14:09:06 +02:00
Jakub Beránek
877e8d456d
Sort directories when generating tarballs 2024-03-31 12:56:05 +02:00
Jakub Beránek
18d9d44bd6
Make tarball generation more deterministic 2024-03-31 12:56:05 +02:00
Jakub Beránek
8caef4e6c3
Remove potential __pycache__ directories from src tarballs 2024-03-31 12:56:05 +02:00
Jakub Beránek
63d6ce03b3
Checkout all submodules when building source tarballs 2024-03-31 12:56:05 +02:00
Jakub Beránek
6f4f39a8d5
Move submodule lookup to Builder 2024-03-31 12:56:05 +02:00
Ralf Jung
1935268557 reset the caches
looks like the M1 runners don't like it when the cache was created on x86

also reorder the lines to be more semantically grouped
2024-03-31 12:29:31 +02:00
bors
395f780cd8 Auto merge of #123264 - matthiaskrgr:rollup-smyy7j9, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - #123189 (Log BOLT args in bootstrap `rustc` shim)
 - #123211 (Stop calling visitors `V`)
 - #123242 (pattern analysis: Require enum indices to be contiguous)
 - #123260 (Miri subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-03-31 10:26:55 +00:00
Ralf Jung
3c306c750e experiment with macOS M1 runners 2024-03-31 12:05:34 +02:00
Matthias Krüger
9abf4bcadb
Rollup merge of #123260 - RalfJung:miri, r=RalfJung
Miri subtree update

r? `@ghost`
2024-03-31 11:50:41 +02:00
Matthias Krüger
0928a54a1b
Rollup merge of #123189 - Kobzol:rustc-shim-log, r=onur-ozkan
Log BOLT args in bootstrap `rustc` shim

Before, the BOLT argument would not be logged, because it was only added after the logging has happened.

Found by `@RalfJung` [here](https://github.com/rust-lang/rust/pull/116352#discussion_r1544235771).
2024-03-31 11:50:40 +02:00
bors
25b734dac6 Auto merge of #3436 - RalfJung:win-ci, r=RalfJung
speed up Windows CI

The many-seeds test is taking 15 minutes. Let's just run that only once instead of many times on Windows.

Also refactor the CI script to make the caller control which tests are being run.
2024-03-31 09:28:12 +00:00
Ralf Jung
a8edf26a61 move './miri check' for features to the style check job 2024-03-31 10:44:18 +02:00
Ralf Jung
660a5713f5 python: fix regex backslash escapes 2024-03-31 10:38:50 +02:00
Ralf Jung
540f2411e6 show the time that the main CI steps take 2024-03-31 10:38:49 +02:00
Ralf Jung
e9ee19004e also control the cargo-miri env var test separately 2024-03-31 10:38:31 +02:00
Ralf Jung
836ea71d05 windows ci: run many-seeds test less often 2024-03-31 10:38:31 +02:00
Ralf Jung
9395e1fa6f bash: use variable expansion that properly distinguishes null vs non-existing 2024-03-31 10:38:31 +02:00
Ralf Jung
5d1e92d132 ci: separetely control which host-only tests are run where
No functional change in this commit
2024-03-31 10:38:30 +02:00
bors
688c30dc9f Auto merge of #123258 - lnicola:sync-from-ra, r=lnicola
Subtree update of `rust-analyzer`
2024-03-31 08:25:24 +00:00
Ralf Jung
38780aa5a4 there is no need for these wildcards 2024-03-31 10:10:35 +02:00
Ralf Jung
b5642b361f extern-so: give the version script a better name; show errors from failing to build the C lib 2024-03-31 10:08:56 +02:00
Laurențiu Nicola
a4e02d7037 Merge commit 'f5a9250147f6569d8d89334dc9cca79c0322729f' into sync-from-ra 2024-03-31 09:57:00 +03:00
bors
c93b17d6d2 Auto merge of #123236 - klensy:tracing-tree-bump, r=Mark-Simulacrum
bump tracing-tree to 0.3

Only change in `tracing-tree` is https://github.com/davidbarsky/tracing-tree/pull/76
* dedupes `tracing-log`
* dupes `nu-ansi-term`
2024-03-31 06:21:53 +00:00
The Miri Cronjob Bot
eb8e8c06b6 Merge from rustc 2024-03-31 05:40:36 +00:00
The Miri Cronjob Bot
2dd824789c Preparing for merge from rustc 2024-03-31 05:33:07 +00:00
Oneirical
e477488267 Rewrite core-no-fp-fmt-parse in Rust
Rewrite core-no-fp-fmt-parse in Rust

fix: missing import

fix: tidiness check

more tidy checks

remove tidy line length ignore

new helper functions + arg_path generic

fix: remove unused import

delete arg_path, change arg_path to input
2024-03-30 19:40:18 -04:00
bors
723acede10 Auto merge of #3434 - RalfJung:stacked-borrows-cache-consistency, r=RalfJung
cotrol stacked borrows consistency check with its own feature flag

Fixes https://github.com/rust-lang/miri/issues/3431
2024-03-30 22:57:13 +00:00
Ralf Jung
10217fdec6 cotrol stacked borrows consistency check with its own feature flag 2024-03-30 23:10:43 +01:00
Ralf Jung
7f6d89dae9 move tests away from the slow Windows builder 2024-03-30 18:45:38 +01:00
Ralf Jung
9f6c675238 run GC stress test only for host tests 2024-03-30 17:58:34 +01:00
Ralf Jung
2a939422ca prepare_tool_cargo: add support for a miri-test mode, and use it in the cargo-miri smoke test and Miri sysroot build 2024-03-30 17:09:09 +01:00
bors
f04352a7dd Auto merge of #3430 - RalfJung:doc, r=RalfJung
make some doc comments not doc tests

`./miri test --doc` will run doctests even if we have them disabled (that's a cargo quirk: https://github.com/rust-lang/cargo/issues/13668). This fixes that command to not fail.
2024-03-30 15:45:01 +00:00
Ralf Jung
a8b0f6f239 make some doc comments not doc tests 2024-03-30 16:42:33 +01:00
klensy
71ea506d3d bump tracing-tree to 0.3
Only change is https://github.com/davidbarsky/tracing-tree/pull/76
dedupes tracing-log
dupes nu-ansi-term
2024-03-30 17:39:43 +03:00