Lines Matching defs:msg

25     pub(crate) msg: String,
46 fn span_range_error(self, span_range: SpanRange, msg: String) -> Self;
56 fn span_range_help(self, span_range: SpanRange, msg: String) -> Self;
66 fn span_range_note(self, span_range: SpanRange, msg: String) -> Self;
74 msg: message,
80 fn span_range_error(mut self, span_range: SpanRange, msg: String) -> Self {
81 self.children.push((span_range, msg));
85 fn span_range_help(mut self, span_range: SpanRange, msg: String) -> Self {
87 .push((SuggestionKind::Help, msg, Some(span_range)));
91 fn span_range_note(mut self, span_range: SpanRange, msg: String) -> Self {
93 .push((SuggestionKind::Note, msg, Some(span_range)));
118 pub fn span_error(self, span: Span, msg: String) -> Self {
124 msg,
133 pub fn span_help(self, span: Span, msg: String) -> Self {
139 msg,
144 pub fn help(mut self, msg: String) -> Self {
145 self.suggestions.push((SuggestionKind::Help, msg, None));
154 pub fn span_note(self, span: Span, msg: String) -> Self {
160 msg,
165 pub fn note(mut self, msg: String) -> Self {
166 self.suggestions.push((SuggestionKind::Note, msg, None));
172 &self.msg
199 pub fn span_suggestion(self, span: Span, suggestion: &str, msg: String) -> Self {
201 "help" | "hint" => self.span_help(span, msg),
202 _ => self.span_note(span, msg),
206 pub fn suggestion(self, suggestion: &str, msg: String) -> Self {
208 "help" | "hint" => self.help(msg),
209 _ => self.note(msg),
230 msg: &str,
238 Cow::Borrowed(msg)
241 ensure_lf(&mut message, msg);
255 let mut msg = proc_macro2::Literal::string(&message);
256 msg.set_span(span_range.last);
257 let group = quote_spanned!(span_range.last=> { #msg } );
264 &self.msg,
270 .map(|(span_range, msg)| diag_to_tokens(*span_range, &Level::Error, &msg, &[])),
329 let mut msg = lit.to_string();
332 msg.pop();
333 msg.remove(0);
335 Some((SpanRange { first, last }, msg))
340 let (span_range, msg) = gut_error(&mut ts).unwrap();
341 let mut res = Diagnostic::spanned_range(span_range, Level::Error, msg);
343 while let Some((span_range, msg)) = gut_error(&mut ts) {
344 res = res.span_range_error(span_range, msg);