]> git.lizzy.rs Git - rust.git/commitdiff
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)
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`

1  2 
src/librustc/middle/ty_fold.rs
src/libsyntax/fold.rs

Simple merge
Simple merge