We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fn foo(a: &i32, b: &i32) -> &i32 {} fn main() {}
rust-analyzer shows no inline errors for the above code. Manually running cargo check works correctly:
cargo check
error[E0106]: missing lifetime specifier --> src\main.rs:1:29 | 1 | fn foo(a: &i32, b: &i32) -> &i32 {} | ---- ---- ^ expected named lifetime parameter | = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from `a` or `b` help: consider introducing a named lifetime parameter | 1 | fn foo<'a>(a: &'a i32, b: &'a i32) -> &'a i32 {} | ^^^^ ^^^^^^^ ^^^^^^^ ^^^
but rust-analyzer shows no inline error message.
Other check-on-save errors are shown correctly, so I don't think it's an issue with my setup.
Windows 10, VS Code, Rust 1.50.0 nightly, rust-analyzer v0.2.424
The text was updated successfully, but these errors were encountered:
Please try with a nightly build of r-a
Sorry, something went wrong.
Thanks!
I have the same thing.
The reason I speculate is something wrong in cargo's build cache. (Refer: rust-lang/cargo#9971)
Clicking Run button on fn main() {} to force rebuild, and the lifetime error will show correctly temporarily.
Run
fn main() {}
But it will be hidden again when the next Check-on-Save.
Development Environment:
No branches or pull requests
rust-analyzer shows no inline errors for the above code. Manually running
cargo check
works correctly:but rust-analyzer shows no inline error message.
Other check-on-save errors are shown correctly, so I don't think it's an issue with my setup.
Windows 10, VS Code, Rust 1.50.0 nightly, rust-analyzer v0.2.424
The text was updated successfully, but these errors were encountered: