-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-syntaxextArea: Syntax extensionsArea: Syntax extensions
Description
#[deriving(Trait)] normally relies on the constituent types of the struct or enum also implement Trait, and currently, if they don't, the error messages are unclear. e.g. in the following code, the problem is [f64, .. 3] doesn't implement Clone.
#[deriving(Clone)]
struct V {
v : [f64, ..3]
}
fn main() {}tmp.rs:1:11: 1:16 error: mismatched types: expected `[f64, .. 3]` but found `&[f64, .. 3]` (expected vector but found &-ptr)
tmp.rs:1 #[deriving(Clone)]
(This particular error message is because there is a Clone impl for &T, and that one is used if there is no Clone impl for T.)
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-syntaxextArea: Syntax extensionsArea: Syntax extensions