How NLL for struct works?

Foo and Bar don't implement Drop though -- compiler generated "drop glue", which is not a Drop implementation, recursively drops the members. I'd link you to documentation explaining this, but as far as I know, there is no official documentation which covers all of these details.

(If you impl Drop for your structs, you will get a similar error.)

This covers what drop glue does, but I don't think it covers the difference in NLL or lexical terms.

Here's a previous forum thread on the topic as well.

1 Like