diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2025-02-12 15:58:07 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2025-02-12 19:46:07 +0100 |
| commit | 17cf100f11bc8e952d2d70f0953b83c971cd5873 (patch) | |
| tree | e74c0f20b3a92c0329c6c57aa8636c934747baf5 | |
| parent | 54f59c6ddaafa1b6eb285af0957afa88e2d8e9e8 (diff) | |
| download | rust-17cf100f11bc8e952d2d70f0953b83c971cd5873.tar.gz rust-17cf100f11bc8e952d2d70f0953b83c971cd5873.zip | |
Add regression test for #136899
| -rw-r--r-- | tests/rustdoc-ui/hashtag-doctest.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/rustdoc-ui/hashtag-doctest.rs b/tests/rustdoc-ui/hashtag-doctest.rs new file mode 100644 index 00000000000..5f745611530 --- /dev/null +++ b/tests/rustdoc-ui/hashtag-doctest.rs @@ -0,0 +1,17 @@ +// This test ensures that `##` are not emitting a warning when generating +// docs with the 2024 edition (or any edition). +// Regression test for <https://github.com/rust-lang/rust/issues/136899>. + +//@ check-pass +//@revisions: edition2021 edition2024 +//@[edition2021] edition:2021 +//@[edition2024] edition:2024 + +#![deny(warnings)] + +//! Test +//! +//! ``` +//! ##[allow(dead_code)] +//! println!("hello world"); +//! ``` |
