rust/tests/ui/unsafe/issue-45107-unnecessary-unsafe-in-closure.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:7: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:1: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:9:38
|
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 {
| ^^^^^^ unnecessary `unsafe` block
error: unnecessary `unsafe` block
--> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:13: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