-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #12999 - flip1995:rustup, r=flip1995
Rustup r? `@ghost` changelog: none
- Loading branch information
Showing
148 changed files
with
1,579 additions
and
1,255 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
use super::ALLOW_ATTRIBUTES; | ||
use clippy_utils::diagnostics::span_lint_and_sugg; | ||
use clippy_utils::is_from_proc_macro; | ||
use rustc_ast::{AttrStyle, Attribute}; | ||
use rustc_errors::Applicability; | ||
use rustc_lint::{LateContext, LintContext}; | ||
use rustc_middle::lint::in_external_macro; | ||
|
||
// Separate each crate's features. | ||
pub fn check<'cx>(cx: &LateContext<'cx>, attr: &'cx Attribute) { | ||
if !in_external_macro(cx.sess(), attr.span) | ||
&& let AttrStyle::Outer = attr.style | ||
&& let Some(ident) = attr.ident() | ||
&& !is_from_proc_macro(cx, attr) | ||
{ | ||
span_lint_and_sugg( | ||
cx, | ||
ALLOW_ATTRIBUTES, | ||
ident.span, | ||
"#[allow] attribute found", | ||
"replace it with", | ||
"expect".into(), | ||
Applicability::MachineApplicable, | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.