2017-11-05 18:04:18 +00:00
|
|
|
error: unnecessary `unsafe` block
|
|
|
|
--> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:17:13
|
|
|
|
|
|
2017-12-18 07:48:59 +00:00
|
|
|
15 | unsafe {
|
|
|
|
| ------ because it's nested under this `unsafe` block
|
|
|
|
16 | let f = |v: &mut Vec<_>| {
|
|
|
|
17 | unsafe { //~ ERROR unnecessary `unsafe`
|
|
|
|
| ^^^^^^ unnecessary `unsafe` block
|
2017-11-05 18:04:18 +00:00
|
|
|
|
|
|
|
|
note: lint level defined here
|
|
|
|
--> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:11:8
|
|
|
|
|
|
|
|
|
11 | #[deny(unused_unsafe)]
|
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: unnecessary `unsafe` block
|
|
|
|
--> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:19:38
|
|
|
|
|
|
2017-12-18 07:48:59 +00:00
|
|
|
15 | unsafe {
|
|
|
|
| ------ because it's nested under this `unsafe` block
|
|
|
|
...
|
|
|
|
19 | |w: &mut Vec<u32>| { unsafe { //~ ERROR unnecessary `unsafe`
|
|
|
|
| ^^^^^^ unnecessary `unsafe` block
|
2017-11-05 18:04:18 +00:00
|
|
|
|
|
|
|
error: unnecessary `unsafe` block
|
|
|
|
--> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:23:34
|
|
|
|
|
|
2017-12-18 07:48:59 +00:00
|
|
|
15 | unsafe {
|
|
|
|
| ------ because it's nested under this `unsafe` block
|
|
|
|
...
|
|
|
|
23 | |x: &mut Vec<u32>| { unsafe { //~ ERROR unnecessary `unsafe`
|
|
|
|
| ^^^^^^ unnecessary `unsafe` block
|
2017-11-05 18:04:18 +00:00
|
|
|
|
2017-11-14 14:01:50 +00:00
|
|
|
error: aborting due to 3 previous errors
|
2017-11-05 18:04:18 +00:00
|
|
|
|