Skip to content
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

Account for AFIT stabilization in 1.75.0 #253

Closed
stevefan1999-personal opened this issue Dec 3, 2023 · 5 comments · Fixed by #254
Closed

Account for AFIT stabilization in 1.75.0 #253

stevefan1999-personal opened this issue Dec 3, 2023 · 5 comments · Fixed by #254

Comments

@stevefan1999-personal
Copy link

As rust-lang/rust#115822 was finally merged and will be scheduled to be stabilized alongside 1.75.0 release (although it was expected to merge on 1.74.0), we should think about what to do when 1.75.0 came out.

@thecaralice
Copy link

And here 1.75.0 is. Maybe consider writing a sentence or two on migrating.

@EstebanBorai
Copy link

Thanks so much to @dtolnay and contributors for this crate! This was so useful to have while waiting for this to happen!

@hiroaki-yamamoto
Copy link

As far as I tried 1.75.0, the official async trait isn't object-safe for now while this crate is. This is the huge advantage of this crate when using Arc<dyn Trait + Send +Sync> style DI. This is why I'd like @dtolnay to keep maintaining this crate until the official async trait gets object-safe.

@UkonnRa
Copy link

UkonnRa commented Dec 29, 2023

From official doc, users can use #[trait_variant::make] if they want to swap to AFIT?

From developer side, that's just migrate from one macro to another. I think I will still use #[async_macro] until all of my dependencies support the new feature?

@thecaralice
Copy link

@hiroaki-yamamoto

until the official async trait gets object-safe

This is unlikely to be possible without explicitly bounding Self: Sized in all of the RPITI methods, which prevents them from being accessible through a trait object

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants