Change missing impl assist to use todo!() instead of unimplemented()

todo!() "Indicates unfinished code" (https://doc.rust-lang.org/std/macro.todo.html)

Rust documentation provides further clarification:

> The difference between unimplemented! and todo! is that while todo!
> conveys an intent of implementing the functionality later and the
> message is "not yet implemented", unimplemented! makes no such claims.

todo!() seems more appropriate for assists that insert missing impls.
This commit is contained in:
Chris Hopman 2020-04-10 13:41:11 -07:00
parent ca9a5dd165
commit af04d45d32
5 changed files with 32 additions and 20 deletions

View file

@ -100,6 +100,9 @@ pub fn expr_empty_block() -> ast::Expr {
pub fn expr_unimplemented() -> ast::Expr {
expr_from_text("unimplemented!()")
}
pub fn expr_todo() -> ast::Expr {
expr_from_text("todo!()")
}
pub fn expr_path(path: ast::Path) -> ast::Expr {
expr_from_text(&path.to_string())
}