pub struct Suggestion {
pub span: FileSpan,
pub replacement: Option<String>,
pub label: String,
}Expand description
A fix or piece of advice attached to a diagnostic.
When replacement is Some, it is a machine-applicable fix: replace span
with the given text (a “fix-it”). When None, the suggestion is advisory —
a help: line that explains how to resolve the problem without offering an
automatic rewrite (§8.2: “a concrete suggestion when available”).
Fields§
§span: FileSpan§replacement: Option<String>None for advisory hints with no automatic replacement.
label: StringTrait Implementations§
Source§impl Clone for Suggestion
impl Clone for Suggestion
Source§fn clone(&self) -> Suggestion
fn clone(&self) -> Suggestion
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for Suggestion
impl RefUnwindSafe for Suggestion
impl Send for Suggestion
impl Sync for Suggestion
impl Unpin for Suggestion
impl UnsafeUnpin for Suggestion
impl UnwindSafe for Suggestion
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more