mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-27 02:06:57 +00:00
Differentiate between asm!(), global_asm!() and naked_asm!(), and make only asm!() unsafe
This commit is contained in:
parent
edb804a100
commit
bd8087e86e
16 changed files with 198 additions and 16 deletions
|
|
@ -118,6 +118,14 @@ impl AsmExpr {
|
|||
pub fn asm_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![asm]) }
|
||||
#[inline]
|
||||
pub fn builtin_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![builtin]) }
|
||||
#[inline]
|
||||
pub fn global_asm_token(&self) -> Option<SyntaxToken> {
|
||||
support::token(&self.syntax, T![global_asm])
|
||||
}
|
||||
#[inline]
|
||||
pub fn naked_asm_token(&self) -> Option<SyntaxToken> {
|
||||
support::token(&self.syntax, T![naked_asm])
|
||||
}
|
||||
}
|
||||
pub struct AsmLabel {
|
||||
pub(crate) syntax: SyntaxNode,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue