[Pre-RFC] Bulk visibility syntax
I think this generally falls under the "alternative syntaxes" part of Frequently Requested Changes - The Rust Language Design Team.
I'd argue back considering this rule doesn't quite define what "alternative syntax" means in cases beyond personal aesthetic dissatisfaction. It also isn't clear on how much expected utility should overrule it.
There are also "contradictory" examples that are already in the language, most notably how extern & use have both singular and bulk syntax. I don't see how, say, having to type extern "C" and pub(crate) five times in a row are different, yet we have bulk extern { ... } syntax and absolutely no bulk visibility syntax.
But I don't want to make people have a coding standards conversation about which they should use in a codebase. I don't want to have to discuss which one
rustfmtshould use. Etc.
rustfmt wouldn't enforce any particular syntax "alternative" anyway (as it already doesn't with said examples of contradictions), so I don't quite follow what you mean by that.
I see how conventional division could be an issue since visibility qualifiers are significantly hotter than extern, but I doubt it would make a huge difference in the end due to the unambiguous and deducible nature of the "alternative" syntax. Besides, there are also "contradictory" examples to this that are already in the language, most relevant one being the alternatives of use mentioned earlier:
// syntax a
use foo::bar;
use bar::baz;
// syntax b
use { foo::bar, bar::baz };
Of course this is a rather primitive proposal, I mostly just wanted to see what people thought about it and whether if it would require significant internal rustc refactoring, that's about it.
Discussion in the ATmosphere