Format and codegen for attr

This commit is contained in:
Wyatt Herkamp 2024-03-24 10:37:41 -04:00
parent 1141259a23
commit ecac8e3514
2 changed files with 20 additions and 1 deletions

View File

@ -3151,3 +3151,22 @@ fn foo() -> Result<i32, ${0:_}> { Ok(42i32) }
"#####,
)
}
#[test]
fn doctest_wrap_unwrap_cfg_attr() {
check_doc_test(
"wrap_unwrap_cfg_attr",
r#####"
#[derive$0(Debug)]
struct S {
field: i32
}
"#####,
r#####"
#[cfg_attr($0, derive(Debug))]
struct S {
field: i32
}
"#####,
)
}