diff options
| author | bors <bors@rust-lang.org> | 2017-11-03 19:07:45 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-11-03 19:07:45 +0000 |
| commit | 2278506f682062c7988c9e534a94366c56693981 (patch) | |
| tree | 8c86635bbe81ad87b766c5de883e3cca11b2e30d /src/test/incremental/thinlto | |
| parent | 59d484575a714291481563d13ad058b9a3d31fa8 (diff) | |
| parent | 5190abb941773ec54632c19c73d1f456831323b3 (diff) | |
| download | rust-2278506f682062c7988c9e534a94366c56693981.tar.gz rust-2278506f682062c7988c9e534a94366c56693981.zip | |
Auto merge of #45247 - leodasvacas:implement-auto-trait-syntax, r=nikomatsakis
[Syntax] Implement auto trait syntax
Implements `auto trait Send {}` as a substitute for `trait Send {} impl Send for .. {}`.
See the [internals thread](https://internals.rust-lang.org/t/pre-rfc-renaming-oibits-and-changing-their-declaration-syntax/3086) for motivation. Part of #13231.
The first commit is just a rename moving from "default trait" to "auto trait". The rest is parser->AST->HIR work and making it the same as the current syntax for everything below HIR. It's under the `optin_builtin_traits` feature gate.
When can we remove the old syntax? Do we need to wait for a new `stage0`? We also need to formally decide for the new form (even if the keyword is not settled yet).
Observations:
- If you `auto trait Auto {}` and then `impl Auto for .. {}` that's accepted even if it's redundant.
- The new syntax is simpler internally which will allow for a net removal of code, for example well-formedness checks are effectively moved to the parser.
- Rustfmt and clippy are broken, need to fix those.
- Rustdoc just ignores it for now.
ping @petrochenkov @nikomatsakis
Diffstat (limited to 'src/test/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions
