Rellum Rellum

S0140: repr attribute is only valid on type and enum definitions

Generated from rellum-diagnostics/src/db.rs.

Explanation

#[repr] controls memory layout. Only type and enum definitions have a layout in the Rellum type system; functions and reactive bindings do not.

Common causes

Canonical fixes

Before:

#[repr(C)]
make_point() : Point = Point { x: 0.0, y: 0.0 }

After:

#[repr(C)]
type Point = { x: Float, y: Float }

Code example

#[repr(C)]
make_point() : Point = Point { x: 0.0, y: 0.0 }