diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-02-24 14:03:45 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-02-24 14:03:45 +0000 |
| commit | c9e68eb0e1d42ad82fc0f89f3cc3bf5d0dcd2f44 (patch) | |
| tree | ec07603d1f78620353c2ca393f80792b190221f1 | |
| parent | 5ff55a4783e09ce3eda33e0db0a419c15a7f8b00 (diff) | |
| parent | 35a43a4833c032c975b97beccf266facf4583a63 (diff) | |
| download | rust-c9e68eb0e1d42ad82fc0f89f3cc3bf5d0dcd2f44.tar.gz rust-c9e68eb0e1d42ad82fc0f89f3cc3bf5d0dcd2f44.zip | |
Sync from rust f8a913b1381e90379c7ca63ac2b88b9518936628
| -rw-r--r-- | patches/0029-stdlib-Disable-f16-and-f128-in-compiler-builtins.patch | 2 | ||||
| -rw-r--r-- | src/global_asm.rs | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/patches/0029-stdlib-Disable-f16-and-f128-in-compiler-builtins.patch b/patches/0029-stdlib-Disable-f16-and-f128-in-compiler-builtins.patch index e3a9512dda9..eb1fc4b0ad5 100644 --- a/patches/0029-stdlib-Disable-f16-and-f128-in-compiler-builtins.patch +++ b/patches/0029-stdlib-Disable-f16-and-f128-in-compiler-builtins.patch @@ -15,7 +15,7 @@ index 7165c3e48af..968552ad435 100644 edition = "2021" [dependencies] - core = { path = "../core" } + core = { path = "../core", public = true } -compiler_builtins = { version = "=0.1.146", features = ['rustc-dep-of-std'] } +compiler_builtins = { version = "=0.1.146", features = ['rustc-dep-of-std', 'no-f16-f128'] } diff --git a/src/global_asm.rs b/src/global_asm.rs index 54745b0d8c1..9ea92c300f8 100644 --- a/src/global_asm.rs +++ b/src/global_asm.rs @@ -16,7 +16,7 @@ use crate::prelude::*; pub(crate) fn codegen_global_asm_item(tcx: TyCtxt<'_>, global_asm: &mut String, item_id: ItemId) { let item = tcx.hir_item(item_id); - if let rustc_hir::ItemKind::GlobalAsm(asm) = item.kind { + if let rustc_hir::ItemKind::GlobalAsm { asm, .. } = item.kind { let is_x86 = matches!(tcx.sess.asm_arch.unwrap(), InlineAsmArch::X86 | InlineAsmArch::X86_64); @@ -55,7 +55,7 @@ pub(crate) fn codegen_global_asm_item(tcx: TyCtxt<'_>, global_asm: &mut String, } } } - InlineAsmOperand::SymFn { anon_const } => { + InlineAsmOperand::SymFn { expr } => { if cfg!(not(feature = "inline_asm_sym")) { tcx.dcx().span_err( item.span, @@ -63,7 +63,7 @@ pub(crate) fn codegen_global_asm_item(tcx: TyCtxt<'_>, global_asm: &mut String, ); } - let ty = tcx.typeck_body(anon_const.body).node_type(anon_const.hir_id); + let ty = tcx.typeck(item_id.owner_id).expr_ty(expr); let instance = match ty.kind() { &ty::FnDef(def_id, args) => Instance::new(def_id, args), _ => span_bug!(op_sp, "asm sym is not a function"), |
