forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
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 rust-lang#65066 - wesleywiser:fix_const_prop_ice_on_p…
…olymorphic_promoted_mir, r=oli-obk [const-prop] Fix ICE when trying to eval polymorphic promoted MIR Fixes rust-lang#64908 r? @oli-obk cc @nikomatsakis @pnkfelix
- Loading branch information
Showing
4 changed files
with
29 additions
and
11 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
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,20 @@ | ||
// run-pass | ||
|
||
// This test verifies that the `ConstProp` pass doesn't cause an ICE when evaluating polymorphic | ||
// promoted MIR. | ||
|
||
pub trait ArrowPrimitiveType { | ||
type Native; | ||
} | ||
|
||
pub fn new<T: ArrowPrimitiveType>() { | ||
assert_eq!(0, std::mem::size_of::<T::Native>()); | ||
} | ||
|
||
impl ArrowPrimitiveType for () { | ||
type Native = (); | ||
} | ||
|
||
fn main() { | ||
new::<()>(); | ||
} |