Honor cfg attributes on params when lowering their patterns

This commit is contained in:
Lukas Wirth 2022-10-10 09:47:09 +02:00
parent 476d043874
commit 63ed71bd30
4 changed files with 38 additions and 8 deletions

View file

@ -1070,3 +1070,13 @@ fn main() {
"#,
);
}
#[test]
fn cfg_params() {
check_types(
r#"
fn my_fn(#[cfg(feature = "feature")] u8: u8, u32: u32) {}
//^^^ u32
"#,
);
}