Skip to content

Commit 9984855

Browse files
committed
fix(lints): Doctest extraction should respect [lints]
Fixes #12497
1 parent a80dfae commit 9984855

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

src/cargo/ops/cargo_test.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,8 @@ fn run_doc_tests(
260260
p.arg("--test-args").arg("--quiet");
261261
}
262262

263+
p.args(unit.pkg.manifest().lint_rustflags());
264+
263265
p.args(args);
264266

265267
if *unstable_opts {

tests/testsuite/lints.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -688,18 +688,6 @@ pub const Ĕ: i32 = 2;
688688
[COMPILING] foo v0.0.1 ([CWD])
689689
[FINISHED] test [unoptimized + debuginfo] target(s) in [..]s
690690
[DOCTEST] foo
691-
warning: identifier pair considered confusable between `Ě` and `Ĕ`
692-
--> src/lib.rs:12:11
693-
|
694-
11 | pub const Ě: i32 = 1;
695-
| - this is where the previous identifier occurred
696-
12 | pub const Ĕ: i32 = 2;
697-
| ^
698-
|
699-
= note: `#[warn(confusable_idents)]` on by default
700-
701-
[WARNING] 1 warning emitted
702-
703691
",
704692
)
705693
.run();

0 commit comments

Comments
 (0)