]> git.lizzy.rs Git - rust.git/commit
Add an unstable `cast<U>() -> NonNull<U>` method to `NonNull<T>`.
authorSimon Sapin <simon.sapin@exyr.org>
Sun, 21 Jan 2018 08:56:33 +0000 (09:56 +0100)
committerSimon Sapin <simon.sapin@exyr.org>
Mon, 22 Jan 2018 08:22:21 +0000 (09:22 +0100)
commitb8ffc8a3d8c181e958d2ddf4f108f0cd3a108013
tree18776e03f199e7f63e8c38f2e6c3d6fe1aef7fe6
parent6461c9bdd35d6273b88f22fd5e8708eaf8949283
Add an unstable `cast<U>() -> NonNull<U>` method to `NonNull<T>`.

This is less verbose than going through raw pointers to cast with `as`.
src/libcore/ptr.rs