let id = LintId::of(lint);
if self.by_name.insert(lint.name_lower(), Id(id)).is_some() {
- let msg = format!("duplicate specification of lint {}", lint.name_lower());
- match (sess, from_plugin) {
- // We load builtin lints first, so a duplicate is a compiler bug.
- // Use early_error when handling -W help with no crate.
- (None, _) => early_error(config::ErrorOutputType::default(), &msg[..]),
- (Some(_), false) => bug!("{}", msg),
-
- // A duplicate name from a plugin is a user error.
- (Some(sess), true) => sess.err(&msg[..]),
- }
+ bug!("duplicate specification of lint {}", lint.name_lower())
}
}
}
}
if !new {
- let msg = format!("duplicate specification of lint group {}", name);
- match (sess, from_plugin) {
- // We load builtin lints first, so a duplicate is a compiler bug.
- // Use early_error when handling -W help with no crate.
- (None, _) => early_error(config::ErrorOutputType::default(), &msg[..]),
- (Some(_), false) => bug!("{}", msg),
-
- // A duplicate name from a plugin is a user error.
- (Some(sess), true) => sess.err(&msg[..]),
- }
+ bug!("duplicate specification of lint group {}", name);
}
}