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
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
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![];