From: Ralf Jung Date: Thu, 2 May 2019 11:10:40 +0000 (+0200) Subject: less wide comments X-Git-Url: https://git.ralfj.de/web.git/commitdiff_plain/5aa70f42491b3b391de4288c76ebb4ae1dfe49d6?ds=sidebyside less wide comments --- diff --git a/personal/_posts/2019-04-30-stacked-borrows-2.md b/personal/_posts/2019-04-30-stacked-borrows-2.md index dec44ed..5f13b3d 100644 --- a/personal/_posts/2019-04-30-stacked-borrows-2.md +++ b/personal/_posts/2019-04-30-stacked-borrows-2.md @@ -35,7 +35,7 @@ fn foo(a: &mut u32, y: *mut u32) -> u32 { *a = 1; let _b = &*a; // This freezes `*a`. Frozen locations can be read by any raw pointer. let _val = unsafe { *y; }; // Hence, this legal in Stacked Borrows. - *a = 2; // But we might want to drop the earlier `*a = 1` because it gets overwritten by this! + *a = 2; // But we might want to drop the earlier `*a = 1` because it gets overwritten! _val } {% endhighlight %}