Stream: t-compiler/wg-nll

Topic: probable nll bug


DPC (Jul 24 2018 at 17:30, on Zulip):

Came across this conversation on #rust irc:

DPC (Jul 24 2018 at 17:30, on Zulip):

code: https://play.rust-lang.org/?gist=6c72f5d87e82cf0e3509dbae79f23037&version=nightly&mode=debug&edition=2015

run the code, comment out line 15 and run the code again

DPC (Jul 24 2018 at 17:30, on Zulip):

now remove #![feature(nll)] and repeat the same steps

DPC (Jul 24 2018 at 17:32, on Zulip):

from irc:

Looks like a worse error message than before due to NLL. Without NLL, it's a use-after-move error. With NLL, it may point to uninitialized instead of moved
Just to clarify, it appears to be the combination of NLL and assigning to the struct field that causes the mention of using/borrowing something that has been moved to disappear from the error message.

davidtwco (Jul 24 2018 at 17:35, on Zulip):

@DPC that link doesn't have any code in it, you'd need to click "Share" from the playground while you have the code in it. We just see whatever we had typed into playground last.

DPC (Jul 24 2018 at 17:35, on Zulip):

my bad xD

DPC (Jul 24 2018 at 17:35, on Zulip):

Code: https://play.rust-lang.org/?gist=6c72f5d87e82cf0e3509dbae79f23037&version=nightly&mode=debug&edition=2015

DPC (Jul 24 2018 at 17:36, on Zulip):

i thought i had already clicked on share :grin:

DPC (Jul 24 2018 at 17:55, on Zulip):

issue opened: https://github.com/rust-lang/rust/issues/52669

Last update: Nov 21 2019 at 13:40UTC