Commit 478bb1f
committed
Adjust lint levels for using unsafe blocks in unsafe fns
If the `unsafe_op_in_unsafe_fn` lint is available (since Rust 1.52.0),
set it to "deny", requiring `unsafe { }` blocks in order to perform
unsafe operations even in unsafe functions; this silences the otherwise
default warning of the `unused_unsafe` lint as well.
If the `unsafe_op_in_unsafe_fn` lint is not available, then just supress
warnings from the `unused_unsafe` lint.1 parent fcdcff7 commit 478bb1f
3 files changed
+13
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
13 | 16 | | |
14 | 17 | | |
15 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
| 158 | + | |
| 159 | + | |
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
| |||
0 commit comments