E4093#
The type is not a record type.
This error occurs when you try to construct a type that is not a struct
using
the T::{ .. }
syntax.
错误示例#
enum Point {
D2(Double, Double)
D3(Double, Double, Double)
}
fn main {
let a = Point::{ x : 1.0, y : 2.0 }
// ^~~~~
// Error: The type Point is not a record type
}
建议#
You should use the correct syntax to construct the type.
fn main {
let a = Point::D2(1.0, 2.0)
}