Skip to main content

METHOD_SEP

Constant METHOD_SEP 

Source
pub const METHOD_SEP: char = '#';
Expand description

Separator between a type name and a method name in a mangled method symbol.

impl methods lower to per-type-unique free functions named Type#method. # is not a legal character in a candela identifier (which is [a-zA-Z_][a-zA-Z0-9_]*) and is never produced by the lexer, so a mangled name can never collide with a user-written free function or with a method of another type: Point#len and Str#len are distinct symbols, and both are distinct from a free fn len.