diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-03-08 18:21:01 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-03-11 19:19:20 -0700 |
| commit | 7b4ee5cce70b9976c96e1bee06493ad44037b000 (patch) | |
| tree | 27c8c2f3e28df976d46cd08cb9655696911e9845 /src/libsyntax/parse/parser.rs | |
| parent | 001705610505065ff50502390af933e0b264853a (diff) | |
| download | rust-7b4ee5cce70b9976c96e1bee06493ad44037b000.tar.gz rust-7b4ee5cce70b9976c96e1bee06493ad44037b000.zip | |
syntax: Add support for trait bounds on procs
This is needed to make progress on #10296 as the default bounds will no longer include Send. I believe that this was the originally intended syntax for procs, and it just hasn't been necessary up until now.
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 6fbf5f071ad..c8bd87024e8 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -893,13 +893,14 @@ impl Parser { // Parses a procedure type (`proc`). The initial `proc` keyword must // already have been parsed. pub fn parse_proc_type(&mut self) -> Ty_ { + let bounds = self.parse_optional_ty_param_bounds(); let (decl, lifetimes) = self.parse_ty_fn_decl(false); TyClosure(@ClosureTy { sigil: OwnedSigil, region: None, purity: ImpureFn, onceness: Once, - bounds: None, + bounds: bounds, decl: decl, lifetimes: lifetimes, }) |
