Fix the overflow issue for transmute_generic_consts
This commit is contained in:
parent
34d64ab7a2
commit
b133841bfc
3 changed files with 26 additions and 1 deletions
7
tests/ui/const-generics/issue-112505-overflow.rs
Normal file
7
tests/ui/const-generics/issue-112505-overflow.rs
Normal file
|
@ -0,0 +1,7 @@
|
|||
#![feature(transmute_generic_consts)]
|
||||
|
||||
fn overflow(v: [[[u32; 8888888]; 9999999]; 777777777]) -> [[[u32; 9999999]; 777777777]; 239] {
|
||||
unsafe { std::mem::transmute(v) } //~ ERROR cannot transmute between types of different sizes
|
||||
}
|
||||
|
||||
fn main() { }
|
Loading…
Add table
Add a link
Reference in a new issue