Skip to content

Commit 17cf100

Browse files
Add regression test for rust-lang#136899
1 parent 54f59c6 commit 17cf100

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/rustdoc-ui/hashtag-doctest.rs

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// This test ensures that `##` are not emitting a warning when generating
2+
// docs with the 2024 edition (or any edition).
3+
// Regression test for <https://github.com/rust-lang/rust/issues/136899>.
4+
5+
//@ check-pass
6+
//@revisions: edition2021 edition2024
7+
//@[edition2021] edition:2021
8+
//@[edition2024] edition:2024
9+
10+
#![deny(warnings)]
11+
12+
//! Test
13+
//!
14+
//! ```
15+
//! ##[allow(dead_code)]
16+
//! println!("hello world");
17+
//! ```

0 commit comments

Comments
 (0)