-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Better error messages for type-errors due to #[deriving]. #7621
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
I disagree that this is a dup of those two; #7622 is only tangentially related to The specific problem here is every field gets pattern matched with This would be resolved if there was a way to specify exactly which instance was desired (so it'd be an proper error message if that instance didn't exist). |
See #11818 |
cc #7621. See the commit message. I'm not sure if we should merge this now, or wait until we can write `Clone::clone(x)` which will directly solve the above issue with perfect error messages.
Looks like it: #[derive(Clone)]
struct V {
v : [f64; 100]
}
fn main() {}
Although it was almost certainly #18578 that got them to be that clear. |
Allow giving reasons for `disallowed_methods` Fixes rust-lang#7609. This permits writing the config for `disallowed-methods` as either a list of strings (like before) or a list of tables, where each table gives the path to the disallowed method and an optional reason for why the method is disallowed. changelog: Allow giving reasons for [`disallowed_methods`]
#[deriving(Trait)]
normally relies on the constituent types of thestruct
orenum
also implementTrait
, and currently, if they don't, the error messages are unclear. e.g. in the following code, the problem is[f64, .. 3]
doesn't implementClone
.(This particular error message is because there is a
Clone
impl for&T
, and that one is used if there is noClone
impl forT
.)The text was updated successfully, but these errors were encountered: