E0022: unsupported representation

View source

meta repr(...) selects the memory layout of a type.

meta repr(...) selects the memory layout of a type. ADR-0097 allows a closed set of bare names: C, packed, transparent and align(N), where N is a positive u32 literal, as in align(8u32). Any other name, such as a string, is rejected, and so is an alignment that is not a positive u32 literal. The error points at the offending name or value.

Example

actus
meta repr(wide)
struct Point {
    x: Int,
}

verb main() {
}

Fix

Use one of the names, without quotes.

actus
meta repr(C)
struct Point {
    x: Int,
}

verb main() {
}

Run actus explain E0022 in your terminal to read this entry offline. Browse Lexer & parser or all error codes.