Skip to content

Commit

Permalink
Merge pull request #249 from erer1243/update-docs-lifetime
Browse files Browse the repository at this point in the history
Update doc comments to use lifetime 'async_trait instead of 'async
  • Loading branch information
dtolnay committed Jul 5, 2023
2 parents f8ce3fb + 92acf81 commit 85172d3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,19 +118,19 @@
//! # Explanation
//!
//! Async fns get transformed into methods that return `Pin<Box<dyn Future +
//! Send + 'async>>` and delegate to a private async freestanding function.
//! Send + 'async_trait>>` and delegate to a private async freestanding function.
//!
//! For example the `impl Advertisement for AutoplayingVideo` above would be
//! expanded as:
//!
//! ```
//! # const IGNORE: &str = stringify! {
//! impl Advertisement for AutoplayingVideo {
//! fn run<'async>(
//! &'async self,
//! ) -> Pin<Box<dyn core::future::Future<Output = ()> + Send + 'async>>
//! fn run<'async_trait>(
//! &'async_trait self,
//! ) -> Pin<Box<dyn core::future::Future<Output = ()> + Send + 'async_trait>>
//! where
//! Self: Sync + 'async,
//! Self: Sync + 'async_trait,
//! {
//! async fn run(_self: &AutoplayingVideo) {
//! /* the original method body */
Expand Down

0 comments on commit 85172d3

Please sign in to comment.