Skip to content

Commit 25943cf

Browse files
committed
rename bin docs to attribute docs
Signed-off-by: Yoshua Wuyts <[email protected]>
1 parent 88cb9e8 commit 25943cf

File tree

1 file changed

+9
-26
lines changed

1 file changed

+9
-26
lines changed

src/lib.rs

+9-26
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,6 @@
2222
//! makes sense to apply that even to `fn main`. Unfortunately this would
2323
//! require compiler support to enable, so we've provided an experimental
2424
//! polyfill for it in the mean time.
25-
//!
26-
//! # Why isn't this crate part of async-std?
27-
//!
28-
//! We want to make sure `async-std`'s surface area is stable, and only includes
29-
//! things that would make sense to be part of "an async version of std".
30-
//! Language level support is really important, but _not_ part of the standard
31-
//! library.
32-
//!
33-
//! This has some distinct benefits: in particular it allows us to
34-
//! version both crates at a different pace. And as features are added to the
35-
//! language (or we decide they weren't a great idea after all), we can
36-
//! incrementally shrink the surface area of this crate.
37-
//!
38-
//! The other big benefit is that it allows libraries to depend on `async-std`
39-
//! without needing to pull in the rather heavy `syn`, `quote`, and
40-
//! `proc-macro2` crates. This should help keep compilation times snappy for
41-
//! everyone.
4225
4326
#![forbid(unsafe_code, future_incompatible, rust_2018_idioms)]
4427
#![deny(missing_debug_implementations, nonstandard_style)]
@@ -53,13 +36,13 @@ use syn::spanned::Spanned;
5336
/// <span
5437
/// class="module-item stab portability"
5538
/// style="display: inline; border-radius: 3px; padding: 2px; font-size: 80%; line-height: 1.2;"
56-
/// ><code>bin</code></span>
57-
/// Defines the async main function.
39+
/// ><code>attributes</code></span>
40+
/// Enables an async main function.
5841
///
5942
/// # Examples
6043
///
6144
/// ```ignore
62-
/// #[async_attributes::main]
45+
/// #[async_std::main]
6346
/// async fn main() -> std::io::Result<()> {
6447
/// Ok(())
6548
/// }
@@ -107,13 +90,13 @@ pub fn main(_attr: TokenStream, item: TokenStream) -> TokenStream {
10790
/// <span
10891
/// class="module-item stab portability"
10992
/// style="display: inline; border-radius: 3px; padding: 2px; font-size: 80%; line-height: 1.2;"
110-
/// ><code>bin</code></span>
111-
/// Creates an async unit test.
93+
/// ><code>attributes</code></span>
94+
/// Enables an async test function.
11295
///
11396
/// # Examples
11497
///
11598
/// ```ignore
116-
/// #[async_attributes::test]
99+
/// #[async_std::test]
117100
/// async fn my_test() -> std::io::Result<()> {
118101
/// assert_eq!(2 * 2, 4);
119102
/// Ok(())
@@ -148,16 +131,16 @@ pub fn test(_attr: TokenStream, item: TokenStream) -> TokenStream {
148131
/// <span
149132
/// class="module-item stab portability"
150133
/// style="display: inline; border-radius: 3px; padding: 2px; font-size: 80%; line-height: 1.2;"
151-
/// ><code>bin</code></span>
152-
/// Creates an async benchmark.
134+
/// ><code>attributes</code></span>
135+
/// Enables an async benchmark function.
153136
///
154137
/// # Examples
155138
///
156139
/// ```ignore
157140
/// #![feature(test)]
158141
/// extern crate test;
159142
///
160-
/// #[async_attributes::bench]
143+
/// #[async_std::bench]
161144
/// async fn bench_1(b: &mut test::Bencher) {
162145
/// b.iter(|| {
163146
/// println!("hello world");

0 commit comments

Comments
 (0)