-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
Road to 1.0 #122
Comments
Before doing this, we might want to compare the current approach of expanding an async method into a normal method + async functions with the approach of expanding an async method into a normal method + an async block. EDIT: As dtolnay said in #125 (review), a normal method + an async block is not preferable if it changes the drop order. |
This comment has been minimized.
This comment has been minimized.
It is now CURRENT_YEAR, perhaps we can start preparing for #![feature(min_type_alias_impl_trait)]
use core::future::Future;
trait Trait<'async_lifetime> {
type F: Future<Output = String>;
fn ie(&'async_lifetime mut self) -> Self::F;
}
struct B(String);
struct C();
impl<'async_lifetime> Trait<'async_lifetime> for B {
type F = impl Future<Output = String> + 'async_lifetime;
fn ie(&'async_lifetime mut self) -> Self::F {
async move { std::mem::take(&mut self.0) }
}
}
impl<'async_lifetime> Trait<'async_lifetime> for C {
type F = impl Future<Output = String> + 'async_lifetime;
fn ie(&'async_lifetime mut self) -> Self::F {
async { "traid".into() }
}
}
#[tokio::main]
async fn main() {
let mut b = B("asyng".into());
println!("{}", Bepis::ie(&mut b).await);
println!("{}", b.0);
println!("{}", Bepis::ie(&mut C()).await);
} (sorry if this makes no sense, I am not a scientist) Edit: An authoritative source has informed me that this is garbage, because it makes the trait not |
I think 0.1 accurately indicates the level of maturity of this crate for the foreseeable future, so I am closing this issue. |
Hey, looks like the crate is mature enough for reaching
1.0
. isn't it?The text was updated successfully, but these errors were encountered: