top | item 43047499

(no title)

powerhugs | 1 year ago

So it can rust now? That's impressive!

Last time I tried it had no way of valid rust code beyond hello-world level, constantly producing code that failed the borrow checker.

discuss

order

lionkor|1 year ago

I rarely if ever have to worry about the borrow checker, mostly stumbling blocks are move/copy/clone semantics.

GitHub Copilot does a good job of generating correct Rust, it just has the usual subtle-but-annihilating-if-not-caught logic bugs, like in all other languages.

diggan|1 year ago

> rarely if ever have to worry about the borrow checker mostly stumbling blocks are move/copy/clone semantics

I'm don't write Rust for a living, only been experimenting on-and-off with the language, but isn't stumbling on the move/copy/clone semantics literally stumbling on the borrow checker? Or are there issues regarding move/copy/clone that aren't related to the the borrow checker?

ajayka|1 year ago

In my experience, Copilot is not able to fix rust code flagged by the borrow checker. Its suggestions are almost always wrong.This is a hard problem and often requires restructing the code (and sometimes using inner mutuability constructs such as RefCell and so on).