]> git.lizzy.rs Git - rust.git/commit
Add #[repr(transparent)] to Atomic* types
authorwillmo <willmo@gmail.com>
Sun, 8 Jul 2018 03:09:34 +0000 (20:09 -0700)
committerGitHub <noreply@github.com>
Sun, 8 Jul 2018 03:09:34 +0000 (20:09 -0700)
commite769deca998479c7b78931af45a26c6c822c74f7
tree58ca608a70663b84518e762183b6c5a0d991fa78
parent9fd3d7899a444fe110ae9277542b306844ecf0c4
Add #[repr(transparent)] to Atomic* types

This allows them to be used in #[repr(C)] structs without warnings. Since rust-lang/rfcs#1649 and rust-lang/rust#35603 they are already documented to have "the same in-memory representation as" their corresponding primitive types. This just makes that explicit.
src/libcore/sync/atomic.rs