diff options
| author | bors <bors@rust-lang.org> | 2018-06-10 08:26:10 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-06-10 08:26:10 +0000 |
| commit | 684b8d3d7b5eb42c00cba7e14342c5cb3b6f292b (patch) | |
| tree | 8ab749dd8c21cd2046b0deeba19ad8044fabf728 /src/test | |
| parent | b4d836c98bf9fec7ab3bddd559bab1240240a9d7 (diff) | |
| parent | 679a5219e7e8f7e7c9c1709c75184569be254be3 (diff) | |
| download | rust-684b8d3d7b5eb42c00cba7e14342c5cb3b6f292b.tar.gz rust-684b8d3d7b5eb42c00cba7e14342c5cb3b6f292b.zip | |
Auto merge of #51196 - Havvy:remove-keywords, r=petrochenkov
Implement RFC 2421, 'Keyword unreservations (pure, sizeof, alignof, offsetof) On my local machine I was getting failures in `test/ui-fulldeps`, but I was also getting them again after reverting the change, so I'm hoping that this works. I removed the test because that's what the other PR that unreserved a keyword did and I feel that it doesn't make sense/keep value to keep a test for something removed years ago.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-pass/rfc-2421-unreserve-pure-offsetof-sizeof-alignof.rs (renamed from src/test/parse-fail/removed-syntax-fn-pure.rs) | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/test/parse-fail/removed-syntax-fn-pure.rs b/src/test/run-pass/rfc-2421-unreserve-pure-offsetof-sizeof-alignof.rs index 83794a70a4f..7d8050a07a3 100644 --- a/src/test/parse-fail/removed-syntax-fn-pure.rs +++ b/src/test/run-pass/rfc-2421-unreserve-pure-offsetof-sizeof-alignof.rs @@ -1,4 +1,4 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT +// 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. // @@ -8,6 +8,15 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// compile-flags: -Z parse-only +// Test that removed keywords are allowed as identifiers. +fn main () { + let offsetof = (); + let alignof = (); + let sizeof = (); + let pure = (); +} -pure fn f() {} //~ ERROR expected item, found `pure` +fn offsetof() {} +fn alignof() {} +fn sizeof() {} +fn pure() {} |
