]> git.lizzy.rs Git - rust.git/commit - src/tools/rustfmt
Rollup merge of #81879 - imbrem:make-reverse-repr-transparent, r=m-ou-se
authorMara Bos <m-ou.se@m-ou.se>
Tue, 9 Mar 2021 09:05:19 +0000 (09:05 +0000)
committerGitHub <noreply@github.com>
Tue, 9 Mar 2021 09:05:19 +0000 (09:05 +0000)
commit0083e6c989160689858e5f6ae7a570c46f7f4f14
tree770e80fdc840c8d4ae30371f452bd9e3711546c8
parentc013dc01f1babb8f8e0dddcfdc69a84e8249161a
parentf847ff1511825224a19055f6d8646136becc15eb
Rollup merge of #81879 - imbrem:make-reverse-repr-transparent, r=m-ou-se

Added #[repr(transparent)] to core::cmp::Reverse

I found casting from an `&T` to an `&Reverse<T>` potentially useful, but found that `Reverse` was not `#[repr(transparent)]`, so after asking about it [on Reddit](https://www.reddit.com/r/rust/comments/le60uv/make_stdcmpreverse_reprtransparent_and_add_a/), I decided to go ahead and make a pull request which simply adds the attribute to the struct.