Skip to content
Snippets Groups Projects
Commit 942f6ae7 authored by bors's avatar bors
Browse files

Auto merge of #1217 - Susurrus:rfc_2235, r=gnzlbg

RFC 2235 - Implement PartialEq,Eq,Hash,Debug for all types

First pass at implementing [RFC2235](https://github.com/rust-lang/rfcs/blob/master/text/2235-libc-struct-traits.md). I just started with `PartialEq`/`Eq` and tested locally on my x64 Linux system. Definitely going to run into other types for other platforms that need this treatment, but thought I'd start small.

Open question is whether this should also rely on the `align` feature, which should improve which types can be auto-derived versus manually implemented (as it removed a lot of odd-sized padding arrays). My first pass here doesn't do that, but I might test it out to see if it does simplify quite a few structs. I think it might also be nice to have as it makes it easier for contributors to add new structs.

Part of rust-lang/rust#57715
parents 1f63b260 e33f7609
No related branches found
No related tags found
Loading
Showing with 760 additions and 458 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment