Rename Unsafe to Safety
This commit is contained in:
parent
2d89cee625
commit
6b46a919e1
115 changed files with 460 additions and 494 deletions
|
@ -205,9 +205,9 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
|
|||
|
||||
if self_ty.is_fn() {
|
||||
let fn_sig = self_ty.fn_sig(self.tcx);
|
||||
let shortname = match fn_sig.unsafety() {
|
||||
hir::Unsafety::Normal => "fn",
|
||||
hir::Unsafety::Unsafe => "unsafe fn",
|
||||
let shortname = match fn_sig.safety() {
|
||||
hir::Safety::Safe => "fn",
|
||||
hir::Safety::Unsafe => "unsafe fn",
|
||||
};
|
||||
flags.push((sym::_Self, Some(shortname.to_owned())));
|
||||
}
|
||||
|
|
|
@ -1897,7 +1897,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
|
|||
*inputs,
|
||||
infcx.next_ty_var(DUMMY_SP),
|
||||
false,
|
||||
hir::Unsafety::Normal,
|
||||
hir::Safety::Safe,
|
||||
abi::Abi::Rust,
|
||||
)
|
||||
}
|
||||
|
@ -1905,7 +1905,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
|
|||
[inputs],
|
||||
infcx.next_ty_var(DUMMY_SP),
|
||||
false,
|
||||
hir::Unsafety::Normal,
|
||||
hir::Safety::Safe,
|
||||
abi::Abi::Rust,
|
||||
),
|
||||
};
|
||||
|
@ -3925,7 +3925,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
|
|||
&& let fn_sig @ ty::FnSig {
|
||||
abi: abi::Abi::Rust,
|
||||
c_variadic: false,
|
||||
unsafety: hir::Unsafety::Normal,
|
||||
safety: hir::Safety::Safe,
|
||||
..
|
||||
} = fn_ty.fn_sig(tcx).skip_binder()
|
||||
|
||||
|
|
|
@ -1712,7 +1712,7 @@ fn confirm_closure_candidate<'cx, 'tcx>(
|
|||
[sig.tupled_inputs_ty],
|
||||
output_ty,
|
||||
sig.c_variadic,
|
||||
sig.unsafety,
|
||||
sig.safety,
|
||||
sig.abi,
|
||||
)
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue