Don't emit the same compiler diagnostic twice.
This PR makes the compiler filter out diagnostic messages that have already been emitted during the same compilation session.
Avoid unnecessary copies of arguments that are simple bindings
Initially MIR differentiated between arguments and locals, which
introduced a need to add extra copies assigning the argument to a
local, even for simple bindings. This differentiation no longer exists,
but we're still creating those copies, bloating the MIR and LLVM IR we
emit.
Additionally, the current approach means that we create debug info for
both the incoming argument (marking it as an argument), and then
immediately shadow it a local that goes by the same name. This can be
confusing when using e.g. "info args" in gdb, or when e.g. a debugger
with a GUI displays the function arguments separately from the local
variables, especially when the binding is mutable, because the argument
doesn't change, while the local variable does.
Initially MIR differentiated between arguments and locals, which
introduced a need to add extra copies assigning the argument to a
local, even for simple bindings. This differentiation no longer exists,
but we're still creating those copies, bloating the MIR and LLVM IR we
emit.
Additionally, the current approach means that we create debug info for
both the incoming argument (marking it as an argument), and then
immediately shadow it a local that goes by the same name. This can be
confusing when using e.g. "info args" in gdb, or when e.g. a debugger
with a GUI displays the function arguments separately from the local
variables, especially when the binding is mutable, because the argument
doesn't change, while the local variable does.
Update rls-data for save analysis
rls-data: 0.10 -> 0.11
This will allow for more fine-grained save analysis for enum variants (tuple and struct).
The first commit updates rls-data, and makes the changes to dump_visitor. The second commit updates the rls submodule, and removes "members" that were deleted from that update in src/Cargo.toml.
Note, that when building the project, rustfmt-nightly was updated in Cargo.lock. If these changes should be excluded, I can revert it.
cc/ @nrc
rustbuild: Fix `no output generated` error for next bootstrap cargo.
Due to rust-lang/cargo#4570, a `*.dll.lib` file is uplifted when building dynamic libraries on Windows. The current bootstrap code does not understand files with multiple extensions, and will instead assume `xxxx.dll` is the file name. This caused a `no output generated` error because it tries to search for `xxxx.dll-hash.lib` inside the `deps/` folder, while it should check for `xxxx-hash.dll.lib` instead.
This PR is blocking #45285, see https://github.com/rust-lang/rust/pull/45285#issuecomment-338454149 and the rest of the comments for detail.
Implement Hash for raw pointers to unsized types
This is useful for some niche cases, like a hash table of slices or trait objects where the key is the raw pointer. Example use case: https://docs.rs/by_address
Correct misspelling in error text: re-assignment => reassignment
[reassignment is the correct spelling](https://www.thefreedictionary.com/reassignment) rather than re-assignment; this error message looks silly in the book next to text trying to be grammatically correct :-/
Will this cause any stability/backcompat type issues?
This is an adaptation of alexcrichton/futures-rs#597 for the standard library.
The goal here is to avoid locking a mutex on the "fast path" for thread
park/unpark where you're waking up a thread that isn't sleeping or otherwise
trying to park a thread that's already been notified. Mutex performance varies
quite a bit across platforms so this should provide a nice consistent speed
boost for the fast path of these functions.
This is sort of a long overdue change from the investigation in #29293
and #37477. The released binaries of rustc don't have debug information and so
don't actively suffer this problem but this can hit local development of rustc
and also larger programs compiled against libstd generating backtraces.
The main purpose of the mmap allocator in libacktrace is to be usable from a
signal handler, but we don't do that, so the normal allocator using malloc/free
should work well for us.
Use 128 bit instead of Symbol for crate disambiguator
As discussed on gitter, this changes `crate_disambiguator` from Strings to what they are represented as, a 128 bit number.
There's also one bit I think also needs to change, but wasn't 100% sure how: [create_root_def](f338dba297/src/librustc/hir/map/definitions.rs (L468-L482)). Should I change `DefKey::root_parent_stable_hash` to accept `Fingerprint` as crate_disambiguator to quickly combine the hash of `crate_name` with the new 128 bit hash instead of a string for a disambiguator?
r? @michaelwoerister
EDIT: Are those 3 tests `mir-opt` failing, because the hash is different, because we calculate it a little bit differently (storing directly instead of hashing the hex-string representation)? Should it be updated like in #45319?
bootstrap: Add openssl configuration for sparc64-unknown-linux-gnu
Hi!
This adds the target missing mapping for sparc64-unknown-linux-gnu.
See: https://github.com/rust-lang/rust/issues/45456
Thanks