Skip to content

Commit 495f94e

Browse files
committed
refactor(implicit_features): Use lint description for title
1 parent af1e5b3 commit 495f94e

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

src/cargo/util/lints.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ pub fn check_implicit_features(
192192
}
193193
let level = lint_level.to_diagnostic_level();
194194
let manifest_path = rel_cwd_manifest_path(path, gctx);
195-
let message = level.title("unused optional dependency").snippet(
195+
let message = level.title(IMPLICIT_FEATURES.desc).snippet(
196196
Snippet::source(manifest.contents())
197197
.origin(&manifest_path)
198198
.annotation(

tests/testsuite/lints/implicit_features/edition_2021_warn/stderr.term.svg

Lines changed: 2 additions & 2 deletions
Loading

tests/testsuite/lints/implicit_features/edition_2024/stderr.term.svg

Lines changed: 2 additions & 2 deletions
Loading

tests/testsuite/lints/implicit_features/warn/stderr.term.svg

Lines changed: 2 additions & 2 deletions
Loading

tests/testsuite/lints_table.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ fn cargo_lints_underscore_supported() {
874874
.masquerade_as_nightly_cargo(&["-Zcargo-lints"])
875875
.with_stderr(
876876
"\
877-
warning: unused optional dependency
877+
warning: implicit features for optional dependencies is deprecated and will be unavailable in the 2024 edition
878878
--> Cargo.toml:12:17
879879
|
880880
12 | bar = { version = \"0.1.0\", optional = true }

0 commit comments

Comments
 (0)