To make it obvious `compiletest`-the-tool has two components:
1. The core compiletest library, and
2. The tool binary, which will be executed by bootstrap.
Currently all build scripts are listed as `build_script_build` in the
stats header. This commit uses `CARGO_PKG_NAME` to improve that.
I tried it on Bevy, it works well, giving output like this on the build
script:
```
MACRO EXPANSION STATS: serde build script
```
and this on the crate itself:
```
MACRO EXPANSION STATS: serde
```
- `for` loops now use two `match`es for all of their bindings. I'm not
sure this is the most helpful way of conveying that, but it's about as
informative as before while staying brief.
- `while let` and `if let` don't use `match`; they use `let` expressions
in their conditions. Since `if let` no longer has significantly
different desugaring and having a whole bullet point for `while` would
feel redundant with `for`, I've removed those examples.
With a long macro name that could fit on one line, but currently isn't
formatted that way, because the name would overlap with the maximum
width of the "Uses" column. (The next commit will fix this.)
Shallowly bail from `coerce_unsized` more
We do a *lot* of coercion in HIR typeck. Most of the time we're just coercing a type to itself, but we always try `coerce_unsized` even if it's not necessary.
Let's avoid doing that by adding a fast path to `coerce_unsized`; see the comment in that function.
Closesrust-lang/rust-clippy#15163
This lint should not give suggestions in const context for now, since a
lot of the commonly used method of `Result` is not const.
changelog: [`cast_possible_truncation`] fix improperly give suggestions
inside const context
Various platforms provide a function to return the current OS thread ID,
but they all use a slightly different name. Add shims for these
functions for Apple, FreeBSD, and Windows, with tests to account for
those and a few more platforms that are not yet supported by Miri. The
syscall and extern symbol is included as well on Linux.
These should be useful in general but will also help support printing
the OS thread ID in panic messages [1].
[1]: https://github.com/rust-lang/rust/pull/115746
Squashed commit from Ralf:
try_from_scalar: extend comment