]> git.lizzy.rs Git - rust.git/commit
auto merge of #18743 : nikomatsakis/rust/hrtb-refactor-2, r=pcwalton
authorbors <bors@rust-lang.org>
Sun, 9 Nov 2014 03:51:41 +0000 (03:51 +0000)
committerbors <bors@rust-lang.org>
Sun, 9 Nov 2014 03:51:41 +0000 (03:51 +0000)
commita2f303ad098844351d08800038a4f99fa2ff0817
tree8ab2d0ef6dc8abb598082f43f8496911bdc4c470
parent93c85eb8bdcc910a27caf6abd20207a626ae98e5
parentcf4e53eee7377b42524176f39b0b428175c74fb1
auto merge of #18743 : nikomatsakis/rust/hrtb-refactor-2, r=pcwalton

Various miscellaneous changes pushing towards HRTB support:

1. Update parser and adjust ast to support `for<'a,'b>` syntax, both in closures and trait bounds. Warn on the old syntax (not error, for stage0).
2. Refactor TyTrait representation to include a TraitRef.
3. Purge `once_fns` feature gate and `once` keyword.

r? @pcwalton

This is a [breaking-change]:

- The `once_fns` feature is now officially deprecated. Rewrite using normal closures or unboxed closures.
- The new `for`-based syntax now issues warnings (but not yet errors):
  - `fn<'a>(T) -> U` becomes `for<'a> fn(T) -> U`
  - `<'a> |T| -> U` becomes `for<'a> |T| -> U`
src/librustc/middle/ty_fold.rs
src/libsyntax/fold.rs