Skip to content

Commit

Permalink
fix(lints): Doctest extraction should respect [lints]
Browse files Browse the repository at this point in the history
Fixes #12497
  • Loading branch information
epage committed Aug 14, 2023
1 parent a80dfae commit 9984855
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
2 changes: 2 additions & 0 deletions src/cargo/ops/cargo_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ fn run_doc_tests(
p.arg("--test-args").arg("--quiet");
}

p.args(unit.pkg.manifest().lint_rustflags());

p.args(args);

if *unstable_opts {
Expand Down
12 changes: 0 additions & 12 deletions tests/testsuite/lints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -688,18 +688,6 @@ pub const Ĕ: i32 = 2;
[COMPILING] foo v0.0.1 ([CWD])
[FINISHED] test [unoptimized + debuginfo] target(s) in [..]s
[DOCTEST] foo
warning: identifier pair considered confusable between `Ě` and `Ĕ`
--> src/lib.rs:12:11
|
11 | pub const Ě: i32 = 1;
| - this is where the previous identifier occurred
12 | pub const Ĕ: i32 = 2;
| ^
|
= note: `#[warn(confusable_idents)]` on by default
[WARNING] 1 warning emitted
",
)
.run();
Expand Down

0 comments on commit 9984855

Please sign in to comment.