This commit adds some new `LocalDecl` methods:
- `with_source_info`, a most general constructor.
- `new`, a variant of `with_source_info` which represents the most
common use case.
- `internal` a modifying method (like the already present `immutable`).
It removes some old `LocalDecl` methods:
- `new_internal` and `new_local`, because they're subsumed by the new
methods.
- `new_return_place`, because it was identical to `new_temp`.
Finally, it cleans up all the use sites.
Update RLS
In addition to fixing the toolstate, this also changes the default
compilation model to the out-of-process one, which should hopefully
target considerable memory usage for long-running instances of the RLS.
Fixes#71753
r? @ghost
We don't want to export any symbols from Rust's version of libunwind
as these may collide with other copies of libunwind e.g. when linking
Rust staticlib together C/C++ libraries that have their own version.
In addition to fixing the toolstate, this also changes the default
compilation model to the out-of-process one, which should hopefully
target considerable memory usage for long-running instances of the RLS.
Rollup of 4 pull requests
Successful merges:
- #69984 (Add Option to Force Unwind Tables)
- #71830 (Remove clippy from some leftover lists of "possibly failing" tools)
- #71894 (Suggest removing semicolon in last expression only if it's type is known)
- #71897 (Improve docs for embed-bitcode and linker-plugin-lto)
Failed merges:
r? @ghost
Suggest removing semicolon in last expression only if it's type is known
Fixes#67971
Is there a syntax for explicitly checking if a note doesn't exist in test output? Something like `//~ !NOTE ...`
I believe r? @estebank deals with diagnostics.
Remove clippy from some leftover lists of "possibly failing" tools
https://github.com/rust-lang/rust/pull/70655 successfully made clippy get built and tested on CI on every merge, but the lack of emitted toolstate info caused the toolstate to get updated to test-fail. We should remove clippy entirely from toolstate, as it now is always test-pass.
The changes made in this PR reflect what we do for `rustdoc`, which is our preexisting tool that is gated on CI.
r? @Mark-Simulacrum
Add Option to Force Unwind Tables
When panic != unwind, `nounwind` is added to all functions for a target.
This can cause issues when a panic happens with RUST_BACKTRACE=1, as
there needs to be a way to reconstruct the backtrace. There are three
possible sources of this information: forcing frame pointers (for which
an option exists already), debug info (for which an option exists), or
unwind tables.
Especially for embedded devices, forcing frame pointers can have code
size overheads (RISC-V sees ~10% overheads, ARM sees ~2-3% overheads).
In production code, it can be the case that debug info is not kept, so it is useful
to provide this third option, unwind tables, that users can use to
reconstruct the call stack. Reconstructing this stack is harder than
with frame pointers, but it is still possible.
---
This came up in discussion on #69890, and turned out to be a fairly simple addition.
r? @hanna-kruppe
By merging the undo_log of all structures part of the snapshot the cost
of creating a snapshot becomes much cheaper. Since snapshots with no or
few changes are so frequent this ends up mattering more than the slight
overhead of dispatching on the variants that map to each field.