Skip to content

Commit 767e6db

Browse files
authored
Merge pull request #17 from daxpedda/doc-rs
Improve the docs.rs situation
2 parents 55cc36c + 28d76c5 commit 767e6db

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,8 @@ pollster-macro = { version = "0.1", path = "macro", optional = true }
2323
[dev-dependencies]
2424
futures-timer = "3.0"
2525
tokio = { version = "1", features = ["sync"] }
26+
27+
[package.metadata.docs.rs]
28+
all-features = true
29+
targets = []
30+
rustdoc-args = ["--cfg", "docsrs"]

macro/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,6 @@ syn = { version = "2", default-features = false, features = [
2424

2525
[dev-dependencies]
2626
pollster = { path = "..", features = ["macro"] }
27+
28+
[package.metadata.docs.rs]
29+
targets = []

macro/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ use syn::{Error, Expr, ExprLit, ExprPath, ItemFn, Lit, MetaNameValue, Result};
2020
/// my_fut.await;
2121
/// }
2222
/// ```
23+
///
24+
/// [`pollster::block_on`]: https://docs.rs/pollster/0.3.0/pollster/fn.block_on.html
2325
#[proc_macro_attribute]
2426
pub fn main(
2527
attr: proc_macro::TokenStream,
@@ -46,6 +48,8 @@ pub fn main(
4648
/// my_fut.await;
4749
/// }
4850
/// ```
51+
///
52+
/// [`pollster::block_on`]: https://docs.rs/pollster/0.3.0/pollster/fn.block_on.html
4953
#[proc_macro_attribute]
5054
pub fn test(
5155
attr: proc_macro::TokenStream,

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![doc = include_str!("../README.md")]
2+
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
23

34
use std::{
45
future::Future,

0 commit comments

Comments
 (0)