Skip to content

Commit

Permalink
Remove useless attributes in merged doctest generated code
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Aug 17, 2024
1 parent 54a50bd commit 7bde314
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/librustdoc/doctest/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ impl DocTestRunner {
#![allow(internal_features)]
#![feature(test)]
#![feature(rustc_attrs)]
#![feature(coverage_attribute)]
"
.to_string();

Expand Down Expand Up @@ -135,7 +134,6 @@ mod __doctest_mod {{
}}
#[rustc_main]
#[coverage(off)]
fn main() -> std::process::ExitCode {{
const TESTS: [test::TestDescAndFn; {nb_tests}] = [{ids}];
let bin_marker = std::ffi::OsStr::new(__doctest_mod::BIN_OPTION);
Expand Down Expand Up @@ -235,11 +233,9 @@ fn main() {returns_result} {{
writeln!(
output,
"
#[rustc_test_marker = {test_name:?}]
pub const TEST: test::TestDescAndFn = test::TestDescAndFn::new_doctest(
{test_name:?}, {ignore}, {file:?}, {line}, {no_run}, {should_panic},
test::StaticTestFn(
#[coverage(off)]
|| {{{runner}}},
));
}}",
Expand Down

0 comments on commit 7bde314

Please sign in to comment.