/// This will be an error in a future release, and
/// Cargo should create a report even for dependencies
FutureReleaseErrorReportNow,
+ /// Code that changes meaning in some way in a
+ /// future release.
+ FutureReleaseSemanticsChange,
/// Previously accepted code that will become an
/// error in the provided edition
EditionError(Edition),
/// Code that changes meaning in some way in
/// the provided edition
EditionSemanticsChange(Edition),
+ /// A custom reason.
+ Custom(&'static str),
}
impl FutureIncompatibilityReason {
// This could be a closure, but then implementing derive trait
// becomes hacky (and it gets allocated).
-#[derive(PartialEq, Debug)]
+#[derive(Debug)]
pub enum BuiltinLintDiagnostics {
Normal,
AbsPathWithModule(Span),
/// Lints that are buffered up early on in the `Session` before the
/// `LintLevels` is calculated.
-#[derive(PartialEq)]
pub struct BufferedEarlyLint {
/// The span of code that we are linting on.
pub span: MultiSpan,
impl LintBuffer {
pub fn add_early_lint(&mut self, early_lint: BufferedEarlyLint) {
let arr = self.map.entry(early_lint.node_id).or_default();
- if !arr.contains(&early_lint) {
- arr.push(early_lint);
- }
+ arr.push(early_lint);
}
pub fn add_lint(