Skip to content

Commit

Permalink
Add regression test for #136899
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Feb 12, 2025
1 parent 7ec3695 commit e3695d3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/run-make/rustdoc-2024-hash-doctest/foo.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//! Test
//!
//! ```
//! ##[allow(dead_code)]
//! println!("hello world");
//! ```
Empty file.
13 changes: 13 additions & 0 deletions tests/run-make/rustdoc-2024-hash-doctest/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// This test ensures that `##` are not emitting a warning when generating
// docs with the 2024 edition.
// Regression test for <https://github.com/rust-lang/rust/issues/136899>.

use run_make_support::{bare_rustdoc, diff};

fn main() {
let out = bare_rustdoc().input("foo.rs").arg("-Zunstable-options").edition("2024").run().stdout_utf8();
diff()
.expected_file("output.stdout")
.actual_text("actual", out)
.run();
}

0 comments on commit e3695d3

Please sign in to comment.