about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-04-21 10:21:28 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-04-21 10:21:28 +0000
commit934931b0796f82e6ce40187cabbce4f402c96e84 (patch)
treecf65aa3d7fd0cb735c08c0a072bd7de7948af624
parent49bfa1aaf5f7e68079e6ed9b0d23dacebf38bac9 (diff)
parent59c5ed0ba84d9007d8957dc1056f46bed381c100 (diff)
downloadrust-934931b0796f82e6ce40187cabbce4f402c96e84.tar.gz
rust-934931b0796f82e6ce40187cabbce4f402c96e84.zip
Sync from rust b8c54d6358926028ac2fab1ec2b8665c70edb1c0
-rw-r--r--example/mini_core_hello_world.rs6
-rw-r--r--src/main_shim.rs4
2 files changed, 4 insertions, 6 deletions
diff --git a/example/mini_core_hello_world.rs b/example/mini_core_hello_world.rs
index 09d5b73fd3d..0b3a7281d5a 100644
--- a/example/mini_core_hello_world.rs
+++ b/example/mini_core_hello_world.rs
@@ -387,11 +387,9 @@ global_asm! {
 }
 
 #[cfg(all(not(jit), target_arch = "x86_64"))]
-#[naked]
+#[unsafe(naked)]
 extern "C" fn naked_test() {
-    unsafe {
-        naked_asm!("ret");
-    }
+    naked_asm!("ret")
 }
 
 #[repr(C)]
diff --git a/src/main_shim.rs b/src/main_shim.rs
index 3b48adb7e91..6eef97c14dd 100644
--- a/src/main_shim.rs
+++ b/src/main_shim.rs
@@ -1,6 +1,6 @@
 use cranelift_frontend::{FunctionBuilder, FunctionBuilderContext};
 use rustc_hir::LangItem;
-use rustc_middle::ty::{AssocKind, GenericArg};
+use rustc_middle::ty::{AssocTag, GenericArg};
 use rustc_session::config::EntryFnType;
 use rustc_span::{DUMMY_SP, Ident};
 
@@ -107,7 +107,7 @@ pub(crate) fn maybe_create_entry_wrapper(
                     .find_by_ident_and_kind(
                         tcx,
                         Ident::from_str("report"),
-                        AssocKind::Fn,
+                        AssocTag::Fn,
                         termination_trait,
                     )
                     .unwrap();