Fix unused_unsafe with compiler-generated unsafe
This commit is contained in:
parent
39260f6d49
commit
b07bb6d698
9 changed files with 43 additions and 25 deletions
|
@ -321,6 +321,7 @@ impl<'a, 'tcx> UnsafetyChecker<'a, 'tcx> {
|
|||
}
|
||||
false
|
||||
}
|
||||
Safety::BuiltinUnsafe => true,
|
||||
Safety::ExplicitUnsafe(hir_id) => {
|
||||
// mark unsafe block as used if there are any unsafe operations inside
|
||||
if !violations.is_empty() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue