Enum ruxnasm::Warning[][src]

pub enum Warning {
    TokenTrimmed {
        span: Range<usize>,
    },
    InstructionModeDefinedMoreThanOnce {
        instruction_mode: char,
        instruction: String,
        span: Range<usize>,
        other_span: Range<usize>,
    },
    MacroUnused {
        name: String,
        span: Range<usize>,
    },
    LabelUnused {
        name: String,
        span: Range<usize>,
    },
}
Expand description

Enum representing every warning that can be reported from Ruxnasm.

Variants

TokenTrimmed

This warnings gets reported when a token is longer than 64 characters and must be cut off.

Example

@a-really-long-label-name-like-seriously-this-is-so-long-why-would-anyone-do-this
Show fields

Fields of TokenTrimmed

span: Range<usize>

Span of the cut off part of the token.

InstructionModeDefinedMoreThanOnce

This warning gets reported when an instruction mode is defined multiple times for a single instruction, which is valid, but unnecessary.

Example

ADD2k2
Show fields

Fields of InstructionModeDefinedMoreThanOnce

instruction_mode: char

Character representing the instruction mode.

instruction: String

The whole instruction.

span: Range<usize>

Span of the unnecessary instruction mode character.

other_span: Range<usize>

Span of the instruction mode character defined for the first time.

MacroUnused

This warning gets reported when a macro is never used.

Example

%macro { #0001 }
Show fields

Fields of MacroUnused

name: String

Name of the unused macro.

span: Range<usize>

Span of the macro definition.

LabelUnused

This warning gets reported when a label is never used.

Example

@label
Show fields

Fields of LabelUnused

name: String

Name of the unused label.

span: Range<usize>

Span of the label definition.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.