improve error message when global_asm! uses asm! options

This commit is contained in:
Folkert
2024-07-25 10:05:31 +02:00
parent eb10639928
commit d3858f7465
10 changed files with 128 additions and 69 deletions

View File

@@ -2265,6 +2265,11 @@ bitflags::bitflags! {
}
impl InlineAsmOptions {
pub const COUNT: usize = Self::all().bits().count_ones() as usize;
pub const GLOBAL_OPTIONS: Self = Self::ATT_SYNTAX.union(Self::RAW);
pub const NAKED_OPTIONS: Self = Self::ATT_SYNTAX.union(Self::RAW).union(Self::NORETURN);
pub fn human_readable_names(&self) -> Vec<&'static str> {
let mut options = vec![];