Rename Unsafe to Safety
This commit is contained in:
@@ -360,11 +360,11 @@ impl EarlyLintPass for UnsafeCode {
|
||||
|
||||
fn check_item(&mut self, cx: &EarlyContext<'_>, it: &ast::Item) {
|
||||
match it.kind {
|
||||
ast::ItemKind::Trait(box ast::Trait { unsafety: ast::Unsafe::Yes(_), .. }) => {
|
||||
ast::ItemKind::Trait(box ast::Trait { safety: ast::Safety::Unsafe(_), .. }) => {
|
||||
self.report_unsafe(cx, it.span, BuiltinUnsafe::UnsafeTrait);
|
||||
}
|
||||
|
||||
ast::ItemKind::Impl(box ast::Impl { unsafety: ast::Unsafe::Yes(_), .. }) => {
|
||||
ast::ItemKind::Impl(box ast::Impl { safety: ast::Safety::Unsafe(_), .. }) => {
|
||||
self.report_unsafe(cx, it.span, BuiltinUnsafe::UnsafeImpl);
|
||||
}
|
||||
|
||||
@@ -419,7 +419,7 @@ impl EarlyLintPass for UnsafeCode {
|
||||
if let FnKind::Fn(
|
||||
ctxt,
|
||||
_,
|
||||
ast::FnSig { header: ast::FnHeader { unsafety: ast::Unsafe::Yes(_), .. }, .. },
|
||||
ast::FnSig { header: ast::FnHeader { safety: ast::Safety::Unsafe(_), .. }, .. },
|
||||
_,
|
||||
_,
|
||||
body,
|
||||
|
||||
Reference in New Issue
Block a user