- Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
A-tytype system / type inference / traits / method resolutiontype system / type inference / traits / method resolutionC-bugCategory: bugCategory: bug
Description
trait A { fn hello(&self); } trait B { fn test_1(&self) -> &impl A; fn test_2(&self) -> &dyn A; } struct C { } impl A for C { fn hello(&self) { } } impl B for C { fn test_1(&self) -> &impl A { self } fn test_2(&self) -> &dyn A { self } } fn test() { let c = C{}; c.test_1().<1>; // no hello() completion c.test_2().<2>; // hello() part of code suggestions c.test_1().hello(); // properly resolved c.test_2().hello(); // properly resolved }For <1> in you the code you don't get any useful code completion. But when changing from &impl T to &dyn T code-completion starts to work.
Currently rust-analyzer 0.4.2813 is installed.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-tytype system / type inference / traits / method resolutiontype system / type inference / traits / method resolutionC-bugCategory: bugCategory: bug
Type
Fields
Give feedbackNo fields configured for issues without a type.