internal: move make::expr_unit to make::ext::expr_unit

`expr_unit` is just a shortcut for a common expression, so it belongs in `make::ext`
This commit is contained in:
Giga Bowser 2024-12-16 14:38:53 -05:00
parent f388482119
commit 905e1e1fc0
8 changed files with 18 additions and 18 deletions

View file

@ -63,6 +63,9 @@ pub mod ext {
Some(expr)
}
pub fn expr_unit() -> ast::Expr {
expr_tuple([]).into()
}
pub fn expr_unreachable() -> ast::Expr {
expr_from_text("unreachable!()")
}
@ -546,10 +549,6 @@ pub fn hacky_block_expr(
ast_from_text(&format!("fn f() {buf}"))
}
pub fn expr_unit() -> ast::Expr {
expr_from_text("()")
}
pub fn expr_literal(text: &str) -> ast::Literal {
assert_eq!(text.trim(), text);
ast_from_text(&format!("fn f() {{ let _ = {text}; }}"))