Refer to #50072 re. hack.
This commit is contained in:
parent
2e193f7db7
commit
7fdfe8b854
2 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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() {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue