Skip to content

Commit

Permalink
Merge pull request #17 from daxpedda/doc-rs
Browse files Browse the repository at this point in the history
Improve the docs.rs situation
  • Loading branch information
zesterer authored Mar 28, 2023
2 parents 55cc36c + 28d76c5 commit 767e6db
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,8 @@ pollster-macro = { version = "0.1", path = "macro", optional = true }
[dev-dependencies]
futures-timer = "3.0"
tokio = { version = "1", features = ["sync"] }

[package.metadata.docs.rs]
all-features = true
targets = []
rustdoc-args = ["--cfg", "docsrs"]
3 changes: 3 additions & 0 deletions macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ syn = { version = "2", default-features = false, features = [

[dev-dependencies]
pollster = { path = "..", features = ["macro"] }

[package.metadata.docs.rs]
targets = []
4 changes: 4 additions & 0 deletions macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ use syn::{Error, Expr, ExprLit, ExprPath, ItemFn, Lit, MetaNameValue, Result};
/// 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,
Expand All @@ -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
#[proc_macro_attribute]
pub fn test(
attr: proc_macro::TokenStream,
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
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))]

use std::{
future::Future,
Expand Down

0 comments on commit 767e6db

Please sign in to comment.