-
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove _
from UnpinStruct
#70
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 wonder if we could provide the option to name it to a custom name.
Looks like a good idea. Probably like this? #[pin_project(unpin_docs = MyUnpinStructName)]
struct Foo<T, U> {
#[pin]
pinned: T,
unpinned: U,
} (Note: Once rust-lang/rust#48054 is implemented and stabilized, these documents will not be generated, but the options themselves will be maintained for compatibility.) |
@taiki-e seems reasonable! |
I didn't even realize that it exports a new type. Could it be |
@seanmonstar |
I am considering disabling this by default. cc @Aaron1011 |
It should also be a problem that items that are not declared by the user appear in the document without permission. |
Closing this in favor of #71. |
71: Do not display UnpinStruct in the document by default r=taiki-e a=taiki-e There are some problems as mentioned in #70 This causes the problem that by default the actual Unpin bounds cannot be known from the document if the original struct/enum itself is public (see #53 (comment) and rust-lang/rust#63281 for more). This can be enabled using `--cfg pin_project_show_unpin_struct` in RUSTFLAGS. ```toml # in Cargo.toml [package.metadata.docs.rs] rustdoc-args = ["--cfg", "pin_project_show_unpin_struct"] ``` cc @Aaron1011 @seanmonstar @LucioFranco Co-authored-by: Taiki Endo <te316e89@gmail.com>
As
UnpinStruct
is displayed in the documents, I think it looks better when_
is removed.Before (https://docs.rs/hyper/0.13.0-alpha.1/hyper/server/index.html):
After:
cc @seanmonstar @LucioFranco