1
Fork 0

enable rust_2018_idioms for doctests

Signed-off-by: ozkanonur <work@onurozkan.dev>
This commit is contained in:
ozkanonur 2023-05-07 00:12:29 +03:00
parent 8b8110e146
commit 4e7c14fe9f
37 changed files with 125 additions and 101 deletions

View file

@ -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>
/// ```
///