Skip to content

Obsolete the closure kind syntax #21843

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 5, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
register snapshots
  • Loading branch information
Jorge Aparicio committed Feb 5, 2015
commit 92f11e938a80a719badcd2168a2e38a2a800fcb6
8 changes: 3 additions & 5 deletions src/libsyntax/parse/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1139,7 +1139,7 @@ impl<'a> Parser<'a> {

/// Parses an obsolete closure kind (`&:`, `&mut:`, or `:`).
pub fn parse_obsolete_closure_kind(&mut self) {
// let lo = self.span.lo;
let lo = self.span.lo;
if
self.check(&token::BinOp(token::And)) &&
self.look_ahead(1, |t| t.is_keyword(keywords::Mut)) &&
Expand All @@ -1163,10 +1163,8 @@ impl<'a> Parser<'a> {
return;
}

// SNAP 474b324
// Enable these obsolete errors after snapshot:
// let span = mk_sp(lo, self.span.hi);
// self.obsolete(span, ObsoleteSyntax::ClosureKind);
let span = mk_sp(lo, self.span.hi);
self.obsolete(span, ObsoleteSyntax::ClosureKind);
}

pub fn parse_ty_bare_fn_or_ty_closure(&mut self, lifetime_defs: Vec<LifetimeDef>) -> Ty_ {
Expand Down
9 changes: 9 additions & 0 deletions src/snapshots.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
S 2015-02-04 ac134f7
freebsd-x86_64 483e37a02a7ebc12a872e3146145e342ba4a5c04
linux-i386 8af64e5df839cc945399484380a8b2ebe05a6751
linux-x86_64 9f485d79c1f0d273ed864eddadb1707f3e2df489
macos-i386 800f86abd589a1d46c37a8700211c7ba6b05decb
macos-x86_64 b9961faccf79dcfdc0b7a6909bef8b6769798d08
winnt-i386 2c56a7573f8d0f78271dab1c8e29d3ced7a44ed8
winnt-x86_64 f1736f47de2a6fad1ff881e51c176f71db5dc2a5

S 2015-01-31 474b324
freebsd-x86_64 c5b55eb488790ff8425d74afa3b37c49517bc55f
linux-i386 319f2f3573c058cb2c4dfc75faaf8ea3ae86ef11
Expand Down