E0013: duplicate metadata attribute

View source

An attribute that has no meaning twice may be written only once on a declaration.

An attribute that has no meaning twice may be written only once on a declaration. This applies to test, must_use, volatile, zero_on_drop, stack_limit and to a repeated part of repr, such as two C or two align. ADR-0090 rejects a repeated must_use and ADR-0097 a repeated repr component. The same holds when the same capability is named twice. The error points at the meta line that repeats the attribute.

Example

actus
meta must_use("first reason")
meta must_use("second reason")
verb answer() -> Int {
    return 42;
}

verb main() {
}

Fix

Keep one attribute. If the two lines carry different information, join it in one reason.

actus
meta must_use("the answer must be checked")
verb answer() -> Int {
    return 42;
}

verb main() {
}

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