pub enum RuleScope {
Rule(RuleRef),
All,
Unnamed,
}Expand description
Which lint rules a directive covers.
The three cases are deliberately distinct because two of them look identical
in the source and behave in opposite directions: # arity-lint skip-file:
turns the whole linter off, while a bare # arity-lint skip-file turns
nothing off at all. Collapsing them would silently promote the inert one
into a blanket.
Variants§
Rule(RuleRef)
Exactly the rule named.
All
Every lint rule. Written as a : where the rule ID would go, or implied
by the # arity form, whose lint half is all-rules by construction.
Unnamed
No rule named at all — inert, and reported for exactly that reason.
Trait Implementations§
impl Eq for RuleScope
impl StructuralPartialEq for RuleScope
Auto Trait Implementations§
impl Freeze for RuleScope
impl RefUnwindSafe for RuleScope
impl Send for RuleScope
impl Sync for RuleScope
impl Unpin for RuleScope
impl UnsafeUnpin for RuleScope
impl UnwindSafe for RuleScope
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more