-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #98429 - b-naber:use-correct-substs-discriminant-cast…
…, r=lcnr Use correct substs in enum discriminant cast Fixes #97634 r? ``@lcnr``
- Loading branch information
Showing
2 changed files
with
104 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// build-pass | ||
|
||
pub enum Register<const N: u16> { | ||
Field0 = 40, | ||
Field1, | ||
} | ||
|
||
fn main() { | ||
let _b = Register::<0>::Field1 as u16; | ||
} |