Skip to content

Commit 506df6e

Browse files
committed
Enable doctests for compiler/rustc_ast_lowering
1 parent 04e9575 commit 506df6e

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

compiler/rustc_ast_lowering/Cargo.toml

-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ name = "rustc_ast_lowering"
33
version = "0.0.0"
44
edition = "2021"
55

6-
[lib]
7-
doctest = false
8-
96
[dependencies]
107
rustc_ast = { path = "../rustc_ast" }
118
rustc_ast_pretty = { path = "../rustc_ast_pretty" }

compiler/rustc_ast_lowering/src/lib.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1434,20 +1434,21 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
14341434
/// Given a function definition like:
14351435
///
14361436
/// ```rust
1437+
/// use std::fmt::Debug;
14371438
/// fn test<'a, T: Debug>(x: &'a T) -> impl Debug + 'a {
14381439
/// x
14391440
/// }
14401441
/// ```
14411442
///
14421443
/// we will create a TAIT definition in the HIR like
14431444
///
1444-
/// ```
1445+
/// ```ignore (type alias is not used)
14451446
/// type TestReturn<'a, T, 'x> = impl Debug + 'x
14461447
/// ```
14471448
///
14481449
/// and return a type like `TestReturn<'static, T, 'a>`, so that the function looks like:
14491450
///
1450-
/// ```rust
1451+
/// ```ignore (cannot compile TAIT example with 'static lifetime)
14511452
/// fn test<'a, T: Debug>(x: &'a T) -> TestReturn<'static, T, 'a>
14521453
/// ```
14531454
///

0 commit comments

Comments
 (0)