Lints table doesn't seem to work with doctests #12497
Labels
A-doctests
Area: rustdoc --test
A-lints-table
Area: [lints] table
C-bug
Category: bug
S-triage
Status: This issue is waiting on initial triage.
Problem
Lints defined in the lints table doesn't seem to work with doctests, whereas lints defined as an attribute do work. This seems inconsistent, as I would expect them to behave the same.
Steps
Example rust file:
With manifest:
Running
cargo check -Zlints
produces no warnings:Running
cargo test --doc -Zlints
produces warnings:If you put
#![allow(confusable_idents)]
at the top of the file, then no warning is generated.Possible Solution(s)
I think lint flags should be passed to rustdoc here when building the rustdoc comand line. I'm not sure if there was a reason this wasn't added.
Notes
No response
Version
The text was updated successfully, but these errors were encountered: