You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.
NB: This might be a duplicate as I'm surprised it's never been even brought up, but I can't find any issues matching Deref with GitHub search
It does not appear that autocompletion is recursively triggered for the target of a Deref operation, both when triggered implicitly or explicitly.
Given the following code, which compiles and runs correctly:
use std::ops::Deref;structDerefExample<T>{value:T}impl<T>DerefforDerefExample<T>{typeTarget = T;fnderef(&self) -> &T{&self.value}}fnmain() -> (){let x = DerefExample{value:"a".to_string()};
x.deref().starts_with("a");}
Explicit Deref
On the line x.deref().starts_with..., autocompletion after x.deref(). suggests nothing. This is presumably tied to another bug, as the signature is clear (and rls itself is aware of x.deref() -> &T's existence).
Implicit Deref
On the same line, x. suggests value, deref() -> &T, and deref() -> &Self::Target. It does not suggest starts_with(...) -> bool.
The text was updated successfully, but these errors were encountered:
use std::ops::Deref;structFoo{}implFoo{fnbar(&self){println!("nights");}}structRef<'a,T:'a>{obj:&'aT,}impl<'a,T>DerefforRef<'a,T>{typeTarget = T;fnderef(&self) -> &Self::Target{self.obj}}fnmain(){let a = Ref{obj:&Foo{}};// a. // Auto-complete does not work here}
NB: This might be a duplicate as I'm surprised it's never been even brought up, but I can't find any issues matching
Deref
with GitHub searchIt does not appear that autocompletion is recursively triggered for the target of a
Deref
operation, both when triggered implicitly or explicitly.Given the following code, which compiles and runs correctly:
Explicit Deref
On the line
x.deref().starts_with...
, autocompletion afterx.deref().
suggests nothing. This is presumably tied to another bug, as the signature is clear (and rls itself is aware ofx.deref() -> &T
's existence).Implicit Deref
On the same line,
x.
suggestsvalue
,deref() -> &T
, andderef() -> &Self::Target
. It does not suggeststarts_with(...) -> bool
.The text was updated successfully, but these errors were encountered: