pub trait DiagExt<T: LintContext> {
// Required methods
fn suggest_item_with_attr<D: Display + ?Sized>(
&mut self,
cx: &T,
item: Span,
msg: &str,
attr: &D,
applicability: Applicability,
);
fn suggest_prepend_item(
&mut self,
cx: &T,
item: Span,
msg: &str,
new_item: &str,
applicability: Applicability,
);
fn suggest_remove_item(
&mut self,
cx: &T,
item: Span,
msg: &str,
applicability: Applicability,
);
}
Expand description
Convenience extension trait for Diag
.
Required Methods§
Sourcefn suggest_item_with_attr<D: Display + ?Sized>(
&mut self,
cx: &T,
item: Span,
msg: &str,
attr: &D,
applicability: Applicability,
)
fn suggest_item_with_attr<D: Display + ?Sized>( &mut self, cx: &T, item: Span, msg: &str, attr: &D, applicability: Applicability, )
Sourcefn suggest_prepend_item(
&mut self,
cx: &T,
item: Span,
msg: &str,
new_item: &str,
applicability: Applicability,
)
fn suggest_prepend_item( &mut self, cx: &T, item: Span, msg: &str, new_item: &str, applicability: Applicability, )
Sourcefn suggest_remove_item(
&mut self,
cx: &T,
item: Span,
msg: &str,
applicability: Applicability,
)
fn suggest_remove_item( &mut self, cx: &T, item: Span, msg: &str, applicability: Applicability, )
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.