Skip to content

Commit 6852c23

Browse files
committed
Ignore some doctests that are incompatible with current --stage=0
These changes can be reverted during the next bootstrap bump.
1 parent 4a47e8e commit 6852c23

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

compiler/rustc_lint/src/if_let_rescope.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ declare_lint! {
2323
///
2424
/// ### Example
2525
///
26-
/// ```rust,edition2021
26+
#[cfg_attr(bootstrap, doc = "```ignore")]
27+
#[cfg_attr(not(bootstrap), doc = "```rust,edition2021")]
2728
/// #![feature(if_let_rescope)]
2829
/// #![warn(if_let_rescope)]
2930
/// #![allow(unused_variables)]
@@ -54,7 +55,7 @@ declare_lint! {
5455
/// // do something else
5556
/// }
5657
/// }
57-
/// ```
58+
#[doc = "```"] // #[cfg_attr(not(bootstrap), ..)] // Needed to satisfy tidy; revert after bootstrap bump.
5859
///
5960
/// {{produces}}
6061
///

compiler/rustc_lint_defs/src/builtin.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1870,15 +1870,16 @@ declare_lint! {
18701870
///
18711871
/// ### Example
18721872
///
1873-
/// ```rust,compile_fail
1873+
#[cfg_attr(bootstrap, doc = "```ignore")]
1874+
#[cfg_attr(not(bootstrap), doc = "```rust,compile_fail")]
18741875
/// #![deny(elided_named_lifetimes)]
18751876
/// struct Foo;
18761877
/// impl Foo {
18771878
/// pub fn get_mut(&'static self, x: &mut u8) -> &mut u8 {
18781879
/// unsafe { &mut *(x as *mut _) }
18791880
/// }
18801881
/// }
1881-
/// ```
1882+
#[doc = "```"] // #[cfg_attr(not(bootstrap), ..)] // Needed to satisfy tidy; revert after bootstrap bump.
18821883
///
18831884
/// {{produces}}
18841885
///

0 commit comments

Comments
 (0)