is_default_for_syntax

Function is_default_for_syntax 

Source
fn is_default_for_syntax(lit: &LiteralType) -> bool
Expand description

Whether this type is the default interpretation for its value syntax.

Each literal value syntax has a default type that the parser assumes when no explicit type suffix is present:

  • true/falseboolean
  • bare integers (42) → i64
  • bare floats (3.19) → fp64
  • single-quoted strings ('hello') → string
  • hex literals (0x...) → binary

Non-default types (e.g., i32, fp32, date) always need an explicit suffix to distinguish them from the default.