feat: print todo's type when printing the todo warning

This commit is contained in:
rvcas 2023-03-15 16:28:59 -04:00 committed by Lucas
parent f7308f22fd
commit bf94956c7e
1 changed files with 6 additions and 1 deletions

View File

@ -1287,7 +1287,12 @@ pub enum Warning {
}, },
#[error("I found a todo left in the code.\n")] #[error("I found a todo left in the code.\n")]
#[diagnostic(help("You probably want to replace that one with real code... eventually."))] #[diagnostic(
help(
"You probably want to replace that one with real code... eventually. The expected type is {}",
tipo.to_pretty_with_names(HashMap::new(), 0).if_supports_color(Stderr, |s| s.purple())
)
)]
#[diagnostic(code("todo"))] #[diagnostic(code("todo"))]
Todo { Todo {
#[label] #[label]