rust/src/test/ui/issue-45107-unnecessary-unsafe-in-closure.stderr

36 lines
1.2 KiB
Plaintext
Raw Normal View History

error: unnecessary `unsafe` block
--> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:17:13
|
2018-02-23 00:42:32 +00:00
LL | unsafe {
| ------ 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`
| ^^^^^^ unnecessary `unsafe` block
|
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)]
| ^^^^^^^^^^^^^
error: unnecessary `unsafe` block
--> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:19:38
|
2018-02-23 00:42:32 +00:00
LL | unsafe {
| ------ 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`
| ^^^^^^ unnecessary `unsafe` block
error: unnecessary `unsafe` block
--> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:23:34
|
2018-02-23 00:42:32 +00:00
LL | unsafe {
| ------ 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`
| ^^^^^^ unnecessary `unsafe` block
error: aborting due to 3 previous errors