diff options
| author | Zalathar <Zalathar@users.noreply.github.com> | 2024-09-14 23:16:47 +1000 |
|---|---|---|
| committer | Zalathar <Zalathar@users.noreply.github.com> | 2024-09-14 23:18:49 +1000 |
| commit | 14ed979cdfda34c468e0abaad9e3c981205a7bac (patch) | |
| tree | d76ec3cdeec5253072a919e9c9dde14763e25154 | |
| parent | f9567d0f2bc8f6f7f45c42d432a5dbbd161a6104 (diff) | |
| download | rust-14ed979cdfda34c468e0abaad9e3c981205a7bac.tar.gz rust-14ed979cdfda34c468e0abaad9e3c981205a7bac.zip | |
Make some lint doctests compatible with `--stage=0`
| -rw-r--r-- | compiler/rustc_lint/src/if_let_rescope.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_lint_defs/src/builtin.rs | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_lint/src/if_let_rescope.rs b/compiler/rustc_lint/src/if_let_rescope.rs index 5b65541bea6..7138d40a48f 100644 --- a/compiler/rustc_lint/src/if_let_rescope.rs +++ b/compiler/rustc_lint/src/if_let_rescope.rs @@ -24,7 +24,7 @@ declare_lint! { /// ### Example /// /// ```rust,edition2021 - /// #![feature(if_let_rescope)] + /// #![cfg_attr(not(bootstrap), feature(if_let_rescope))] // Simplify this in bootstrap bump. /// #![warn(if_let_rescope)] /// #![allow(unused_variables)] /// diff --git a/compiler/rustc_lint_defs/src/builtin.rs b/compiler/rustc_lint_defs/src/builtin.rs index 25d33126754..d7394b68b60 100644 --- a/compiler/rustc_lint_defs/src/builtin.rs +++ b/compiler/rustc_lint_defs/src/builtin.rs @@ -1871,6 +1871,7 @@ declare_lint! { /// ### Example /// /// ```rust,compile_fail + /// # #[cfg_attr(bootstrap)] compile_error!(); // Remove this in bootstrap bump. /// #![deny(elided_named_lifetimes)] /// struct Foo; /// impl Foo { |
