]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/enum-discr-type-err.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / consts / enum-discr-type-err.rs
CommitLineData
dc9dc135
XL
1// Test that we mark enum discriminant values as having errors, even when the
2// diagnostic is deduplicated.
3
4struct F;
5struct T;
6
7impl F {
8 const V: i32 = 0;
9}
10
11impl T {
12 const V: i32 = 0;
13}
14
15macro_rules! mac {
16 ($( $v: ident = $s: ident,)*) => {
17 enum E {
18 $( $v = $s::V, )*
19 //~^ ERROR mismatched types
dfeec247 20 //~| ERROR mismatched types
dc9dc135
XL
21 }
22 }
23}
24
25mac! {
26 A = F,
27 B = T,
28}
29
30fn main() {}