mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-27 02:06:57 +00:00
feat: Implement cast typechecks
This commit is contained in:
parent
304e5f58cd
commit
d186bdc617
25 changed files with 1614 additions and 93 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue