-
Couldn't load subscription status.
- Fork 13.9k
Rollup of 7 pull requests #99998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 7 pull requests #99998
Conversation
Prior to this fix, `-Z location-detail` provided no mechanism for disabling all location details. This commit also adds a test case to verify that this option continues to work as intended, and clarifies the documentation of this option.
This came up on armv7-apple-ios when using -Zbuild-std
…enkov Remove implicit names and values from `--cfg` in `--check-cfg` This PR remove the implicit names and values from `--cfg` in `--check-cfg` because the behavior is quite surprising but also because it's really easy to inadvertently really on the implicitness and when the `--cfg` is not set anymore to have an unexpected warning from an unexpected condition that pass with the implicitness. This change in behavior will also enable us to warn when an unexpected `--cfg` is passed, ex: the user wrote `--cfg=unstabl` instead of `--cfg=unstable`. The implementation of the warning will be done in a follow-up PR. cc `@petrochenkov`
…=davidtwco `-Z location-detail`: provide option to disable all location details As reported [here](rust-lang#89920 (comment)), when I first implemented the `-Z location-detail` flag there was a bug, where passing an empty list was not correctly supported, and instead rejected by the compiler. This PR fixes that such that passing an empty list results in no location details being tracked, as originally specified in rust-lang/rfcs#2091 . This PR also adds a test case to verify that this option continues to work as intended.
…ons, r=Amanieu Fix unwinding on certain platforms when debug assertions are enabled This came up on `armv7-apple-ios` when using `-Zbuild-std`. Looks like this is a leftover from a [conversion from C to Rust](051c2d1), where integer wrapping is implicit. Not at all sure how the unwinding code works!
Layout things These two commits are pretty independent, but didn't seem worth doing individual PRs for: - Always check that size is a multiple of align, even without debug assertions - Change Layout debug printing to put `variants` last, since it often huge and not usually the part we are most interested in Cc `@eddyb`
…lan-DPC Remove more Clean trait implementations This time as well it allowed to remove a function. Follow-up of rust-lang#99638. r? `@notriddle`
…crum Fix compat.rs for `cfg(miri)` Fixes rust-lang#99982
…gestion, r=compiler-errors
Add wrap suggestions for record variants
This PR adds a suggestions to wrap an expression in a record struct/variant when encountering mismatched types, similarly to a suggestion to wrap expression in a tuple struct that was added before.
An example:
```rust
struct B {
f: u8,
}
enum E {
A(u32),
B { f: u8 },
}
fn main() {
let _: B = 1;
let _: E = 1;
}
```
```text
error[E0308]: mismatched types
--> ./t.rs:11:16
|
11 | let _: B = 1;
| - ^ expected struct `B`, found integer
| |
| expected due to this
|
help: try wrapping the expression in `B`
|
11 | let _: B = B { f: 1 };
| ++++++ +
error[E0308]: mismatched types
--> ./t.rs:12:16
|
12 | let _: E = 1;
| - ^ expected enum `E`, found integer
| |
| expected due to this
|
help: try wrapping the expression in a variant of `E`
|
12 | let _: E = E::A(1);
| +++++ +
12 | let _: E = E::B { f: 1 };
| +++++++++ +
```
r? `@compiler-errors`
|
@bors r+ rollup=never p=10 |
|
☀️ Test successful - checks-actions |
Tested on commit rust-lang/rust@6423ab3. Direct link to PR: <rust-lang/rust#99998> 🎉 miri on windows: test-fail → test-pass (cc @RalfJung @oli-obk).
|
Finished benchmarking commit (6423ab3): comparison url. Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
Successful merges:
--cfgin--check-cfg#99519 (Remove implicit names and values from--cfgin--check-cfg)-Z location-detail: provide option to disable all location details #99620 (-Z location-detail: provide option to disable all location details)cfg(miri)#99984 (Fix compat.rs forcfg(miri))Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup