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

Fix a #14731 regression in missing_constructor() for vector patterns #15081

Merged
merged 1 commit into from Jun 23, 2014
Merged

Fix a #14731 regression in missing_constructor() for vector patterns #15081

merged 1 commit into from Jun 23, 2014

Conversation

ghost
Copy link

@ghost ghost commented Jun 21, 2014

Fixes #15080.

bors added a commit that referenced this pull request Jun 22, 2014
@bors bors closed this Jun 23, 2014
@bors bors merged commit d4da4ba into rust-lang:master Jun 23, 2014
@ghost ghost deleted the issue-15080 branch July 2, 2014 23:42
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 17, 2023
Feature: Add a memory layout viewer

**Motivation**: rustc by default doesn't enforce a particular memory layout, however it can be useful to see what it is doing under the hood, or if using a particular repr ensure it is behaving how you want it to. This command provides a way to visually explore memory layouts of structures.

**Example**:
this structure:
```rust
struct X {
    x: i32,
    y: u8,
    z: Vec<bool>,
    w: usize,
}
```
produces this output:
<img width="692" alt="image" src="https://github.com/rust-lang/rust-analyzer/assets/22418744/e0312233-18a7-4bb9-ae5b-7b52fcff158a">

**Work yet to be done**:
- tests (see below)
- html is mildly janky (see below)
- enums and unions are viewed flatly, how should they be represented?
- should niches be marked somehow?

This was written for my own use, and the jank is fine for me, but in its current state it is probably not ready to merge mostly because it is missing tests, and also because the code quality is not great. However, before I spend time fixing those things idk if this is even something wanted, if it is I am happy to clean it up, if not that's cool too.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Spurious 'non-exhaustive patterns' error
1 participant