Skip to content

Commit 8a023b3

Browse files
authored
Rollup merge of #129192 - GuillaumeGomez:rm-useless-merged-doctest-attrs, r=notriddle
Remove useless attributes in merged doctest generated code I took another look at the generated code for merged doctests and it seems like those attributes are only useful when running `rustc --test`, which isn't the case for merged doctests. Less code generated. \o/ r? `@notriddle`
2 parents 1a95a5f + 7bde314 commit 8a023b3

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

Diff for: src/librustdoc/doctest/runner.rs

-4
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ impl DocTestRunner {
7575
#![allow(internal_features)]
7676
#![feature(test)]
7777
#![feature(rustc_attrs)]
78-
#![feature(coverage_attribute)]
7978
"
8079
.to_string();
8180

@@ -135,7 +134,6 @@ mod __doctest_mod {{
135134
}}
136135
137136
#[rustc_main]
138-
#[coverage(off)]
139137
fn main() -> std::process::ExitCode {{
140138
const TESTS: [test::TestDescAndFn; {nb_tests}] = [{ids}];
141139
let bin_marker = std::ffi::OsStr::new(__doctest_mod::BIN_OPTION);
@@ -235,11 +233,9 @@ fn main() {returns_result} {{
235233
writeln!(
236234
output,
237235
"
238-
#[rustc_test_marker = {test_name:?}]
239236
pub const TEST: test::TestDescAndFn = test::TestDescAndFn::new_doctest(
240237
{test_name:?}, {ignore}, {file:?}, {line}, {no_run}, {should_panic},
241238
test::StaticTestFn(
242-
#[coverage(off)]
243239
|| {{{runner}}},
244240
));
245241
}}",

0 commit comments

Comments
 (0)