Skip to content

Tell the compiler to tell us that deriving is dead. #21605

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 26, 2015

Conversation

huonw
Copy link
Member

@huonw huonw commented Jan 24, 2015

I'm beginning to suspect it's impossible to avoid accidentally writing
#[deriving] at least once in every program, and it results in
non-intuitive error messages: "Foo doesn't have any method in scope
clone" despite there being a #[deriv...(Clone)] attribute!

Also, lots of documentation around the internet uses #[deriving] so
providing this guidance is very helpful (lots of people ask in #rust
about this error).

@rust-highfive
Copy link
Contributor

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@huonw huonw force-pushed the omg-muscle-memory branch from fb26361 to 935082a Compare January 24, 2015 23:34
span: Span,
mitem: &MetaItem,
item: &Item,
mut push: Box<FnMut(P<Item>)>) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These will trigger unused argument warnings.

I'm beginning to suspect it's impossible to avoid accidentally writing
`#[deriving]` at least once in every program, and it results in
non-intuitive error messages: "Foo doesn't have any method in scope
`clone`" despite there being a `#[deriv...(Clone)]` attribute!

Also, lots of documentation around the internet uses `#[deriving]` so
providing this guidance is very helpful (lots of people ask in #rust
about this error).

Fixes rust-lang#21166.
@huonw huonw force-pushed the omg-muscle-memory branch from 935082a to ae4e1a1 Compare January 24, 2015 23:45
@eddyb
Copy link
Member

eddyb commented Jan 24, 2015

@bors r+ ae4e1a1

@bors
Copy link
Collaborator

bors commented Jan 26, 2015

⌛ Testing commit ae4e1a1 with merge c4db18b...

bors added a commit that referenced this pull request Jan 26, 2015
I'm beginning to suspect it's impossible to avoid accidentally writing
`#[deriving]` at least once in every program, and it results in
non-intuitive error messages: "Foo doesn't have any method in scope
`clone`" despite there being a `#[deriv...(Clone)]` attribute!

Also, lots of documentation around the internet uses `#[deriving]` so
providing this guidance is very helpful (lots of people ask in #rust
about this error).
@bors
Copy link
Collaborator

bors commented Jan 26, 2015

@bors
Copy link
Collaborator

bors commented Jan 26, 2015

👀 Test was successful, but fast-forwarding failed

@huonw
Copy link
Member Author

huonw commented Jan 26, 2015

@bors: retry

@bors
Copy link
Collaborator

bors commented Jan 26, 2015

⌛ Testing commit ae4e1a1 with merge 7615e18...

bors added a commit that referenced this pull request Jan 26, 2015
I'm beginning to suspect it's impossible to avoid accidentally writing
`#[deriving]` at least once in every program, and it results in
non-intuitive error messages: "Foo doesn't have any method in scope
`clone`" despite there being a `#[deriv...(Clone)]` attribute!

Also, lots of documentation around the internet uses `#[deriving]` so
providing this guidance is very helpful (lots of people ask in #rust
about this error).
@bors
Copy link
Collaborator

bors commented Jan 26, 2015

@bors bors merged commit ae4e1a1 into rust-lang:master Jan 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants