2017-11-05 18:04:18 +00:00
|
|
|
error: unnecessary `unsafe` block
|
2021-05-27 18:37:49 +00:00
|
|
|
--> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:10:13
|
2017-11-05 18:04:18 +00:00
|
|
|
|
|
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-24 23:01:39 +00:00
|
|
|
LL | let f = |v: &mut Vec<_>| {
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | unsafe {
|
2017-12-18 07:48:59 +00:00
|
|
|
| ^^^^^^ unnecessary `unsafe` block
|
2017-11-05 18:04:18 +00:00
|
|
|
|
|
2020-01-22 23:57:38 +00:00
|
|
|
note: the lint level is defined here
|
2021-05-27 18:37:49 +00:00
|
|
|
--> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:4:8
|
2017-11-05 18:04:18 +00:00
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | #[deny(unused_unsafe)]
|
2017-11-05 18:04:18 +00:00
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: unnecessary `unsafe` block
|
2021-05-27 18:37:49 +00:00
|
|
|
--> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:12:38
|
2017-11-05 18:04:18 +00:00
|
|
|
|
|
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
|
|
|
|
...
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | |w: &mut Vec<u32>| { unsafe {
|
2017-12-18 07:48:59 +00:00
|
|
|
| ^^^^^^ unnecessary `unsafe` block
|
2017-11-05 18:04:18 +00:00
|
|
|
|
|
|
|
error: unnecessary `unsafe` block
|
2021-05-27 18:37:49 +00:00
|
|
|
--> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:16:34
|
2017-11-05 18:04:18 +00:00
|
|
|
|
|
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
|
|
|
|
...
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | |x: &mut Vec<u32>| { 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
|
|
|
|