Compile fixes

This commit is contained in:
Sylvester Hesp 2022-09-07 15:07:33 +02:00 committed by Eduard-Mihai Burtescu
parent bbc97e7e18
commit b800a34b6b
2 changed files with 9 additions and 2 deletions

View File

@ -41,8 +41,10 @@ impl<'tcx> CodegenCx<'tcx> {
.span_err(span, &format!("Cannot declare {} as an entry point", name));
return;
};
let fn_hir_id = self.tcx.hir().local_def_id_to_hir_id(fn_local_def_id);
let body = self.tcx.hir().body(self.tcx.hir().body_owned_by(fn_hir_id));
let body = self
.tcx
.hir()
.body(self.tcx.hir().body_owned_by(fn_local_def_id));
body.params
};
for (arg_abi, hir_param) in fn_abi.args.iter().zip(hir_params) {

View File

@ -95,6 +95,7 @@ fn link_rlib(sess: &Session, codegen_results: &CodegenResults, out_filename: &Pa
| NativeLibKind::Dylib { .. }
| NativeLibKind::Framework { .. }
| NativeLibKind::RawDylib
| NativeLibKind::LinkArg
| NativeLibKind::Unspecified => continue,
}
if let Some(name) = lib.name {
@ -445,6 +446,10 @@ fn add_upstream_native_libraries(
NativeLibKind::RawDylib => {
sess.fatal(&format!("raw_dylib feature not yet implemented: {}", name))
}
NativeLibKind::LinkArg => sess.fatal(&format!(
"TODO: linkarg nativelibkind not supported yet: {}",
name
)),
}
}
}