Change:
+ // MIR for `main` after ConstProp fn main() -> () { <del> let mut _0: ();                      // return place in scope 0 at $DIR/discriminant.rs:5:11: 5:11 let _1: i32;                         // in scope 0 at $DIR/discriminant.rs:6:9: 6:10 let mut _2: i32;                     // in scope 0 at $DIR/discriminant.rs:6:13: 6:64 let mut _3: std::option::Option<bool>; // in scope 0 at $DIR/discriminant.rs:6:34: 6:44 let mut _4: isize;                   // in scope 0 at $DIR/discriminant.rs:6:21: 6:31 </del> <ins> let mut _0: ();                      // return place in scope 0 at $DIR/discriminant.rs:10:11: 10:11 let _1: i32;                         // in scope 0 at $DIR/discriminant.rs:11:9: 11:10 let mut _2: i32;                     // in scope 0 at $DIR/discriminant.rs:11:13: 11:64 let mut _3: std::option::Option<bool>; // in scope 0 at $DIR/discriminant.rs:11:34: 11:44 let mut _4: isize;                   // in scope 0 at $DIR/discriminant.rs:11:21: 11:31 </ins> scope 1 { <del> debug x => _1;                   // in scope 1 at $DIR/discriminant.rs:6:9: 6:10 </del> <ins> debug x => _1;                   // in scope 1 at $DIR/discriminant.rs:11:9: 11:10 </ins> } bb0: { <del> StorageLive(_1);                 // scope 0 at $DIR/discriminant.rs:6:9: 6:10 StorageLive(_2);                 // scope 0 at $DIR/discriminant.rs:6:13: 6:64 StorageLive(_3);                 // scope 0 at $DIR/discriminant.rs:6:34: 6:44 -         _3 = std::option::Option::<bool>::Some(const true); // scope 0 at $DIR/discriminant.rs:6:34: 6:44 +         _3 = const std::option::Option::<bool>::Some(true); // scope 0 at $DIR/discriminant.rs:6:34: 6:44 </del> <ins> StorageLive(_1);                 // scope 0 at $DIR/discriminant.rs:11:9: 11:10 StorageLive(_2);                 // scope 0 at $DIR/discriminant.rs:11:13: 11:64 StorageLive(_3);                 // scope 0 at $DIR/discriminant.rs:11:34: 11:44 -         _3 = std::option::Option::<bool>::Some(const true); // scope 0 at $DIR/discriminant.rs:11:34: 11:44 +         _3 = const std::option::Option::<bool>::Some(true); // scope 0 at $DIR/discriminant.rs:11:34: 11:44 </ins> // ty::Const -                                          // + ty: bool +                                          // + ty: std::option::Option<bool> // + val: Value(Scalar(0x01)) // mir::Constant <del> -                                          // + span: $DIR/discriminant.rs:6:39: 6:43 </del> <ins> -                                          // + span: $DIR/discriminant.rs:11:39: 11:43 </ins> -                                          // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } <del> -         _4 = discriminant(_3);           // scope 0 at $DIR/discriminant.rs:6:21: 6:31 -         switchInt(move _4) -> [1isize: bb2, otherwise: bb1]; // scope 0 at $DIR/discriminant.rs:6:21: 6:31 +                                          // + span: $DIR/discriminant.rs:6:34: 6:44 </del> <ins> -         _4 = discriminant(_3);           // scope 0 at $DIR/discriminant.rs:11:21: 11:31 -         switchInt(move _4) -> [1isize: bb2, otherwise: bb1]; // scope 0 at $DIR/discriminant.rs:11:21: 11:31 +                                          // + span: $DIR/discriminant.rs:11:34: 11:44 </ins> +                                          // + literal: Const { ty: std::option::Option<bool>, val: Value(Scalar(0x01)) } <del> +         _4 = const 1isize;               // scope 0 at $DIR/discriminant.rs:6:21: 6:31 </del> <ins> +         _4 = const 1isize;               // scope 0 at $DIR/discriminant.rs:11:21: 11:31 </ins> +                                          // ty::Const +                                          // + ty: isize +                                          // + val: Value(Scalar(0x0000000000000001)) +                                          // mir::Constant <del> +                                          // + span: $DIR/discriminant.rs:6:21: 6:31 </del> <ins> +                                          // + span: $DIR/discriminant.rs:11:21: 11:31 </ins> +                                          // + literal: Const { ty: isize, val: Value(Scalar(0x0000000000000001)) } <del> +         switchInt(const 1isize) -> [1isize: bb2, otherwise: bb1]; // scope 0 at $DIR/discriminant.rs:6:21: 6:31 </del> <ins> +         switchInt(const 1isize) -> [1isize: bb2, otherwise: bb1]; // scope 0 at $DIR/discriminant.rs:11:21: 11:31 </ins> +                                          // ty::Const +                                          // + ty: isize +                                          // + val: Value(Scalar(0x0000000000000001)) +                                          // mir::Constant <del> +                                          // + span: $DIR/discriminant.rs:6:21: 6:31 </del> <ins> +                                          // + span: $DIR/discriminant.rs:11:21: 11:31 </ins> +                                          // + literal: Const { ty: isize, val: Value(Scalar(0x0000000000000001)) } } bb1: { <del> _2 = const 10i32;                // scope 0 at $DIR/discriminant.rs:6:59: 6:61 </del> <ins> _2 = const 10i32;                // scope 0 at $DIR/discriminant.rs:11:59: 11:61 </ins> // ty::Const // + ty: i32 // + val: Value(Scalar(0x0000000a)) // mir::Constant <del> // + span: $DIR/discriminant.rs:6:59: 6:61 </del> <ins> // + span: $DIR/discriminant.rs:11:59: 11:61 </ins> // + literal: Const { ty: i32, val: Value(Scalar(0x0000000a)) } <del> goto -> bb4;                     // scope 0 at $DIR/discriminant.rs:6:13: 6:64 </del> <ins> goto -> bb4;                     // scope 0 at $DIR/discriminant.rs:11:13: 11:64 </ins> } bb2: { <del> -         switchInt(((_3 as Some).0: bool)) -> [false: bb1, otherwise: bb3]; // scope 0 at $DIR/discriminant.rs:6:26: 6:30 +         switchInt(const true) -> [false: bb1, otherwise: bb3]; // scope 0 at $DIR/discriminant.rs:6:26: 6:30 +                                          // ty::Const +                                          // + ty: bool +                                          // + val: Value(Scalar(0x01)) +                                          // mir::Constant +                                          // + span: $DIR/discriminant.rs:6:26: 6:30 +                                          // + literal: Const { ty: bool, val: Value(Scalar(0x01)) } </del> <ins> switchInt(((_3 as Some).0: bool)) -> [false: bb1, otherwise: bb3]; // scope 0 at $DIR/discriminant.rs:11:26: 11:30 </ins> } bb3: { <del> _2 = const 42i32;                // scope 0 at $DIR/discriminant.rs:6:47: 6:49 </del> <ins> _2 = const 42i32;                // scope 0 at $DIR/discriminant.rs:11:47: 11:49 </ins> // ty::Const // + ty: i32 // + val: Value(Scalar(0x0000002a)) // mir::Constant <del> // + span: $DIR/discriminant.rs:6:47: 6:49 </del> <ins> // + span: $DIR/discriminant.rs:11:47: 11:49 </ins> // + literal: Const { ty: i32, val: Value(Scalar(0x0000002a)) } <del> goto -> bb4;                     // scope 0 at $DIR/discriminant.rs:6:13: 6:64 </del> <ins> goto -> bb4;                     // scope 0 at $DIR/discriminant.rs:11:13: 11:64 </ins> } bb4: { <del> _1 = Add(move _2, const 0i32);   // scope 0 at $DIR/discriminant.rs:6:13: 6:68 </del> <ins> _1 = Add(move _2, const 0i32);   // scope 0 at $DIR/discriminant.rs:11:13: 11:68 </ins> // ty::Const // + ty: i32 // + val: Value(Scalar(0x00000000)) // mir::Constant <del> // + span: $DIR/discriminant.rs:6:67: 6:68 </del> <ins> // + span: $DIR/discriminant.rs:11:67: 11:68 </ins> // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) } <del> StorageDead(_2);                 // scope 0 at $DIR/discriminant.rs:6:67: 6:68 StorageDead(_3);                 // scope 0 at $DIR/discriminant.rs:6:68: 6:69 _0 = const ();                   // scope 0 at $DIR/discriminant.rs:5:11: 7:2 </del> <ins> StorageDead(_2);                 // scope 0 at $DIR/discriminant.rs:11:67: 11:68 StorageDead(_3);                 // scope 0 at $DIR/discriminant.rs:11:68: 11:69 _0 = const ();                   // scope 0 at $DIR/discriminant.rs:10:11: 12:2 </ins> // ty::Const // + ty: () // + val: Value(Scalar(<ZST>)) // mir::Constant <del> // + span: $DIR/discriminant.rs:5:11: 7:2 </del> <ins> // + span: $DIR/discriminant.rs:10:11: 12:2 </ins> // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) } <del> StorageDead(_1);                 // scope 0 at $DIR/discriminant.rs:7:1: 7:2 return;                          // scope 0 at $DIR/discriminant.rs:7:2: 7:2 </del> <ins> StorageDead(_1);                 // scope 0 at $DIR/discriminant.rs:12:1: 12:2 return;                          // scope 0 at $DIR/discriminant.rs:12:2: 12:2 </ins> } }

Discussion:
<!-- Thank you for finding an Internal Compiler Error! If possible, try to provide a minimal verifiable example. You can read "Rust Bug Minimization Patterns" for how to create smaller examples. --code from ./src/test/ui/consts/constconstructor/const-construct- <!-- If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. --rustc @ <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongBacktrace</strong</summary<p</p</details
Might be caused by That should have reduced the number of ICEs, not increased it, but who knows.^^

<!-- Thank you for finding an Internal Compiler Error! If possible, try to provide a minimal verifiable example. You can read "Rust Bug Minimization Patterns" for how to create smaller examples. --core reduced from <!-- If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. --: repo is @ <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongBacktrace</strong</summary<p</p</details
This does not reproduce with though, so it's a very recent regression.
` produces the same error it seems.