Remove unused DiagnosticBuilder::sub
function
`Diagnostic::sub` is only ever used directly; it doesn't need to be included in the builder.
This commit is contained in:
parent
8cd7d86ce2
commit
785aeac521
2 changed files with 2 additions and 13 deletions
|
@ -582,6 +582,8 @@ impl Diagnostic {
|
||||||
|
|
||||||
/// Convenience function for internal use, clients should use one of the
|
/// Convenience function for internal use, clients should use one of the
|
||||||
/// public methods above.
|
/// public methods above.
|
||||||
|
///
|
||||||
|
/// Used by `proc_macro_server` for implementing `server::Diagnostic`.
|
||||||
pub fn sub(
|
pub fn sub(
|
||||||
&mut self,
|
&mut self,
|
||||||
level: Level,
|
level: Level,
|
||||||
|
|
|
@ -157,19 +157,6 @@ impl<'a> DiagnosticBuilder<'a> {
|
||||||
buffered_diagnostics.extend(self.into_diagnostic().map(|(diag, _)| diag));
|
buffered_diagnostics.extend(self.into_diagnostic().map(|(diag, _)| diag));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Convenience function for internal use, clients should use one of the
|
|
||||||
/// span_* methods instead.
|
|
||||||
pub fn sub<S: Into<MultiSpan>>(
|
|
||||||
&mut self,
|
|
||||||
level: Level,
|
|
||||||
message: &str,
|
|
||||||
span: Option<S>,
|
|
||||||
) -> &mut Self {
|
|
||||||
let span = span.map(|s| s.into()).unwrap_or_else(MultiSpan::new);
|
|
||||||
self.0.diagnostic.sub(level, message, span, None);
|
|
||||||
self
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Delay emission of this diagnostic as a bug.
|
/// Delay emission of this diagnostic as a bug.
|
||||||
///
|
///
|
||||||
/// This can be useful in contexts where an error indicates a bug but
|
/// This can be useful in contexts where an error indicates a bug but
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue