2017-11-05 20:04:18 +02:00
|
|
|
error: unnecessary `unsafe` block
|
2021-05-27 20:37:49 +02:00
|
|
|
--> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:10:13
|
2017-11-05 20:04:18 +02:00
|
|
|
|
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | unsafe {
|
2017-12-17 23:48:59 -08:00
|
|
|
| ------ because it's nested under this `unsafe` block
|
2018-02-25 02:01:39 +03:00
|
|
|
LL | let f = |v: &mut Vec<_>| {
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | unsafe {
|
2017-12-17 23:48:59 -08:00
|
|
|
| ^^^^^^ unnecessary `unsafe` block
|
2017-11-05 20:04:18 +02:00
|
|
|
|
|
2020-01-22 23:57:38 +00:00
|
|
|
note: the lint level is defined here
|
2021-05-27 20:37:49 +02:00
|
|
|
--> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:4:8
|
2017-11-05 20:04:18 +02:00
|
|
|
|
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | #[deny(unused_unsafe)]
|
2017-11-05 20:04:18 +02:00
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: unnecessary `unsafe` block
|
2021-05-27 20:37:49 +02:00
|
|
|
--> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:12:38
|
2017-11-05 20:04:18 +02:00
|
|
|
|
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | unsafe {
|
2017-12-17 23:48:59 -08:00
|
|
|
| ------ because it's nested under this `unsafe` block
|
|
|
|
...
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | |w: &mut Vec<u32>| { unsafe {
|
2017-12-17 23:48:59 -08:00
|
|
|
| ^^^^^^ unnecessary `unsafe` block
|
2017-11-05 20:04:18 +02:00
|
|
|
|
|
|
|
error: unnecessary `unsafe` block
|
2021-05-27 20:37:49 +02:00
|
|
|
--> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:16:34
|
2017-11-05 20:04:18 +02:00
|
|
|
|
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | unsafe {
|
2017-12-17 23:48:59 -08:00
|
|
|
| ------ because it's nested under this `unsafe` block
|
|
|
|
...
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | |x: &mut Vec<u32>| { unsafe {
|
2017-12-17 23:48:59 -08:00
|
|
|
| ^^^^^^ unnecessary `unsafe` block
|
2017-11-05 20:04:18 +02:00
|
|
|
|
2017-11-14 16:01:50 +02:00
|
|
|
error: aborting due to 3 previous errors
|
2017-11-05 20:04:18 +02:00
|
|
|
|