Fix large_include_file lint being triggered all the time by doc comments (#13672)
Fixes #13670. Bug was that I forgot to add the comparison with the included file content length... changelog: Fix `large_include_file` lint being triggered all the time by doc comments
This commit is contained in:
commit
4f0e46b74d
3 changed files with 7 additions and 1 deletions
0
tests/ui-toml/large_include_file/empty.txt
Normal file
0
tests/ui-toml/large_include_file/empty.txt
Normal file
|
|
@ -15,5 +15,9 @@ const TOO_BIG_INCLUDE_BYTES: &[u8; 654] = include_bytes!("too_big.txt");
|
|||
const TOO_BIG_INCLUDE_STR: &str = include_str!("too_big.txt");
|
||||
//~^ large_include_file
|
||||
|
||||
#[doc = include_str!("too_big.txt")] //~ large_include_file
|
||||
#[doc = include_str!("too_big.txt")]
|
||||
//~^ large_include_file
|
||||
// Should not lint!
|
||||
// Regression test for <https://github.com/rust-lang/rust-clippy/issues/13670>.
|
||||
#[doc = include_str!("empty.txt")]
|
||||
fn main() {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue