Like [`Diagnostic::add_note`], but returns `self` to allow chaining.
(mut self, message: impl Into<String>, span: Option<Span>)
| 137 | |
| 138 | /// Like [`Diagnostic::add_note`], but returns `self` to allow chaining. |
| 139 | pub fn with_note(mut self, message: impl Into<String>, span: Option<Span>) -> Self { |
| 140 | self.add_note(message.into(), span); |
| 141 | self |
| 142 | } |
| 143 | |
| 144 | /// Like [`Diagnostic::add_help`], but returns `self` to allow chaining. |
| 145 | pub fn with_help(mut self, message: impl Into<String>, span: Option<Span>) -> Self { |
no test coverage detected