···20203 │ use <- wibble()
2121 │ ^^^^^^^^^^^^^^^ This code is incomplete
22222323-This code will crash if it is run. Be sure to finish it before
2424-running your program.
2523A use expression must always be followed by at least one expression.
2424+2525+A todo expression has been use in place of the missing code, so
2626+this code will crash if it is run. Be sure to finish it before
2727+running your program.
···17174 │ use <- thingy()
1818 │ ^^^^^^^^^^^^^^^ This code is incomplete
19192020-This code will crash if it is run. Be sure to finish it before
2121-running your program.
2220A use expression must always be followed by at least one expression.
2121+2222+A todo expression has been use in place of the missing code, so
2323+this code will crash if it is run. Be sure to finish it before
2424+running your program.
···14142 │ pub fn wibble() { }
1515 │ ^^^^^^^^^^^^^^^ This code is incomplete
16161717-This code will crash if it is run. Be sure to finish it before
1717+A function must always have an implementation.
1818+1919+A todo expression has been use in place of the missing body,
2020+so this code will crash if it is run. Be sure to finish it before
1821running your program.
···16163 │ {}
1717 │ ^^ This code is incomplete
18181919-This code will crash if it is run. Be sure to finish it before
2020-running your program.
2119A block must always contain at least one expression.
2020+2121+A todo expression has been use in place of the missing code,
2222+so this code will crash if it is run. Be sure to finish it before
2323+running your program.
···440440 type_,
441441 names,
442442 } => {
443443- let mut text = String::new();
444444- text.push_str(
445445- "\
443443+ let (title, text) = match kind {
444444+ TodoKind::Keyword => {
445445+ let text = "\
446446This code will crash if it is run. Be sure to finish it before
447447-running your program.",
448448- );
449449- let title = match kind {
450450- TodoKind::Keyword => "Todo found",
447447+running your program.";
448448+449449+ ("Todo found", text)
450450+ }
451451+451452 TodoKind::EmptyBlock => {
452452- text.push_str(
453453- "
454454-A block must always contain at least one expression.",
455455- );
456456- "Incomplete block"
453453+ let text = "\
454454+A block must always contain at least one expression.
455455+456456+A todo expression has been use in place of the missing code,
457457+so this code will crash if it is run. Be sure to finish it before
458458+running your program.";
459459+ ("Incomplete block", text)
460460+ }
461461+ TodoKind::EmptyFunction { .. } => {
462462+ let text = "\
463463+A function must always have an implementation.
464464+465465+A todo expression has been use in place of the missing body,
466466+so this code will crash if it is run. Be sure to finish it before
467467+running your program.";
468468+ ("Unimplemented function", text)
457469 }
458458- TodoKind::EmptyFunction { .. } => "Unimplemented function",
459470 TodoKind::IncompleteUse => {
460460- text.push_str(
461461- "
462462-A use expression must always be followed by at least one expression.",
463463- );
464464- "Incomplete use expression"
471471+ let text = "\
472472+A use expression must always be followed by at least one expression.
473473+474474+A todo expression has been use in place of the missing code, so
475475+this code will crash if it is run. Be sure to finish it before
476476+running your program.";
477477+ ("Incomplete use expression", text)
465478 }
466479 }
467480 .into();
···476489 };
477490478491 Diagnostic {
479479- title,
480480- text,
492492+ title: title.into(),
493493+ text: text.into(),
481494 level: diagnostic::Level::Warning,
482495 location: Some(Location {
483496 path: path.to_path_buf(),