feat: Implement cast typechecks

This commit is contained in:
Shoyu Vanilla 2024-08-29 00:12:16 +09:00
parent 304e5f58cd
commit d186bdc617
25 changed files with 1614 additions and 93 deletions

View file

@ -399,7 +399,7 @@ extern "C" {
fn memcmp(s1: *const u8, s2: *const u8, n: usize) -> i32;
}
fn my_cmp(x: &[u8], y: &[u8]) -> i32 {
fn my_cmp(x: &[u8; 3], y: &[u8; 3]) -> i32 {
memcmp(x as *const u8, y as *const u8, x.len())
}
@ -779,6 +779,7 @@ fn main() {
fn posix_getenv() {
check_pass(
r#"
//- minicore: sized
//- /main.rs env:foo=bar
type c_char = u8;