diff options
| author | ozkanonur <work@onurozkan.dev> | 2023-05-07 00:12:29 +0300 |
|---|---|---|
| committer | ozkanonur <work@onurozkan.dev> | 2023-05-07 00:12:29 +0300 |
| commit | 4e7c14fe9f03dd0189f954bd9cb97c3c513e7eed (patch) | |
| tree | fa8a777bab81cc492a0df4d8bd6d40efc17d2ae4 /compiler/rustc_ast_lowering/src | |
| parent | 8b8110e1469d459a196f6feb60d82dec48c3cfc2 (diff) | |
| download | rust-4e7c14fe9f03dd0189f954bd9cb97c3c513e7eed.tar.gz rust-4e7c14fe9f03dd0189f954bd9cb97c3c513e7eed.zip | |
enable `rust_2018_idioms` for doctests
Signed-off-by: ozkanonur <work@onurozkan.dev>
Diffstat (limited to 'compiler/rustc_ast_lowering/src')
| -rw-r--r-- | compiler/rustc_ast_lowering/src/lib.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_ast_lowering/src/lib.rs b/compiler/rustc_ast_lowering/src/lib.rs index d07355a4154..8a511d8b5fb 100644 --- a/compiler/rustc_ast_lowering/src/lib.rs +++ b/compiler/rustc_ast_lowering/src/lib.rs @@ -1474,6 +1474,8 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { /// Given a function definition like: /// /// ```rust + /// use std::fmt::Debug; + /// /// fn test<'a, T: Debug>(x: &'a T) -> impl Debug + 'a { /// x /// } @@ -1481,13 +1483,13 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { /// /// we will create a TAIT definition in the HIR like /// - /// ``` + /// ```rust,ignore (pseudo-Rust) /// type TestReturn<'a, T, 'x> = impl Debug + 'x /// ``` /// /// and return a type like `TestReturn<'static, T, 'a>`, so that the function looks like: /// - /// ```rust + /// ```rust,ignore (pseudo-Rust) /// fn test<'a, T: Debug>(x: &'a T) -> TestReturn<'static, T, 'a> /// ``` /// |
