Skip to main content

format_expr

Function format_expr 

Source
pub fn format_expr(expr: &Expr) -> String
Expand description

Renders one expression on a single line, from the tree alone.

A literal’s spelling is not in the tree, so 0xff renders as 255. That is enough for the places this is used: showing a parameter’s default in a signature, where what matters is which value it is.