the assignment kills the loan of the lhs, in this example, it means p (i.e. & /*'foo*/ foo from (0)), and foo is a prefix of foo itself, so it is killed.
this talk on polonius by niko explains the borrow checker very well, like the concept of paths, loans, etc, I highly recommend you to watch it: