Skip to content

Commit

Permalink
Merge pull request rust-lang#18677 from Veykril/push-uumpxklsqpzk
Browse files Browse the repository at this point in the history
internal: Implement `naked_asm!` builtin
  • Loading branch information
Veykril authored Dec 12, 2024
2 parents cde07f2 + f748eb5 commit 9b2e72c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/hir-expand/src/builtin/fn_macro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ impl BuiltinFnLikeExpander {
}

pub fn is_asm(&self) -> bool {
matches!(self, Self::Asm | Self::GlobalAsm)
matches!(self, Self::Asm | Self::GlobalAsm | Self::NakedAsm)
}
}

Expand Down Expand Up @@ -122,6 +122,7 @@ register_builtin! {
(stringify, Stringify) => stringify_expand,
(asm, Asm) => asm_expand,
(global_asm, GlobalAsm) => asm_expand,
(naked_asm, NakedAsm) => asm_expand,
(cfg, Cfg) => cfg_expand,
(core_panic, CorePanic) => panic_expand,
(std_panic, StdPanic) => panic_expand,
Expand Down
1 change: 1 addition & 0 deletions crates/hir/src/semantics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ impl<'db> SemanticsImpl<'db> {
| BuiltinFnLikeExpander::ModulePath
| BuiltinFnLikeExpander::Asm
| BuiltinFnLikeExpander::GlobalAsm
| BuiltinFnLikeExpander::NakedAsm
| BuiltinFnLikeExpander::LogSyntax
| BuiltinFnLikeExpander::TraceMacros
| BuiltinFnLikeExpander::FormatArgs
Expand Down
1 change: 1 addition & 0 deletions crates/intern/src/symbol/symbols.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ define_symbols! {
module_path,
mul_assign,
mul,
naked_asm,
ne,
neg,
Neg,
Expand Down

0 comments on commit 9b2e72c

Please sign in to comment.