docs

#E0109: malformed attribute

An attribute's arguments are not in the form it takes, or the attribute is not one Nabi knows. The message gives the form, such as #[path("file.nabi")].

nabi
#[inlin]
fn twice(x: i32) -> i32 { x * 2 }
println(f"{twice(2)}");
error[E0109]: unknown attribute `#[inlin]`: not built in and no meta block defines it
  --> main.nabi:1:1
   |
 1 | #[inlin]
   | ^^

Spell the attribute as listed in 6.2 Built-in attributes:

nabi
#[inline]
fn twice(x: i32) -> i32 { x * 2 }
println(f"{twice(2)}");
4

An attribute that is neither built in nor defined by a meta block in scope is unknown (6.1.6).

Related: E0110 attribute on the wrong item, E0108 cannot derive

Found a mistake? Edit this page on GitHub. Last updated