We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
TL;DR : This allows this code with the new prelude keyword:
prelude
mod bar { #[derive(Default)] pub(crate) struct Bar(pub(crate) usize); #[derive(Default)] pub(crate) struct Baz(pub(crate) usize); } struct Foo { bar: Bar, prelude { use bar::*; }, baz: Baz, } impl Foo { fn new() -> Self { Foo { bar: Default::default(), baz: Default::default(), } } fn into_baz(self) -> Baz { self.baz } prelude { use bar::*; } }
Although the similar names, the motivation is quite different from RFC 890, in that this tries to address these issues:
use
Possible Future extensions:
The text was updated successfully, but these errors were encountered:
Is this already possible to implement with an attribute macro?
impl Xxx { #![prelude( bar::*, )] // ... }
expands to
mod _random { use super::*; use bar::*; impl Xxx { // ... } } use _random::*;
Sorry, something went wrong.
this seems like a solution without a problem
No branches or pull requests
TL;DR : This allows this code with the new
prelude
keyword:Although the similar names, the motivation is quite different from RFC 890, in that this tries to address these issues:
use
items in more cases, bringing more ergonomicsPossible Future extensions:
The text was updated successfully, but these errors were encountered: