Add missing docs and remove dead code
This commit is contained in:
@@ -521,7 +521,8 @@ impl Handler {
|
||||
}
|
||||
|
||||
/// Construct a builder at the `Warning` level at the given `span` and with the `msg`.
|
||||
/// Cancel the builder if warnings cannot be emitted
|
||||
///
|
||||
/// The builder will be canceled if warnings cannot be emitted.
|
||||
pub fn struct_span_warn(&self, span: impl Into<MultiSpan>, msg: &str) -> DiagnosticBuilder<'_> {
|
||||
let mut result = self.struct_warn(msg);
|
||||
result.set_span(span);
|
||||
@@ -529,6 +530,9 @@ impl Handler {
|
||||
}
|
||||
|
||||
/// Construct a builder at the `Warning` level at the given `span` and with the `msg`.
|
||||
///
|
||||
/// This will "force" the warning meaning it will not be canceled even
|
||||
/// if warnings cannot be emitted.
|
||||
pub fn struct_span_force_warn(
|
||||
&self,
|
||||
span: impl Into<MultiSpan>,
|
||||
@@ -564,7 +568,8 @@ impl Handler {
|
||||
}
|
||||
|
||||
/// Construct a builder at the `Warning` level with the `msg`.
|
||||
/// Cancel the builder if warnings cannot be emitted
|
||||
///
|
||||
/// The builder will be canceled if warnings cannot be emitted.
|
||||
pub fn struct_warn(&self, msg: &str) -> DiagnosticBuilder<'_> {
|
||||
let mut result = DiagnosticBuilder::new(self, Level::Warning, msg);
|
||||
if !self.flags.can_emit_warnings {
|
||||
@@ -574,6 +579,9 @@ impl Handler {
|
||||
}
|
||||
|
||||
/// Construct a builder at the `Warning` level with the `msg`.
|
||||
///
|
||||
/// This will "force" a warning meaning it will not be canceled even
|
||||
/// if warnings cannot be emitted.
|
||||
pub fn struct_force_warn(&self, msg: &str) -> DiagnosticBuilder<'_> {
|
||||
DiagnosticBuilder::new(self, Level::Warning, msg)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user