This commit is contained in:
Max Heller 2023-07-28 06:45:35 -04:00
parent 008b639ef5
commit 37a8493138
3 changed files with 46 additions and 12 deletions

View file

@ -6451,3 +6451,22 @@ fn test() {
"#]],
);
}
#[test]
fn generic_params_disabled_by_cfg() {
check(
r#"
struct S<#[cfg(never)] T>;
fn test() {
let s$0: S = S;
}
"#,
expect![[r#"
*s*
```rust
let s: S // size = 0, align = 1
```
"#]],
);
}