The remote-test-client outputs a message of the form "uploaded
"<build_dir>/<executable_path>", waiting for result" onto stdout when
executing a test, which is then captured in the process result. This needs to be removed when
comparing the results of the run-pass test execution.
Rollup of 5 pull requests
Successful merges:
- #64049 (Emit a single error on if expr with expectation and no else clause)
- #64056 (Account for arbitrary self types in E0599)
- #64058 (librustc_errors: Extract sugg/subst handling into method)
- #64071 (use just one name when parameters and fields are the same)
- #64104 (Emit error on intrinsic to fn ptr casts)
Failed merges:
r? @ghost
Emit error on intrinsic to fn ptr casts
I'm not sure if a type error is the best way of doing this but it seemed like a relatively correct place to do it, and I expect this is a pretty rare case to hit anyway.
Fixes#15694
librustc_errors: Extract sugg/subst handling into method
An initial refactoring before working on #61809.
This moves the whole block into a method so that it can be reused in the
annotate-snippet emitter. The method is already used in the new emitter, but
there's no UI tests with suggestions included in this PR.
A first look at some UI tests with suggestions showed that there's some
more work to do in [annotate-snippet-rs][annotate-snippet-rs] before the new output is closer to the
current one, so I opted to do that in a second step.
r? @estebank
[annotate-snippet-rs]: https://github.com/rust-lang/annotate-snippets-rs
Fix build failure in case file doesn't exist
It fixes the following issue:
```bash
$ ./x.py test src/tools/linkchecker ./build/x86_64-apple-darwin/doc/ --stage 1
Updating only changed submodules
Submodules updated in 0.05 seconds
Finished dev [unoptimized] target(s) in 0.15s
thread 'main' panicked at 'source "/Users/imperio/rust/rust/build/x86_64-apple-darwin/doc/version_info.html" failed to get metadata: No such file or directory (os error 2)', src/build_helper/lib.rs:179:19
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
failed to run: /Users/imperio/rust/rust/build/bootstrap/debug/bootstrap test src/tools/linkchecker ./build/x86_64-apple-darwin/doc/ --stage 1
Build completed unsuccessfully in 0:00:01
```
If the file doesn't exist, it makes sense anyway to just run the command in order to generate it.
r? @Mark-Simulacrum
Make Allocation::bytes private
Fixes#62931.
Direct immutable access to the bytes is still possible but redirected through the new method `raw_bytes_with_undef_and_ptr`, similar to `get_bytes_with_undef_and_ptr` but without requiring an interpretation context and not doing *any* relocation or bounds checks. The `size` of the allocation is stored separately which makes access as `Size` and `usize` more ergonomic.
cc: @RalfJung
PR #63580 broke miri's ability to run the run-pass test suite with MIR
optimizations enabled. The issue was that we weren't properly handling
the substs and DefId associated with a Promoted value. This didn't break
anything in rustc because in rustc this code runs before the Inliner
pass which is where the DefId and substs can diverge from their initial
values. It broke Miri though because it ran this code again after
running the optimization pass.
Ignores run-pass tests with the `check-run-results` flag enabled for the
wasm32-bare ("wasm32-unknown-unknown") target, as it does not support
printing to stdout/stderr.
remove the unstable rustdoc parameter --linker
use the code generation parameter -Clinker (same parameter as rustc)
to control what linker to use for building the rustdoc test executables.
closes: #63816