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

Suggestion for incorrect `repr` use #61286

Open
estebank opened this issue May 28, 2019 · 0 comments
Open

Suggestion for incorrect `repr` use #61286

estebank opened this issue May 28, 2019 · 0 comments

Comments

@estebank
Copy link
Contributor

@estebank estebank commented May 28, 2019

When encountering #[repr = "C"], suggest #[repr(C)] instead of the current #[repr(C, packed, ...)]. We need to detect specific cases like writing #[repr("packed")], where we should suggest #[repr(packed)], as otherwise provide a list of all the valid reprs.

(Follow up to #61140)

@estebank estebank added the D-papercut label Oct 5, 2019
PotHix added a commit to PotHix/rust that referenced this issue Nov 8, 2019
The code was previously suggesting `#[repr(C, packed, ...)]` for
incorrect uses of `repr` (e.g. `#[repr = "C"]`). This change suggests
the usage of `#[repr(C)]` instead.

r? @estebank

Fixes rust-lang#61286.
PotHix added a commit to PotHix/rust that referenced this issue Nov 8, 2019
The code was previously suggesting `#[repr(C, packed, ...)]` for
incorrect uses of `repr` (e.g. `#[repr = "C"]`). This change suggests
the usage of `#[repr(C)]` instead.

r? @estebank

ref rust-lang#61286
PotHix added a commit to PotHix/rust that referenced this issue Nov 8, 2019
The code was previously suggesting `#[repr(C, packed, ...)]` for
incorrect uses of `repr` (e.g. `#[repr = "C"]`). This change suggests
the usage of `#[repr(C)]` instead.

r? @estebank

ref rust-lang#61286
bors added a commit that referenced this issue Nov 19, 2019
Suggest `#[repr(C)]` instead of `#[repr(C, packed, ...)]`

The code was previously suggesting `#[repr(C, packed, ...)]` for incorrect uses of `repr` (e.g. `#[repr = "C"]`). This change suggests the usage of `#[repr(C)]` instead.

r? @estebank

Ref: #61286.
aradzie added a commit to aradzie/rust that referenced this issue Nov 19, 2019
The code was previously suggesting `#[repr(C, packed, ...)]` for
incorrect uses of `repr` (e.g. `#[repr = "C"]`). This change suggests
the usage of `#[repr(C)]` instead.

r? @estebank

ref rust-lang#61286
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.