SubstitutionPart in rustc_errors - Rust (original) (raw)
Struct SubstitutionPart
pub struct SubstitutionPart {
pub span: Span,
pub snippet: String,
}
Whether this is a replacement that overwrites source with a snippet in a way that isn’t a superset of the original string. For example, replacing “abc” with “abcde” is not destructive, but replacing it it with “abx” is, since the “c” character is lost.
Try to turn a replacement into an addition when the span that is being overwritten matches either the prefix or suffix of the replacement.
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes