Rustbuild usually writes the LLVM submodule commit in a stamp file, so
we can avoid rebuilding it unnecessarily. However, for builds from a
source tarball (non-git), we were assuming a rebuild is always needed.
This can cause a lot of extra work if any environment like `CFLAGS`
changed between steps like build and install, which are often separate
in distro builds.
Now we also write an empty stamp file if the git commit is unknown, and
its presence is trusted to indicate that no rebuild is needed. An info
message reports that this is happening, along with the stamp file path
that can be deleted to force a rebuild anyway.
Allow checking of run-pass execution output in compiletest
Closes#63751
Adds a `check-run-results` flag to compiletest headers, which if enabled checks the output of the execution of a run-pass test's binary against expected output.
They are only used by rustc_lexer, and are not needed elsewhere.
So we move the relevant definitions into rustc_lexer (while the actual
unicode data comes from the unicode-xid crate) and make the rest of
the compiler use it.
Add Result::cloned{,_err} and Result::copied{,_err}
This is a little nice addition to `Result`.
1. I'm not sure how useful are `cloned_err` and `copied_err`, but for the sake of completeness they are here.
2. Naming is similar to `map`/`map_err`. I thought about naming `cloned` as `cloned_ok` and add another method called `cloned` that clones both Ok and Err, but `cloned_ok` should be more prevalent than `cloned_both`.
- var_starts_path
- parent
- initialized_at
- moved_out_at
This also switches to the intended emission of `var_drop_used` fact emission,
where that fact is always emitted on a drop-use of a variable, regardless of its
initialization status, as Polonius now handles that.
And remove the `unsafe` blocks, they're not necessary.
Also rewrite `InternedString::{with,with2}` to use the new functions.
Finally, add some comments about the speed of the
`as_str()`/`as_interned_str()` functions.
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