Skip to main content

constructor_check

Function constructor_check 

Source
fn constructor_check(parsed: &ParsedImpl) -> TokenStream
Expand description

The compile-time half of the constructor decision. A block that declares the constructor implements the hidden miniextendr_api::registry::ClassConstructor for its type, under a type private to the block. A block with several constructor candidates and none declared requires that impl, once per candidate and spanned at it, so the type compiles only when another of its impl blocks declares the constructor; the error names each candidate. Two candidates in two blocks are the wrapper writer’s to refuse.