rust: pin-init: fix broken rust doc link
Subsystems (2)
Benno Lossin
maintainerPATCH 1/2 rust: pin-init: fix broken rust doc link
Rust 1.92.0 warns when building the documentation that [PinnedDrop] is an invalid reference. This is correct and it's weird that it didn't warn before, so fix the link.
--- rust/pin-init/src/macros.rs | 2 ++ 1 file changed, 2 insertions(+)
rust/pin-init/src/macros.rs +2 -0
@@ -506,6 +506,8 @@/// Creates a `unsafe impl<...> PinnedDrop for $type` block. /// /// See [`PinnedDrop`] for more information. +/// +/// [`PinnedDrop`]: crate::PinnedDrop #[doc(hidden)] #[macro_export] macro_rules! __pinned_drop {
base-commit: 3a8660878839faadb4f1a6dd72c3179c1df56787
Signature · 1 line
2.51.0
Benno Lossin
maintainerPATCH 2/2 rust: pin-init: fix typo in docs
From: Brian Harring <[email protected]>
--- rust/pin-init/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
rust/pin-init/README.md +1 -1
@@ -9,7 +9,7 @@ > [!NOTE] > > This crate was originally named [`pinned-init`], but the migration to -> `pin-init` is not yet complete. The `legcay` branch contains the current +> `pin-init` is not yet complete. The `legacy` branch contains the current > version of the `pinned-init` crate & the `main` branch already incorporates > the rename to `pin-init`. >
Signature · 1 line
2.51.0
Quoted 4 lines · Benno Lossin
Rust 1.92.0 warns when building the documentation that [
PinnedDrop] is an invalid reference. This is correct and it's weird that it didn't warn before, so fix the link.
It is because it is hidden -- I have patches to fix this (it is not just in pin-init but elsewhere too), but I am waiting for confirmation on whether this is actually intentional behavior:
https://github.com/rust-lang/rust/pull/147153#issuecomment-3395484636
From the early reply I got, it seems it is not, so it may be that it is "fixed".
Personally, I think it is useful, so I hope they keep it, even if as a new opt-in option or similar.
Of course, we can land this patch since it does not matter either way, but please add a note with the above in the commit message if you land it.
Thanks!
Cheers,
Miguel
Benno Lossin
maintainerQuoted 12 lines · Miguel Ojeda
Quoted 4 lines · Benno Lossin
Rust 1.92.0 warns when building the documentation that [
PinnedDrop] is an invalid reference. This is correct and it's weird that it didn't warn before, so fix the link.It is because it is hidden -- I have patches to fix this (it is not just in pin-init but elsewhere too), but I am waiting for confirmation on whether this is actually intentional behavior:
https://github.com/rust-lang/rust/pull/147153#issuecomment-3395484636
Quoted 8 lines
From the early reply I got, it seems it is not, so it may be that it is "fixed".
Personally, I think it is useful, so I hope they keep it, even if as a new opt-in option or similar.
Of course, we can land this patch since it does not matter either way, but please add a note with the above in the commit message if you land it.
Thanks a lot for the added context! I will add it when applying. The __pinned_drop! macro will be gone with the syn patches this cycle, so in this case, we don't care what the resolution will be.
---
Cheers,
Benno
Quoted 4 lines · Benno Lossin
Thanks a lot for the added context! I will add it when applying. The
__pinned_drop!macro will be gone with the syn patches this cycle, so in this case, we don't care what the resolution will be.
In the end, it wasn't intentional, so Guillaume created this PR:
https://github.com/rust-lang/rust/pull/147809
Thus 1.92 may end up without this change in behavior.
Guillaume and I also discussed the possibility of checking these things nevertheless (i.e. without needing a second pass) as well as the related topic of having a runtime solution for toggling private/hidden items (and thus getting them checked too). We could perhaps try a custom thing in rust.docs.kernel.org to see how it looks and if people like it.
Cheers,
Miguel
Indeed, although, please open an issue on rust repository so the team can discuss how this feature would look like.
Quoted 22 lines · Miguel Ojeda
Quoted 4 lines · Benno Lossin
Thanks a lot for the added context! I will add it when applying. The
__pinned_drop!macro will be gone with the syn patches this cycle, so in this case, we don't care what the resolution will be.In the end, it wasn't intentional, so Guillaume created this PR:
https://github.com/rust-lang/rust/pull/147809Thus 1.92 may end up without this change in behavior.
Guillaume and I also discussed the possibility of checking these things nevertheless (i.e. without needing a second pass) as well as the related topic of having a runtime solution for toggling private/hidden items (and thus getting them checked too). We could perhaps try a custom thing in rust.docs.kernel.org to see how it looks and if people like it.
Cheers,
Miguel
Quoted 3 lines · Guillaume Gomez
Indeed, although, please open an issue on rust repository so the team can discuss how this feature would look like.
Done -- for both the features (checking & runtime toggle):
https://github.com/rust-lang/rust/issues/149105 https://github.com/rust-lang/rust/issues/149106
Of course, if we have the latter, then we may not need the former etc. I tried to add a good chunk of context in the issues, especially the first one.
I hope that helps, and thanks Guillaume!
Cheers,
Miguel
Thanks for opening them!
Gonna take a look tomorrow.
Quoted 20 lines · Miguel Ojeda
Quoted 3 lines · Guillaume Gomez
Indeed, although, please open an issue on rust repository so the team can discuss how this feature would look like.
Done -- for both the features (checking & runtime toggle):
https://github.com/rust-lang/rust/issues/149105 https://github.com/rust-lang/rust/issues/149106Of course, if we have the latter, then we may not need the former etc. I tried to add a good chunk of context in the issues, especially the first one.
I hope that helps, and thanks Guillaume!
Cheers,
Miguel
Quoted 6 lines · Miguel Ojeda
In the end, it wasn't intentional, so Guillaume created this PR:
https://github.com/rust-lang/rust/pull/147809Thus 1.92 may end up without this change in behavior.
Indeed, it just got merged for 1.92.
Cheers,
Miguel
Miguel Ojeda
AppliedQuoted 6 lines · Benno Lossin
Rust 1.92.0 warns when building the documentation that [
PinnedDrop] is an invalid reference. This is correct and it's weird that it didn't warn before, so fix the link.Signed-off-by Benno Lossin <[email protected]>
Benno asked me to pick these patches up for him this cycle.
Applied to rust-next -- thanks everyone!
[ The reason is that it is hidden -- I had asked about that in the
upstream PR that changed the behavior because I wasn't sure it was intentional (and thus whether we needed to fix this and other cases):
https://github.com/rust-lang/rust/pull/147153#issuecomment-3395484636
It turns out it was not, and it has been fixed for 1.92.0's upcoming release thanks to Guillaume and León. So we do not strictly need this patch and the other changes anymore:
https://github.com/rust-lang/rust/pull/147809
However, checking hidden/private items or, even better, a runtime toggle to be able to see those on the fly, is something that I think would be quite nice so I have had it in our usual lists for a while. Guillaume is open to the idea and perhaps experimenting with an implementation on our side first -- he asked me to open issues upstream:
https://github.com/rust-lang/rust/issues/149105
https://github.com/rust-lang/rust/issues/149106
- Miguel ]
Cc'd León as well, who I should have probably Cc'd originally too.
Cheers,
Miguel