Skip to content
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

Merged
merged 21 commits into from
Aug 1, 2022
Merged

Rollup of 7 pull requests #99998

merged 21 commits into from
Aug 1, 2022

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Urgau and others added 21 commits July 20, 2022 18:28
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`
…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`
@rustbot rustbot added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Jul 31, 2022
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=10

@bors
Copy link
Contributor

bors commented Jul 31, 2022

📌 Commit 20a5e9f has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jul 31, 2022
@bors
Copy link
Contributor

bors commented Aug 1, 2022

⌛ Testing commit 20a5e9f with merge 6423ab3...

@bors
Copy link
Contributor

bors commented Aug 1, 2022

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 6423ab3 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 1, 2022
@bors bors merged commit 6423ab3 into rust-lang:master Aug 1, 2022
@rustbot rustbot added this to the 1.64.0 milestone Aug 1, 2022
@rust-highfive
Copy link
Collaborator

📣 Toolstate changed by #99998!

Tested on commit 6423ab3.
Direct link to PR: #99998

🎉 miri on windows: test-fail → test-pass (cc @RalfJung @oli-obk).

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Aug 1, 2022
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).
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (6423ab3): comparison url.

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results
  • Primary benchmarks: 😿 relevant regression found
  • Secondary benchmarks: no relevant changes found
mean1 max count2
Regressions 😿
(primary)
3.0% 3.0% 1
Regressions 😿
(secondary)
N/A N/A 0
Improvements 🎉
(primary)
N/A N/A 0
Improvements 🎉
(secondary)
N/A N/A 0
All 😿🎉 (primary) 3.0% 3.0% 1

Cycles

Results
  • Primary benchmarks: 😿 relevant regressions found
  • Secondary benchmarks: no relevant changes found
mean1 max count2
Regressions 😿
(primary)
4.4% 6.3% 2
Regressions 😿
(secondary)
N/A N/A 0
Improvements 🎉
(primary)
N/A N/A 0
Improvements 🎉
(secondary)
N/A N/A 0
All 😿🎉 (primary) 4.4% 6.3% 2

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

Footnotes

  1. the arithmetic mean of the percent change 2

  2. number of relevant changes 2

@matthiaskrgr matthiaskrgr deleted the rollup-igafy0r branch October 9, 2022 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.