Skip to content

Commit cdbe8e5

Browse files
Remove usage of allow(unused) attribute on no_run doctests
1 parent 612796c commit cdbe8e5

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/librustdoc/doctest/runner.rs

-4
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,6 @@ fn generate_mergeable_doctest(
208208
} else {
209209
writeln!(output, "mod {test_id} {{\n{}{}", doctest.crates, doctest.maybe_crate_attrs)
210210
.unwrap();
211-
if scraped_test.langstr.no_run {
212-
// To prevent having warnings about unused items since they're not called.
213-
writeln!(output, "#![allow(unused)]").unwrap();
214-
}
215211
if doctest.has_main_fn {
216212
output.push_str(&doctest.everything_else);
217213
} else {

0 commit comments

Comments
 (0)