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
rust-analyzer version: 0.4.1907-standalone
rustc version: rustc 1.79.0-nightly (805813650 2024-03-31)
editor or extension: VSCode with extension v0.4.1907 (pre-release)
relevant settings:
repository link (if public, optional):
code snippet to reproduce:
struct Ref<'a, T>(&'a T); fn new<T>(r: &T) -> Ref<'_, T> { Ref(r) } fn main() { let i = 0; let r = new(&i); }
RA hints that the type of r is Ref<'static, i32>, but the lifetime of &i should not be 'static.
r
Ref<'static, i32>
&i
'static
The text was updated successfully, but these errors were encountered:
We haven't implemented lifetime elision yet
Sorry, something went wrong.
Will be fixed by rust-lang/chalk#809 (in the sense that we won't show 'static but '{unkown}
'{unkown}
No branches or pull requests
rust-analyzer version: 0.4.1907-standalone
rustc version: rustc 1.79.0-nightly (805813650 2024-03-31)
editor or extension: VSCode with extension v0.4.1907 (pre-release)
relevant settings:
repository link (if public, optional):
code snippet to reproduce:
RA hints that the type of
r
isRef<'static, i32>
, but the lifetime of&i
should not be'static
.The text was updated successfully, but these errors were encountered: