2017-11-05 18:04:18 +00:00
|
|
|
error: unnecessary `unsafe` block
|
2023-10-26 16:13:20 +00:00
|
|
|
--> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:7: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
|
2023-10-26 16:13:20 +00:00
|
|
|
--> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:1: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
|
2023-10-26 16:13:20 +00:00
|
|
|
--> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:9:38
|
2017-11-05 18:04:18 +00:00
|
|
|
|
|
2023-12-07 11:56:48 +00:00
|
|
|
LL | unsafe {
|
|
|
|
| ------ because it's nested under this `unsafe` block
|
|
|
|
LL | v.set_len(24);
|
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
|
2023-10-26 16:13:20 +00:00
|
|
|
--> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:13: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
|
|
|
|