Conversation
LucioFranco
left a comment
There was a problem hiding this comment.
👍 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
UnpinStructis 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