rust-lang/rust-analyzer

Generic postfix `new` completion

Opened this issue · 0 comments

Imagine the following

let other_thing: OtherThing = ...;
let thing: RefCell<OtherThing> = other_thing$0;

imo it would be really nice if we could offer a postfix .new here that just does the expected thing of producing a RefCell::new(other_thing$0) edit that works for any expected type with such a new constructor.