Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign up#[derive] for custom traits is being depreciated #421
Comments
This comment has been minimized.
This comment has been minimized.
|
Glad to hear it! This does compile for me though: https://is.gd/R1rnwF Could you maybe share what you're seeing exactly? |
This comment has been minimized.
This comment has been minimized.
|
@steveklabnik I have to apologise. I thought I'd written it out correctly from the book, but coming back to it I see I forgot to capitalise the |
This comment has been minimized.
This comment has been minimized.
Yup! It's built into the compiler. The lower case @carols10cents do you think it's worth adding some kind of warning here? I could go either way. |
This comment has been minimized.
This comment has been minimized.
|
That explains it then, thanks! |
This comment has been minimized.
This comment has been minimized.
|
Yeah, I think the warning should be from the compiler, not in the book. I'm not sure why you got rid of that part of your comment @elliotekj, but I saw it in my email and think it's good! Mistyping anything anywhere from the book could result in unexpected errors, so I don't know if it's worth it to try and anticipate any typos :) |
This comment has been minimized.
This comment has been minimized.
|
@carols10cents I removed it because, after posting, I realized that @steveklabnik was talking about a warning in the book, not in the compiler. I didn't want the issue to get muddled :) If this is an appropriate place to recommend a warning going into the compiler then I stand by the suggestion though. |
This comment has been minimized.
This comment has been minimized.
|
@elliotekj it should go in https://github.com/rust-lang/rust/issues, really. Would you mind creating an issue over there, with something along the lines of what you originally had in that one comment of yours plus the context in which you encountered this? Here's your comment in case it's not in your email:
I'm going to close this issue though :) |
carols10cents
closed this
Jan 25, 2017
elliotekj
referenced this issue
Jan 26, 2017
Closed
Add suggestions for potentially misspelled #[derive] traits #39323
This comment has been minimized.
This comment has been minimized.
|
@carols10cents No problem at all. Thanks for the help :) |

elliotekj commentedJan 24, 2017
•
edited
Firstly, to everyone who has contributed to this book, thank you. I'm thoroughly enjoying it so far.
As per an error when compiling with Rust
1.14.0 (e8a012324 2016-12-16),#[derive]for custom traits is not considered stable enough for use and is being removed in v1.15. It's actual removal still seems a little in flux an Rust nightly is in v1.16 and has yet to see it's removal. As things stand at the moment though, listing 5-6 in the structs chapter will fail to compile.