Use informational target machine for metadata
Since there is nothing to optimise there...
Should fix#58323 but haven’t tested locally.
r? @michaelwoerister
Use 'write_all' instead of 'write' in example code
Using `write` without looping and checking the result can cause silent data loss. Example code should use `write_all` so that people don't copy this pattern. (Of course this does not include example code for docs that are specifically about the `write` method.)
Use `SmallVec` in `TokenStreamBuilder`.
This reduces by 12% the number of allocations done for a "clean incremental" of `webrender_api`, which reduces the instruction count by about 0.5%.
r? @petrochenkov
bootstrap: build crates under libtest with -Z emit-stack-sizes
Please see the comment in the diff for the rationale.
This change adds a `.stack_sizes` linker section to `libcompiler_builtins.rlib`
but this section is discarded by the linker by default so it won't affect the
binary size of most programs. It will, however, negatively affect the binary
size of programs that link to a recent release of the `cortex-m-rt` crate
because of the linker script that crate provides, but I have proposed a PR
(rust-embedded/cortex-m-rt#186) to solve the problem (which I originally
introduced :-)).
This change does increase the size of the `libcompiler_builtins.rlib` artifact we
distribute but the increase is in the order of (a few) KBs.
r? @alexcrichton
Combine all builtin late lints and make lint checking parallel
Blocked on https://github.com/rust-lang/rust/pull/57293.
Cuts runtime of late lint checking from 3.222s to 0.546s with 8 threads on `winapi` (@retep998 ;) )
r? @estebank
This reduces by 12% the number of allocations done for a "clean
incremental" of `webrender_api`, which reduces the instruction count by
about 0.5%.
It also reduces instruction counts by up to 1.4% across a range of
rustc-perf benchmark runs.
Rollup of 10 pull requests
Successful merges:
- #58717 (Add FromStr impl for NonZero types)
- #59091 (Combine input and eval_always query types)
- #59216 (Type dependent defs wrappers)
- #59318 (rustc: Update linker flavor inference from filename)
- #59320 (rustc: Allow using `clang` for wasm32 targets)
- #59363 (#59361 Moved rustc edition opt to short list)
- #59371 (ffi: rename VaList::copy to VaList::with_copy)
- #59398 (Add a way to track Rustfix UI test coverage)
- #59408 (compiletest: make path normalization smarter)
- #59429 (When moving out of a for loop head, suggest borrowing it in nll mode)
Failed merges:
r? @ghost
This commit removes the check that disallows the `#[non_exhaustive]`
attribute from being placed on enum variants and removes the associated
tests.
Further, this commit lowers the visibility of enum variant constructors
when the variant is marked as non-exhaustive.
Add a way to track Rustfix UI test coverage
This came out of the first Rustfix WG meeting.
One of the goals is to enable Rustfix tests for all UI tests that
trigger lints with `MachineApplicable` suggestions. In order to do that
we first want to create a tracking issue that lists all files with
missing `// run-rustfix` headers.
This PR adds a `--rustfix-coverage` flag to `./x.py` and compiletest to
list the files with the missing headers in `/tmp/rustfix_missing_coverage.txt`.
From that file we can create the tracking issue and at some point also
enforce the `// run-rustfix` flag on UI tests with `MachineApplicable`
lints.
rustc: Allow using `clang` for wasm32 targets
This commit adds support code for using `clang` directly to link the
wasm32-unknown-unknown target. Currently the target is only really
configured to link with LLD directly, but this ensures that `clang` can
be configured as well.
While not immediately useful in the near term it's likely that more
wasm32 targets will pop up over time with Clang's new native support for
WebAssembly in the 8.0.0 release. Getting support into rustc early
should make it easier to experiment with these targets and try out
various changes here and there.