summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_lint_defs/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_lint_defs/src/lib.rs')
-rw-r--r--compiler/rustc_lint_defs/src/lib.rs17
1 files changed, 15 insertions, 2 deletions
diff --git a/compiler/rustc_lint_defs/src/lib.rs b/compiler/rustc_lint_defs/src/lib.rs
index 534aff7fb..7ea472ed5 100644
--- a/compiler/rustc_lint_defs/src/lib.rs
+++ b/compiler/rustc_lint_defs/src/lib.rs
@@ -8,7 +8,7 @@ extern crate rustc_macros;
pub use self::Level::*;
use rustc_ast::node_id::NodeId;
use rustc_ast::{AttrId, Attribute};
-use rustc_data_structures::fx::FxIndexMap;
+use rustc_data_structures::fx::{FxIndexMap, FxIndexSet};
use rustc_data_structures::stable_hasher::{HashStable, StableHasher, ToStableHashKey};
use rustc_error_messages::{DiagnosticMessage, MultiSpan};
use rustc_hir::HashStableContext;
@@ -529,10 +529,21 @@ pub enum BuiltinLintDiagnostics {
vis_span: Span,
ident_span: Span,
},
+ AmbiguousGlobReexports {
+ /// The name for which collision(s) have occurred.
+ name: String,
+ /// The name space for which the collision(s) occurred in.
+ namespace: String,
+ /// Span where the name is first re-exported.
+ first_reexport_span: Span,
+ /// Span where the same name is also re-exported.
+ duplicate_reexport_span: Span,
+ },
}
/// Lints that are buffered up early on in the `Session` before the
/// `LintLevels` is calculated.
+#[derive(Debug)]
pub struct BufferedEarlyLint {
/// The span of code that we are linting on.
pub span: MultiSpan,
@@ -551,7 +562,7 @@ pub struct BufferedEarlyLint {
pub diagnostic: BuiltinLintDiagnostics,
}
-#[derive(Default)]
+#[derive(Default, Debug)]
pub struct LintBuffer {
pub map: FxIndexMap<NodeId, Vec<BufferedEarlyLint>>,
}
@@ -601,6 +612,8 @@ impl LintBuffer {
}
}
+pub type RegisteredTools = FxIndexSet<Ident>;
+
/// Declares a static item of type `&'static Lint`.
///
/// See <https://rustc-dev-guide.rust-lang.org/diagnostics.html> for