Re-enable ThinLTO for rustc on `x86_64-apple-darwin`
ThinLTO was disabled on x64 mac in https://github.com/rust-lang/rust/pull/105646 because of the https://github.com/rust-lang/rust/issues/105637 regression.
It was later discovered that the issue was present on other targets as well, as the mac revert was already landing. The linux/win reverts, however, did not land before the root cause was identified.
https://github.com/rust-lang/rust/pull/105800 fixed the underlying issue in `-Zdylib-lto` handling, and the x64 msvc and linux targets are now fixed, ICEs are using the correct `rustc_driver` panic hook.
This PR re-enables ThinLTO on mac for improved perf now that the issue should be fixed everywhere.
Rollup of 8 pull requests
Successful merges:
- #105419 (Add tests for #41731)
- #105447 (Add a test for #103095)
- #105842 (print argument name in arg mismatch if possible)
- #105863 (Update browser-ui-test version to reduce GUI tests flakyness)
- #105867 (remove redundant fn params that were only "used" in recursion)
- #105869 (don't clone Copy types)
- #105873 (use &str / String literals instead of format!())
- #105879 (Revert "Introduce lowering_arena to avoid creating AST nodes on the fly")
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
Revert "Introduce lowering_arena to avoid creating AST nodes on the fly"
This reverts commit d9a1faaa9c (#101499).
This was originally part of #101345 which has now been closed as a different approach is taken now.
r? `@oli-obk`
cc `@spastorino`
print argument name in arg mismatch if possible
A bit more contextual than just `/* value */`, at least when the argument is named something related to its context.
The UI test cases are... not super convincing, but also they're minimized tests.
Fix `x setup -h -v` should work
r? `@jyn514`
I have to convert profile to path and back in order to remove special-casing in bootstrap. I also check for `dry_run` so that `config.toml` and/ or `.git/hooks/pre-push` will not be created if `--dry-run` is specified.
Please help me see if this is ok, thanks alot!
Run `x test tidy` sooner in mingw-check
It takes less time to run than the other tests and is more likely to fail. `expand-yaml-anchors` is still run first to make sure the CI files are internally consistent.
Note that changing to `--stage 0` doesn't actually do anything since bootstrap tools are always built with the bootstrap compiler, this just makes it less confusing.
cc 83bab41b5b
Migrate rustc_mir_build diagnostics
Rebases https://github.com/rust-lang/rust/pull/100854
~~The remaining issue is how to better resolve 72bea68af4~~
~~The diagnostic macros seems to generate a broken diagnostic, and I couldn't figure out how to manually format the fluent message, so I hardcoded the format string for now. I'd like pointers to a better fix for this.~~
Also, I'm not 100% sure I didn't mess up a rebase somewhere 🙂
r? `@davidtwco`
fs: Fix#50619 (again) and add a regression test
Bug #50619 was fixed by adding an end_of_stream flag in #50630.
Unfortunately, that fix only applied to the readdir_r() path. When I
switched Linux to use readdir() in #92778, I inadvertently reintroduced
the bug on that platform. Other platforms that had always used
readdir() were presumably never fixed.
This patch enables end_of_stream for all platforms, and adds a
Linux-specific regression test that should hopefully prevent the bug
from being reintroduced again.
std::fmt: Use args directly in example code
The lint "clippy::uninlined_format_args" recommends inline variables in format strings. Fix two places in the docs that do not do this. I noticed this because I copy/pasted one example in to my project, then noticed this lint error. This fixes:
```
error: variables can be used directly in the `format!` string
--> src/main.rs:30:22
|
30 | let string = format!("{:.*}", decimals, magnitude);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: variables can be used directly in the `format!` string
--> src/main.rs:39:2
|
39 | write!(&mut io::stdout(), "{}", args).unwrap();
```
Speed up tidy
This can be reviewed commit by commit since they contain separate optimizations.
```
# master
$ taskset -c 0-5 hyperfine './x test tidy'
Benchmark #1: ./x test tidy
Time (mean ± σ): 4.857 s ± 0.064 s [User: 12.967 s, System: 2.014 s]
Range (min … max): 4.779 s … 4.997 s 10 runs
# PR
$ taskset -c 0-5 hyperfine './x test tidy'
Benchmark #1: ./x test tidy
Time (mean ± σ): 3.672 s ± 0.035 s [User: 10.524 s, System: 2.029 s]
Range (min … max): 3.610 s … 3.725 s 10 runs
```
Support call and drop terminators in custom mir
The only caveat with this change is that cleanup blocks are not supported. I would like to add them, but it's not quite clear to me what the best way to do that is, so I'll have to think about it some more.
r? ``@oli-obk``