Check for inline assembly in THIR unsafeck
This commit is contained in:
parent
36a4d14c7e
commit
116bc6dd76
4 changed files with 53 additions and 1 deletions
|
@ -153,6 +153,9 @@ impl<'thir, 'tcx> Visitor<'thir, 'tcx> for UnsafetyVisitor<'tcx> {
|
|||
self.requires_unsafe(expr.span, CallToUnsafeFunction);
|
||||
}
|
||||
}
|
||||
ExprKind::InlineAsm { .. } | ExprKind::LlvmInlineAsm { .. } => {
|
||||
self.requires_unsafe(expr.span, UseOfInlineAssembly);
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
||||
|
@ -194,7 +197,6 @@ impl BodyUnsafety {
|
|||
#[derive(Clone, Copy, PartialEq)]
|
||||
enum UnsafeOpKind {
|
||||
CallToUnsafeFunction,
|
||||
#[allow(dead_code)] // FIXME
|
||||
UseOfInlineAssembly,
|
||||
#[allow(dead_code)] // FIXME
|
||||
InitializingTypeWith,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue