-
-
Notifications
You must be signed in to change notification settings - Fork 26
Improve the docs.rs situation #17
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,6 +20,8 @@ use syn::{AttributeArgs, Error, ItemFn, Lit, Meta, MetaNameValue, NestedMeta, Re | |
| /// my_fut.await; | ||
| /// } | ||
| /// ``` | ||
| /// | ||
| /// [`pollster::block_on`]: https://docs.rs/pollster/0.3.0/pollster/fn.block_on.html | ||
| #[proc_macro_attribute] | ||
| pub fn main( | ||
| attr: proc_macro::TokenStream, | ||
|
|
@@ -46,6 +48,8 @@ pub fn main( | |
| /// my_fut.await; | ||
| /// } | ||
| /// ``` | ||
| /// | ||
| /// [`pollster::block_on`]: https://docs.rs/pollster/0.3.0/pollster/fn.block_on.html | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a bit annoying because it needs to be kept up-to-date with version bumps.
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That is a little annoying... Perhaps the macro crate could be made to depend on the main crate when building for docsrs, allowing us to directly link through to it?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried with
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah well. I'm sure this is fine for now. |
||
| #[proc_macro_attribute] | ||
| pub fn test( | ||
| attr: proc_macro::TokenStream, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| #![doc = include_str!("../README.md")] | ||
| #![cfg_attr(docsrs, feature(doc_auto_cfg))] | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is really nice because it shows the crate feature needed to use a specific API in the Rust documentation. |
||
|
|
||
| use std::{ | ||
| future::Future, | ||
|
|
||
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.
This tells
docs.rsto build the default target only.pollsterss API is the same everywhere.See https://docs.rs/about/metadata.