Do not run lints that cannot emit
Before this change, adding a lint was a difficult matter because it always had some overhead involved. This was because all lints would run, no matter their default level, or if the user had #![allow]ed them. This PR changes that
This commit is contained in:
@@ -1025,8 +1025,8 @@ pub(crate) struct UnusedParens {
|
||||
parens_in_cast_in_lt: Vec<ast::NodeId>,
|
||||
}
|
||||
|
||||
impl UnusedParens {
|
||||
pub(crate) fn new() -> Self {
|
||||
impl Default for UnusedParens {
|
||||
fpub(crate) fn default() -> Self {
|
||||
Self { with_self_ty_parens: false, parens_in_cast_in_lt: Vec::new() }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user