Rename Unsafe to Safety
This commit is contained in:
parent
2701a4175f
commit
0590d71ce2
17 changed files with 57 additions and 62 deletions
|
|
@ -12,7 +12,7 @@ use rustc_hir::hir_id::{HirId, HirIdMap};
|
|||
use rustc_hir::intravisit::{walk_expr, Visitor};
|
||||
use rustc_hir::{
|
||||
self as hir, AnonConst, BinOpKind, BindingMode, Body, Expr, ExprKind, FnRetTy, FnSig, GenericArg, ImplItemKind,
|
||||
ItemKind, Lifetime, Mutability, Node, Param, PatKind, QPath, TraitFn, TraitItem, TraitItemKind, TyKind, Unsafety,
|
||||
ItemKind, Lifetime, Mutability, Node, Param, PatKind, QPath, Safety, TraitFn, TraitItem, TraitItemKind, TyKind,
|
||||
};
|
||||
use rustc_infer::infer::TyCtxtInferExt;
|
||||
use rustc_infer::traits::{Obligation, ObligationCause};
|
||||
|
|
@ -542,7 +542,7 @@ fn check_mut_from_ref<'tcx>(cx: &LateContext<'tcx>, sig: &FnSig<'_>, body: Optio
|
|||
if let Some(args) = args
|
||||
&& !args.is_empty()
|
||||
&& body.map_or(true, |body| {
|
||||
sig.header.unsafety == Unsafety::Unsafe || contains_unsafe_block(cx, body.value)
|
||||
sig.header.safety == Safety::Unsafe || contains_unsafe_block(cx, body.value)
|
||||
})
|
||||
{
|
||||
span_lint_and_then(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue