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.
[const-prop] Fix ICE when trying to eval polymorphic promoted MIR
- Loading branch information
1 parent
cfb6d84
commit e9009c8
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::<()>(); | ||
} |