rust/tests/ui/unsafe/issue-45107-unnecessary-unsafe-in-closure.mir.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
1.1 KiB
Plaintext
Raw Normal View History

error: unnecessary `unsafe` block
--> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:10:13
|
2018-02-23 00:42:32 +00:00
LL | unsafe {
| ------ 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 {
| ^^^^^^ unnecessary `unsafe` block
|
2020-01-22 23:57:38 +00:00
note: the lint level is defined here
--> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:4:8
|
2018-02-23 00:42:32 +00:00
LL | #[deny(unused_unsafe)]
| ^^^^^^^^^^^^^
error: unnecessary `unsafe` block
--> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:12:38
|
2018-02-23 00:42:32 +00:00
LL | unsafe {
| ------ because it's nested under this `unsafe` block
...
2019-03-09 12:03:44 +00:00
LL | |w: &mut Vec<u32>| { unsafe {
| ^^^^^^ unnecessary `unsafe` block
error: unnecessary `unsafe` block
--> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:16:34
|
2018-02-23 00:42:32 +00:00
LL | unsafe {
| ------ because it's nested under this `unsafe` block
...
2019-03-09 12:03:44 +00:00
LL | |x: &mut Vec<u32>| { unsafe {
| ^^^^^^ unnecessary `unsafe` block
error: aborting due to 3 previous errors