rust-lang / rust-analyzer

A Rust compiler front-end for IDEs
https://rust-analyzer.github.io/
Apache License 2.0
13.62k stars 1.49k forks source link

Incorrect analysis of std::ffi::CString in rust-analyzer v0.3.1940 #17169

Closed Aobanana-chan closed 2 weeks ago

Aobanana-chan commented 2 weeks ago

rust-analyzer version: v0.3.1940

rustc version: 1.77.1

editor or extension: VSCode

code snippet to reproduce:

use std::ffi::CString;

fn main() {
    let _s = CString::new("test");
}

When I create a new instance of std::ffi::CString, the variable type analysis incorrectly shows "unknown". image

This problem is resolved when I revert to version v0.3.1932 of rust-analyzer. image

lnicola commented 2 weeks ago

Caused by #17151.

image

prajwalch commented 2 weeks ago

Same issue with me.