-impl LintPass for Pass {
- fn get_lints(&self) -> LintArray {
- lint_array!(WILDCARD_DEPENDENCIES)
- }
-}
-
-impl EarlyLintPass for Pass {
- fn check_crate(&mut self, cx: &EarlyContext<'_>, _: &Crate) {
- let metadata = if let Ok(metadata) = cargo_metadata::metadata(None) {
- metadata
- } else {
- span_lint(cx, WILDCARD_DEPENDENCIES, DUMMY_SP, "could not read cargo metadata");
+impl LateLintPass<'_> for WildcardDependencies {
+ fn check_crate(&mut self, cx: &LateContext<'_>, _: &Crate<'_>) {
+ if !run_lints(cx, &[WILDCARD_DEPENDENCIES], CRATE_HIR_ID) {