let function_type;
let (fn_sig, abi, env_ty) = match fn_type.sty {
- ty::TyBareFn(_, ref f) => (&f.sig, f.abi, None),
+ ty::TyFnDef(_, ref f) | ty::TyFnPtr(ref f) => (&f.sig, f.abi, None),
ty::TyClosure(closure_did, ref substs) => {
let infcx = infer::normalizing_infer_ctxt(ccx.tcx(), &ccx.tcx().tables);
function_type = infcx.closure_type(closure_did, substs);
_ => ccx.sess().bug("expected tuple'd inputs")
}
},
- ty::TyBareFn(..) if abi == Abi::RustCall => {
+ ty::TyFnDef(..) | ty::TyFnPtr(_) if abi == Abi::RustCall => {
let mut inputs = vec![fn_sig.inputs[0]];
match fn_sig.inputs[1].sty {
// on memory dependencies rather than pointer equality
let interior_unsafe = mt.ty.type_contents(ccx.tcx()).interior_unsafe();
- if mt.mutbl == hir::MutMutable || !interior_unsafe {
+ if mt.mutbl != hir::MutMutable && !interior_unsafe {
attrs.arg(idx, llvm::Attribute::NoAlias);
}