Rename Unsafe to Safety
This commit is contained in:
parent
2d89cee625
commit
6b46a919e1
115 changed files with 460 additions and 494 deletions
|
@ -6,7 +6,7 @@ use rustc_ast::expand::allocator::{
|
|||
};
|
||||
use rustc_ast::ptr::P;
|
||||
use rustc_ast::{self as ast, AttrVec, Expr, FnHeader, FnSig, Generics, Param, StmtKind};
|
||||
use rustc_ast::{Fn, ItemKind, Mutability, Stmt, Ty, TyKind, Unsafe};
|
||||
use rustc_ast::{Fn, ItemKind, Mutability, Safety, Stmt, Ty, TyKind};
|
||||
use rustc_expand::base::{Annotatable, ExtCtxt};
|
||||
use rustc_span::symbol::{kw, sym, Ident, Symbol};
|
||||
use rustc_span::Span;
|
||||
|
@ -73,7 +73,7 @@ impl AllocFnFactory<'_, '_> {
|
|||
let result = self.call_allocator(method.name, args);
|
||||
let output_ty = self.ret_ty(&method.output);
|
||||
let decl = self.cx.fn_decl(abi_args, ast::FnRetTy::Ty(output_ty));
|
||||
let header = FnHeader { unsafety: Unsafe::Yes(self.span), ..FnHeader::default() };
|
||||
let header = FnHeader { safety: Safety::Unsafe(self.span), ..FnHeader::default() };
|
||||
let sig = FnSig { decl, header, span: self.span };
|
||||
let body = Some(self.cx.block_expr(result));
|
||||
let kind = ItemKind::Fn(Box::new(Fn {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue