add a test for #60976
The test fails on 1.36.0 but passes on master.
Huge thanks for @hellow554 actually digging out the minimized version of the
repro.
Fixes#60976.
Do not ICE on multipart suggestions touching multiple files
When encountering a multipart suggestion with spans belonging to
different contexts, skip that suggestion.
Fix#68449. Similar to #68256.
rustc: Allow cdylibs to link against dylibs
Previously, rustc mandated that cdylibs could only link against rlibs as dependencies (not dylibs).
This commit disables that restriction and tests that it works in a simple case.
I don't have a windows rustc dev environment, so I guessed at the MSVC test code, I'm hoping the CI can run that for me.
Additionally, we might want to consider emitting (through cargo or rustc) some metadata to help C users of a cdylib figure out where all the dylibs they need are. I don't think that should be needed to land this change, as it will still be usable by homogeneous build systems without it.
My new test was templated off the `tests/run-make-fulldeps/cdylib` test. It seemed more appropriate to have it as a separate test, since both foo.rs and bar.rs would need to be replicated to make that test cover both cases, but I can do that if it would be preferred.
If I'm doing anything out of order/process, please let me know; this is only my second change to rustc and the prior one was trivial.
r? alexcrichton
Fix invalid link to the C++ Exception Handling ABI documentation
The original link is longer valid(404). I am assuming it's meant to be pointed to the Itanium C++ Exception Handling ABI documentation.
Also share drop-glue when compiling with -Zshare-generics (i.e. at opt-level=0)
This PR adds drop-glue to the set of monomorphizations that can be shared across crates via `-Zshare-generics`.
This version of the PR might have detrimental effects on performance as it makes lots of stuff dependent on a single query results (`upstream_monomorphizations_for(def_id_of_drop_in_place)`). That should be fixable but let's do a perf run first.
Potentially fixes issue https://github.com/rust-lang/rust/issues/64140. (cc @alexcrichton)
The changes here are related to @matthewjasper's https://github.com/rust-lang/rust/pull/67332 but should be mostly orthogonal.
r? @ghost
Rollup of 7 pull requests
Successful merges:
- #68424 (Suggest borrowing `Vec<NonCopy>` in for loop)
- #68438 (Account for non-types in substs for opaque type error messages)
- #68469 (Avoid overflow in `std::iter::Skip::count`)
- #68473 (Enable ASan on Fuchsia)
- #68479 (Implement `unused_parens` for block return values)
- #68483 (Add my (@flip1995) name to .mailmap)
- #68500 (Clear out std, not std tools)
Failed merges:
r? @ghost
Clear out std, not std tools
This was a typo that slipped in, and meant that we were still not properly
clearing out std.
This is basically #67760 but actually correct...
Enable ASan on Fuchsia
This change adds the x86_64-fuchsia and aarch64-fuchsia LLVM targets to
those allowed to invoke -Zsanitizer. Currently, the only overlap between
compiler_rt sanitizers supported by both rustc and Fuchsia is ASan.
Avoid overflow in `std::iter::Skip::count`
The call to `count` on the inner iterator can overflow even if `Skip` itself would return less that `usize::max_value()` items.
Fixes#68139
Account for non-types in substs for opaque type error messages
Fixes#68368
Previously, I assumed that the substs contained only types, which caused
the computed index number to be wrong.