perfectionist 0.0.0-rc.18

Additional linting rules for Rust projects
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! The pre-expansion pass parks one of these per macro-embedded string
//! literal it rewrites, for the late pass to dedup and emit after
//! `cfg_attr` has resolved, at the deepest enclosing HIR node.
//!
//! As with `print_macro_split`, the rewrite is computed up front (it
//! needs the source map, available pre-expansion) and carried as a
//! ready `String`. `Span` is `Copy + Send + Sync` and `String` is
//! `Send`, so the queue is safe to hold in a process-wide static.

use rustc_span::Span;

pub(super) struct PendingViolation {
    /// Span of the string literal — both the diagnostic anchor and the
    /// region the suggestion replaces.
    pub(super) span: Span,
    /// The raw-string replacement for `span`.
    pub(super) suggestion: String,
}