File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -162,6 +162,13 @@ fn` for functions that are "unsafe to call" but do not implicitly have an
162
162
` unsafe {} ` block in their body. For consistency, we might want `unsafe_to_impl
163
163
trait` for traits, though the behavior would be the same as ` unsafe trait`.
164
164
165
+ We could avoid having the "unnecessary unsafe" lint depend on
166
+ ` unsafe_op_in_unsafe_fn ` and instead always behave like those blocks are
167
+ necessary (if they contain an "unsafe to call" operation). That would avoid a
168
+ dependency of one lint on another, but it could possibly be confusing when,
169
+ inside an ` unsafe fn ` , some operations are guarded by an unsafe block and others
170
+ are not.
171
+
165
172
We could introduce named proof obligations (proposed by @Centril ) such that the
166
173
compiler can be be told (to some extend) if the assumptions made by the `unsafe
167
174
fn` are sufficient to discharge the requirements of the unsafe operations.
You can’t perform that action at this time.
0 commit comments