diff options
| author | Trevor Gross <t.gross35@gmail.com> | 2024-08-24 21:03:33 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-24 21:03:33 -0500 |
| commit | e96faab70bb0414979f99b1149201be5599d62ab (patch) | |
| tree | c9f200d97c8a7776160983dc7af40651e762adb7 /compiler/rustc_codegen_llvm/src | |
| parent | 093249af709b560ed767da588a37cafa6672ce6f (diff) | |
| parent | c65ef3d37c312dc0404da8b5c3f781d376778aad (diff) | |
| download | rust-e96faab70bb0414979f99b1149201be5599d62ab.tar.gz rust-e96faab70bb0414979f99b1149201be5599d62ab.zip | |
Rollup merge of #129449 - coolreader18:pin-as_deref_mut-signature, r=dtolnay
Put Pin::as_deref_mut in impl Pin<Ptr> / rearrange Pin methods Tracking issue: #86918 Based on the suggestion in https://github.com/rust-lang/rust/issues/86918#issuecomment-2189367582 > Some advantages: > > * Synergy with the existing `as_ref` and `as_mut` signatures (stable since Rust 1.33) > > * Lifetime elision reduces noise in the signature > > * Turbofish less verbose: `Pin::<&mut T>::as_deref_mut` vs `Pin::<&mut Pin<&mut T>>::as_deref_mut` The comment seemed to imply that `Pin::as_ref` and `Pin::as_mut` already share an impl block, which they don't. So, I rearranged it so that they do, and we can see which looks better in the docs. <details><summary><b>Docs screenshots</b></summary> Current nightly:  `Pin::as_deref_mut` moved into the same block as `as_mut`:  `Pin::as_ref`, `as_mut`, and `as_deref_mut` all in the same block:  </details> I think I like the last one the most; obviously I'm biased since I'm the one who rearranged it, but it doesn't make sense to me to have `as_ref` methods split up by an `into_inner` method. r? dtolnay
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
