Closed
Description
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:
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
Metadata
Metadata
Assignees
Labels
No labels