]>
git.proxmox.com Git - rustc.git/blob - tests/ui/associated-consts/associated-const-type-parameter-arms.rs
1 pub enum EFoo { A, B, C, D }
10 const X
: EFoo
= EFoo
::B
;
15 const X
: EFoo
= EFoo
::D
;
18 pub fn test
<A
: Foo
, B
: Foo
>(arg
: EFoo
) {
20 A
::X
=> println
!("A::X"),
21 //~^ error: associated consts cannot be referenced in patterns [E0158]
22 B
::X
=> println
!("B::X"),
23 //~^ error: associated consts cannot be referenced in patterns [E0158]