]> git.lizzy.rs Git - rust.git/commit - src/tools/rust-analyzer
Rollup merge of #91127 - scottmcm:ptr_to_from_bits, r=dtolnay
authorMatthias Krüger <matthias.krueger@famsik.de>
Sat, 11 Dec 2021 07:22:29 +0000 (08:22 +0100)
committerGitHub <noreply@github.com>
Sat, 11 Dec 2021 07:22:29 +0000 (08:22 +0100)
commit2f8e2ff6ba7194424718e39f0482b6d350b5e170
tree07ebd5847fde2d41ab80ddd4fd2889f52848a669
parentc185610ebc19a0fc22e68472483dc69ea10b92fd
parent348a25044b6f263a61cd41cd3767c3d8d1e8da74
Rollup merge of #91127 - scottmcm:ptr_to_from_bits, r=dtolnay

Add `<*{const|mut} T>::{to|from}_bits`

Named based on the floating-point methods of the same name, as those are also about returning the *representation* of the value.

Tracking issue: https://github.com/rust-lang/rust/issues/91126

Based on the conversation in https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/Adding.20methods.20as.20more.20specific.20versions.20of.20.60as.60/near/238391074

r? `@joshtriplett`