]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #39202 - estebank:nested-unsafe, r=jonathandturner
authorAlex Crichton <alex@alexcrichton.com>
Fri, 10 Mar 2017 22:51:12 +0000 (16:51 -0600)
committerGitHub <noreply@github.com>
Fri, 10 Mar 2017 22:51:12 +0000 (16:51 -0600)
commitd335c0a09b099a8737e64b043609297457d91db6
treede7703442b5dcda24e698257e3f640075f6b3159
parentf573db4f80c75f156df8a743f456bf087ec81dc2
parentac2bc7c570eec8a024cec779908c8ae718924e77
Rollup merge of #39202 - estebank:nested-unsafe, r=jonathandturner

Point to enclosing block/fn on nested unsafe

When declaring nested unsafe blocks (`unsafe {unsafe {}}`) that trigger
the "unnecessary `unsafe` block" error, point out the enclosing `unsafe
block` or `unsafe fn` that makes it unnecessary.

<img width="621" alt="" src="https://cloud.githubusercontent.com/assets/1606434/22139922/26ad468a-de9e-11e6-8884-2945be882ea8.png">

Fixes #39144.