Make panic unwind the default for aarch64-*-windows-msvc targets
With the llvm fixes from rust-lang/llvm-project#45 (included as a submodule change) we can enable unwinding by default for these targets.
Fixes#65313
There are still a small number of test failures for which we can open individual issues.
r? @alexcrichton
Rollup of 7 pull requests
Successful merges:
- #70553 (move OS constants to platform crate)
- #70665 (Do not lose or reorder user-provided linker arguments)
- #70750 (Match options directly in the Fuse implementation)
- #70782 (Stop importing the float modules in documentation)
- #70798 ("cannot resolve" → "cannot satisfy")
- #70808 (Simplify dtor registration for HermitCore by using a list of destructors)
- #70824 (Remove marker comments in libstd/lib.rs macro imports)
Failed merges:
r? @ghost
Remove marker comments in libstd/lib.rs macro imports
These comments were probably moved around when rustfmt was introduced. They don't correctly denote what they were intended for, so I propose we remove them instead. Thanks!
Simplify dtor registration for HermitCore by using a list of destructors
The implementation is similar to the macOS version and doesn't depend on additional OS support
Stop importing the float modules in documentation
Follow up to #69860. I realized I had not searched for and fixed this for the float values. So with this PR they also use the associated constants instead of the module level constants.
For the documentation where it also was using the `consts` submodule I opted to change it to import that directly. This becomes more in line with how other docs that use the `consts` submodule looks. And it also makes it so there are not two `f32` or `f64` things in the current namespace (both the module and the primitive type) and then hopefully confusing documentation readers less.
r? @dtolnay
Match options directly in the Fuse implementation
Rather than using `as_ref()`, `as_mut()`, and `?`, we can use `match` directly to save a lot of generated code. This was mentioned as a possibility in https://github.com/rust-lang/rust/pull/70366#issuecomment-603462546, and I found that it had a very large impact on #70332 using `Fuse` within `Chain`. Let's evaluate this change on its own first.
Do not lose or reorder user-provided linker arguments
Linker arguments are potentially order-dependent, so the order in which `-C link-arg` and `-C link-args` options are passed to `rustc` should be preserved when they are passed further to the linker.
Also, multiple `-C link-args` options are now appended to each other rather than overwrite each other.
In other words, `-C link-arg=a -C link-args="b c" -C link-args="d e" -C link-arg=f` is now passed as `"a" "b" "c" "d" "e" "f"` and not as `"d" "e" "a" "f"`.
Addresses https://github.com/rust-lang/rust/pull/70505#issuecomment-606780163.
Rollup of 5 pull requests
Successful merges:
- #67797 (Query-ify Instance::resolve)
- #70777 (Don't import integer and float modules, use assoc consts)
- #70795 (Keep track of position when deleting from a BTreeMap)
- #70812 (Do not use "nil" to refer to `()`)
- #70815 (Enable layout debugging for `impl Trait` type aliases)
Failed merges:
r? @ghost
Do not use "nil" to refer to `()`
"nil" is not used in the [book](https://doc.rust-lang.org/book) or in the [standard library](https://doc.rust-lang.org/std) anywhere else. Because "nil" is often used in programming languages to refer to "None" or "null" I think it could be a little confusing for newcomers to see this type referred to as "nil".
Keep track of position when deleting from a BTreeMap
This improves the performance of drain_filter and is needed for future Cursor support for BTreeMap.
cc @ssomers
r? @Mark-Simulacrum
Don't import integer and float modules, use assoc consts
Stop importing the standard library integer and float modules to reach the `MIN`, `MAX` and other constants. They are available directly on the primitive types now.
This PR is a follow up of #69860 which made sure we use the new constants in documentation.
This type of change touches a lot of files, and previously all my assoc int consts PRs had collisions and were accepted only after a long delay. So I'd prefer to do it in smaller steps now. Just removing these imports seem like a good next step.
r? @dtolnay
Query-ify Instance::resolve
Split off from #65989
Instance::resolve is now a wrapper for a new `resolve_instance` query.
This greatly improves performance on several benchmarks
clarify comment in RawVec::into_box
On first reading I almost thought "len <= cap" would be all that there is to check here. Expand the comment to clarify that that is not the case.
Fix some aliasing issues in Vec
`Vec::extend` and `Vec::truncate` invalidated references into the vector even without reallocation, because they (implicitly) created a mutable reference covering the *entire* initialized part of the vector.
Fixes https://github.com/rust-lang/rust/issues/70301
I verified the fix by adding some new tests here that I ran in Miri.