about summary refs log tree commit diff
path: root/compiler/rustc_ast_lowering/src
diff options
context:
space:
mode:
authorozkanonur <work@onurozkan.dev>2023-05-07 00:12:29 +0300
committerozkanonur <work@onurozkan.dev>2023-05-07 00:12:29 +0300
commit4e7c14fe9f03dd0189f954bd9cb97c3c513e7eed (patch)
treefa8a777bab81cc492a0df4d8bd6d40efc17d2ae4 /compiler/rustc_ast_lowering/src
parent8b8110e1469d459a196f6feb60d82dec48c3cfc2 (diff)
downloadrust-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.rs6
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>
     /// ```
     ///