2017-11-05 18:04:18 +00:00
|
|
|
error: unnecessary `unsafe` block
|
|
|
|
--> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:17:13
|
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | unsafe {
|
2017-12-18 07:48:59 +00:00
|
|
|
| ------ because it's nested under this `unsafe` block
|
|
|
|
16 | let f = |v: &mut Vec<_>| {
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | unsafe { //~ ERROR unnecessary `unsafe`
|
2017-12-18 07:48:59 +00:00
|
|
|
| ^^^^^^ 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
|
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | #[deny(unused_unsafe)]
|
2017-11-05 18:04:18 +00:00
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: unnecessary `unsafe` block
|
|
|
|
--> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:19:38
|
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | unsafe {
|
2017-12-18 07:48:59 +00:00
|
|
|
| ------ because it's nested under this `unsafe` block
|
|
|
|
...
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | |w: &mut Vec<u32>| { unsafe { //~ ERROR unnecessary `unsafe`
|
2017-12-18 07:48:59 +00:00
|
|
|
| ^^^^^^ 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
|
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | unsafe {
|
2017-12-18 07:48:59 +00:00
|
|
|
| ------ because it's nested under this `unsafe` block
|
|
|
|
...
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | |x: &mut Vec<u32>| { unsafe { //~ ERROR unnecessary `unsafe`
|
2017-12-18 07:48:59 +00:00
|
|
|
| ^^^^^^ 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
|
|
|
|