Skip to content

Commit dd136e7

Browse files
committed
Make the lint doctest pass with stage0
1 parent af581ab commit dd136e7

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

compiler/rustc_lint/src/runtime_symbols.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ declare_lint! {
1515
///
1616
/// ### Example
1717
///
18-
/// ```rust,compile_fail
19-
/// #[unsafe(no_mangle)]
18+
#[cfg_attr(bootstrap, doc = "```rust")]
19+
#[cfg_attr(not(bootstrap), doc = "```rust,compile_fail")]
20+
#[cfg_attr(not(bootstrap), doc = "#[unsafe(no_mangle)]")]
2021
/// pub fn strlen() {} // invalid definition of the `strlen` function
21-
/// ```
22+
#[doc = "```"]
2223
///
2324
/// {{produces}}
2425
///

0 commit comments

Comments
 (0)