-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Use #[derive(Default)]
instead of manual impl
when possible
#134363
Conversation
r? @SparrowLii rustbot has assigned @SparrowLii. Use |
Some changes occurred in src/tools/rustfmt cc @rust-lang/rustfmt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to open a PR in https://github.com/rust-lang/rustfmt for these changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think they are nice clean ups!
☔ The latest upstream changes (presumably #134243) made this pull request unmergeable. Please resolve the merge conflicts. |
636926b
to
a64347c
Compare
This comment has been minimized.
This comment has been minimized.
a64347c
to
4ec0913
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The commits should be cleaned.
Please r=me after that
4ec0913
to
1f82b45
Compare
@bors r+ rollup |
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#134363 (Use `#[derive(Default)]` instead of manual `impl` when possible) - rust-lang#134517 (Add tests for coverage attribute on trait functions) - rust-lang#134528 (opt-dist: propagate channel info to bootstrap) - rust-lang#134669 (Document the `--dev` flag for `src/ci/docker/run.sh`) - rust-lang#134680 (Clean up a few rmake tests ) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#134363 (Use `#[derive(Default)]` instead of manual `impl` when possible) - rust-lang#134517 (Add tests for coverage attribute on trait functions) - rust-lang#134528 (opt-dist: propagate channel info to bootstrap) - rust-lang#134669 (Document the `--dev` flag for `src/ci/docker/run.sh`) - rust-lang#134680 (Clean up a few rmake tests ) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#134363 - estebank:derive-default, r=SparrowLii Use `#[derive(Default)]` instead of manual `impl` when possible While working on rust-lang#134175 I noticed a few manual `Default` `impl`s that could be `derive`d instead. These likely predate the existence of the `#[default]` attribute for `enum`s.
While working on #134175 I noticed a few manual
Default
impl
s that could bederive
d instead. These likely predate the existence of the#[default]
attribute forenum
s.