Enum rustc_ap_rustc_lint_defs::Applicability[][src]

pub enum Applicability {
    MachineApplicable,
    MaybeIncorrect,
    HasPlaceholders,
    Unspecified,
}
Expand description

Indicates the confidence in the correctness of a suggestion.

All suggestions are marked with an Applicability. Tools use the applicability of a suggestion to determine whether it should be automatically applied or if the user should be consulted before applying the suggestion.

Variants

MachineApplicable

The suggestion is definitely what the user intended, or maintains the exact meaning of the code. This suggestion should be automatically applied.

In case of multiple MachineApplicable suggestions (whether as part of the same multipart_suggestion or not), all of them should be automatically applied.

MaybeIncorrect

The suggestion may be what the user intended, but it is uncertain. The suggestion should result in valid Rust code if it is applied.

HasPlaceholders

The suggestion contains placeholders like (...) or { /* fields */ }. The suggestion cannot be applied automatically because it will not result in valid Rust code. The user will need to fill in the placeholders.

Unspecified

The applicability of the suggestion is unknown.

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

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. 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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

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.