Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use report_in_external_macro for internal lints #67854

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/librustc_lint/internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ use syntax::ast::{Ident, Item, ItemKind};
declare_tool_lint! {
pub rustc::DEFAULT_HASH_TYPES,
Allow,
"forbid HashMap and HashSet and suggest the FxHash* variants"
"forbid HashMap and HashSet and suggest the FxHash* variants",
report_in_external_macro: true
}

pub struct DefaultHashTypes {
Expand Down Expand Up @@ -52,19 +53,22 @@ impl EarlyLintPass for DefaultHashTypes {
declare_tool_lint! {
pub rustc::USAGE_OF_TY_TYKIND,
Allow,
"usage of `ty::TyKind` outside of the `ty::sty` module"
"usage of `ty::TyKind` outside of the `ty::sty` module",
report_in_external_macro: true
}

declare_tool_lint! {
pub rustc::TY_PASS_BY_REFERENCE,
Allow,
"passing `Ty` or `TyCtxt` by reference"
"passing `Ty` or `TyCtxt` by reference",
report_in_external_macro: true
}

declare_tool_lint! {
pub rustc::USAGE_OF_QUALIFIED_TY,
Allow,
"using `ty::{Ty,TyCtxt}` instead of importing it"
"using `ty::{Ty,TyCtxt}` instead of importing it",
report_in_external_macro: true
}

declare_lint_pass!(TyTyKind => [
Expand Down
1 change: 1 addition & 0 deletions src/librustc_span/symbol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1049,6 +1049,7 @@ pub mod kw {
}

// This module has a very short name because it's used a lot.
#[allow(rustc::default_hash_types)]
afnanenayet marked this conversation as resolved.
Show resolved Hide resolved
pub mod sym {
use super::Symbol;
use std::convert::TryInto;
Expand Down