more sb wording

This commit is contained in:
nora 2022-07-22 16:39:54 +02:00
parent 48c76f15e3
commit 7bc3d1cfbb

View file

@ -159,8 +159,8 @@ and only the pointers that have their tag in the stack are allowed to access it.
In the code example above, we get a nice little hint where the tag was created. When we created a reference (that was then
coerced into a raw pointer) from our box, it got a new tag called `<3314>`. Then, when we moved the box into the function,
something happened: The tag was invalidated and popped off the borrow stack. That's because box invalidates all tags when it's
moved. The tag was popped off the borrow stack and we tried to read from it anyways - undefined behaviour happened!
something happened: The tag was popped off the borrow stack and therefore invalidated. That's because box invalidates all tags
when it's moved. The tag was popped off the borrow stack and we tried to read with it anyways - undefined behaviour happened!
And that's how our code wasn't a miscompilation, but undefined behaviour. Quite surprising, isn't it?