Refer to #50072 re. hack.

This commit is contained in:
Mazdak Farrokhzad 2019-07-24 11:36:17 +02:00
parent 2e193f7db7
commit 7fdfe8b854
2 changed files with 2 additions and 2 deletions

View file

@ -1,7 +1,7 @@
#[repr(u8)]
enum Alpha {
V1 = 41,
V2 = Self::V1 as u8 + 1, // OK -- but why?
V2 = Self::V1 as u8 + 1, // OK; See #50072.
V3 = Self::V1 {} as u8 + 2, //~ ERROR cycle detected when const-evaluating
}

View file

@ -17,7 +17,7 @@ note: cycle used when collecting item types in top-level module
LL | / #[repr(u8)]
LL | | enum Alpha {
LL | | V1 = 41,
LL | | V2 = Self::V1 as u8 + 1, // OK -- but why?
LL | | V2 = Self::V1 as u8 + 1, // OK; See #50072.
... |
LL | |
LL | | fn main() {}