rust/src/librustc_error_codes
Mazdak Farrokhzad ec82174fad
Rollup merge of #67131 - Centril:item-merge, r=petrochenkov
Merge `TraitItem` & `ImplItem into `AssocItem`

In this PR we:

- Merge `{Trait,Impl}Item{Kind?}` into `AssocItem{Kind?}` as discussed in https://github.com/rust-lang/rust/issues/65041#issuecomment-538105286.

   - This is done by using the cover grammar of both forms.

   - In particular, it requires that we syntactically allow (under `#[cfg(FALSE)]`):

      - `default`ness on `trait` items,

      - `impl` items without a body / definition (`const`, `type`, and `fn`),

      - and associated `type`s in `impl`s with bounds, e.g., `type Foo: Ord;`.

   - The syntactic restrictions are replaced by semantic ones in `ast_validation`.

- Move syntactic restrictions around C-variadic parameters from the parser into `ast_validation`:

    - `fn`s in all contexts now syntactically allow `...`,

    - `...` can occur anywhere in the list syntactically (`fn foo(..., x: usize) {}`),

    - and `...` can be the sole parameter (`fn foo(...) {}`.

r? @petrochenkov
2019-12-20 17:22:19 +01:00
..
error_codes Rollup merge of #67131 - Centril:item-merge, r=petrochenkov 2019-12-20 17:22:19 +01:00
Cargo.toml Create new librustc_error_codes lib and move error codes declaration inside it 2019-11-14 13:05:42 +01:00
error_codes.rs Rollup merge of #66606 - christianpoveda:mut-refs-in-const-fn, r=oli-obk 2019-12-06 23:26:54 +01:00
lib.rs move DIAGNOSTICS usage to rustc_driver 2019-11-16 02:32:33 +01:00