RFC: Overhaul the #[cfg(..)] pattern syntax#194
RFC: Overhaul the #[cfg(..)] pattern syntax#194alexcrichton merged 3 commits intorust-lang:masterfrom
#[cfg(..)] pattern syntax#194Conversation
|
Looks good. Did you want to treat the initial |
|
Forgive the unterminated bracket. I'm on my phone and can't edit the message ;) |
|
My gut would be neither to avoid confusion, though defaulting to |
|
And |
active/0000-cfg-syntax.md
Outdated
There was a problem hiding this comment.
typo, link should point to rust/issues/2119 (s/issuse/issues)
active/0000-cfg-syntax.md
Outdated
There was a problem hiding this comment.
I don't think it's entirely crazy for multiple cfgs to be an error indefinitely.
|
👍 on the proposal, but I think we can make some tweaks to aid the transition. First, multiple However, if either of these cases are encountered in the wild, a warning will be emitted, with a note describing how to rewrite it. This warning will not be a lint, it will instead be built in to the At some point in the future, we can switch this to an error. And then at a later time, if we decide it's appropriate, we can then turn multiple |
|
cc rust-lang/rust#2119, the very very old bug on this |
|
@kballard sounds reasonable to me. |
6357402 to
e0acdf4
Compare
There was a problem hiding this comment.
Doesn't this give three ways to write all? #[cfg(a, b)] #[cfg(a)] #[cfg(b)] and #[cfg(all(a, b))]?
There was a problem hiding this comment.
Yes, but the first and second behaviors will trigger deprecation warnings.
Edit: Actually, the second case will in the short term be equivalent to #[cfg(any(a, b)], again with a warning.
|
This was discussed in today's meeting and the decision was to merge it, thanks @sfackler! |
fixed another bunch of clippy warnings
…event-mananger Deprecate component `eventManager`
No description provided.