Lint: warn when mixing #[repr(C)] with Drop#24935
Conversation
|
(rust_highfive has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
I believe we generally start compiler messages with a lower case.
There was a problem hiding this comment.
I wonder if this message could also be rephrased slightly, maybe:
implementing
Dropadds hidden state to a struct, possibly conflicting with the#[repr(C)]attribute
There was a problem hiding this comment.
I didn't like the fact that I was referring solely to "structs" anyway, when this is slightly more general than that. So, that's fixed now. :)
|
Just a few minor nits, otherwise r=me though. Thanks @pnkfelix! |
THis includes tests for struct and enum. (I suspect the closure case is actually unreachable, but i see no harm in including it.)
30d29c9 to
2e23d81
Compare
Lint: warn when mixing `#[repr(C)]` with Drop Fix rust-lang#24585
|
triage: beta-nominated |
|
accepted for backport to beta channel. (this is special case for 1.0; post 1.0 a change like this might need stronger motivation...) |
|
Backported. |
Lint: warn when mixing
#[repr(C)]with DropFix #24585