Files
rust/tests/rustdoc-ui/doctest/dead-code-2024.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
573 B
Rust
Raw Normal View History

2024-10-01 17:08:01 +02:00
// This test ensures that the 2024 edition merged doctest will not use `#[allow(unused)]`.
2024-11-22 07:20:22 -08:00
//@ edition: 2024
//@ compile-flags:--test
//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
2025-07-22 16:00:25 +02:00
//@ normalize-stdout: "ran in \d+\.\d+s" -> "ran in $$TIME"
//@ normalize-stdout: "compilation took \d+\.\d+s" -> "compilation took $$TIME"
2024-10-01 17:08:01 +02:00
//@ failure-status: 101
#![doc(test(attr(allow(unused_variables), deny(warnings))))]
/// Example
///
/// ```rust,no_run
/// trait T { fn f(); }
/// ```
pub fn f() {}