From 51a478c90b31c1b2248a1d24fa933c570048593c Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 1 Sep 2017 22:29:49 -0700 Subject: rustc: Separately feature gate repr(i128) Brought up during the discussion of #35118, the support for this is still somewhat buggy and so stabilization likely wants to be considered independently of the type itself. --- src/libsyntax/feature_gate.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/libsyntax') diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 8251b03632a..83827a25d61 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -312,6 +312,9 @@ declare_features! ( // The `i128` type (active, i128_type, "1.16.0", Some(35118)), + // The `repr(i128)` annotation for enums + (active, repr128, "1.16.0", Some(35118)), + // The `unadjusted` ABI. Perma unstable. (active, abi_unadjusted, "1.16.0", None), -- cgit 1.4.1-3-g733a5 From 258ec30116b1a80f4a9fb4b14aa22dd88eb8bf31 Mon Sep 17 00:00:00 2001 From: Wonwoo Choi Date: Tue, 5 Sep 2017 18:25:42 +0900 Subject: Expect pipe symbol after closure parameter lists --- src/libsyntax/parse/parser.rs | 2 +- src/test/compile-fail/issue-44021.rs | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 src/test/compile-fail/issue-44021.rs (limited to 'src/libsyntax') diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 1f033b25fe4..a52d0488307 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -4699,7 +4699,7 @@ impl<'a> Parser<'a> { SeqSep::trailing_allowed(token::Comma), |p| p.parse_fn_block_arg() ); - self.bump(); + self.expect(&token::BinOp(token::Or))?; args } }; diff --git a/src/test/compile-fail/issue-44021.rs b/src/test/compile-fail/issue-44021.rs new file mode 100644 index 00000000000..b6ec21b94c7 --- /dev/null +++ b/src/test/compile-fail/issue-44021.rs @@ -0,0 +1,16 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +struct MyStruct; +impl MyStruct { + fn f() {|x, y} //~ ERROR expected one of `:`, `@`, or `|`, found `}` +} + +fn main() {} -- cgit 1.4.1-3-g733a5