|
|
|
|
|
by stormbrew
1702 days ago
|
|
Personally I'd kinda like it if preludes were decoupled from editions in some way. Like, fine to have a default per-edition but there are times I would really like to have a prelude without all the `impl<T> X for T`s included. You can kinda do this now with `#[no_implicit_prelude]` I think but it has somewhat odd semantics. It applies to all submodules, unlike most attributes, and then if you define your own prelude you need to use it in every submodule because they won't all have their own. If it's gonna have global effect I think it'd be better if it was: #[prelude]
mod my_prelude {
use std::whatever::*;
}
and then my_prelude would be included in all submodules by default. |
|