Skip to content

Commit c57aec8

Browse files
authored
Merge pull request #18677 from Veykril/push-uumpxklsqpzk
internal: Implement `naked_asm!` builtin
2 parents 42aefa7 + 88457c0 commit c57aec8

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

src/tools/rust-analyzer/crates/hir-expand/src/builtin/fn_macro.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl BuiltinFnLikeExpander {
7474
}
7575

7676
pub fn is_asm(&self) -> bool {
77-
matches!(self, Self::Asm | Self::GlobalAsm)
77+
matches!(self, Self::Asm | Self::GlobalAsm | Self::NakedAsm)
7878
}
7979
}
8080

@@ -122,6 +122,7 @@ register_builtin! {
122122
(stringify, Stringify) => stringify_expand,
123123
(asm, Asm) => asm_expand,
124124
(global_asm, GlobalAsm) => asm_expand,
125+
(naked_asm, NakedAsm) => asm_expand,
125126
(cfg, Cfg) => cfg_expand,
126127
(core_panic, CorePanic) => panic_expand,
127128
(std_panic, StdPanic) => panic_expand,

src/tools/rust-analyzer/crates/hir/src/semantics.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,7 @@ impl<'db> SemanticsImpl<'db> {
434434
| BuiltinFnLikeExpander::ModulePath
435435
| BuiltinFnLikeExpander::Asm
436436
| BuiltinFnLikeExpander::GlobalAsm
437+
| BuiltinFnLikeExpander::NakedAsm
437438
| BuiltinFnLikeExpander::LogSyntax
438439
| BuiltinFnLikeExpander::TraceMacros
439440
| BuiltinFnLikeExpander::FormatArgs

src/tools/rust-analyzer/crates/intern/src/symbol/symbols.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@ define_symbols! {
307307
module_path,
308308
mul_assign,
309309
mul,
310+
naked_asm,
310311
ne,
311312
neg,
312313
Neg,

0 commit comments

Comments
 (0)