Open iamanonymouscs opened 1 year ago
Removing the first line just causes it to fail to compile earlier.
The std::mem::size_of::<T>() > 0
is the cause of the issue, constant evaluation isn't correctly propagating the generic parameter through to the expansion/evaluation of that expression.
The
std::mem::size_of::<T>() > 0
is the cause of the issue, constant evaluation isn't correctly propagating the generic parameter through to the expansion/evaluation of that expression.
Will this issue be fixed in the future? 🤣It seems that the compiler did not successfully output the error message and instead caused an internal error in the compiler😶🌫️
It's an ICE because the generic type was copied to a scope with no generics. I'll address the issue when I get time.
It's an ICE because the generic type was copied to a scope with no generics. I'll address the issue when I get time.
Thank you for your dedication and responsiveness. I look forward to seeing the issue resolved soon~
Code
$ cat small.rs
Version
mrustc --version
Command
mrustc -L output-1.54.0 small.rs
Output
The error message I received is: ":0:0 BUG: src/hir_typeck/common.cpp:751: Impl parameters were not expected (got T/I:0/)".
I found that when I remove the first line, the compiler could output the correct error message🤣
If remove the first line of the code: