diff options
| author | Corey Farwell <coreyf@rwell.org> | 2017-02-09 19:43:21 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-02-09 19:43:21 -0500 |
| commit | ed7f3c46355de38e335b0937256f173fcb6bf090 (patch) | |
| tree | dae2c1dcf2bec7f833e0ca6e744b09d30fe94052 /src/test/compile-fail | |
| parent | 41653fd26a0124f74665e0c87221afd4e7333c24 (diff) | |
| parent | 66bd8eede5e79423a7046fa936ab8557c4e323f1 (diff) | |
Rollup merge of #39674 - jseyfried:fix_token_tree_parsing_ICE, r=nrc
parser: fix ICE when parsing token trees after an error Fixes #39388, fixes #39616. r? @nrc
Diffstat (limited to 'src/test/compile-fail')
| -rw-r--r-- | src/test/compile-fail/issue-39388.rs | 17 | ||||
| -rw-r--r-- | src/test/compile-fail/issue-39616.rs | 15 |
2 files changed, 32 insertions, 0 deletions
diff --git a/src/test/compile-fail/issue-39388.rs b/src/test/compile-fail/issue-39388.rs new file mode 100644 index 00000000000..6994d2199d2 --- /dev/null +++ b/src/test/compile-fail/issue-39388.rs @@ -0,0 +1,17 @@ +// Copyright 2017 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 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +macro_rules! assign { + (($($a:tt)*) = ($($b:tt))*) => { //~ ERROR expected `*` or `+` + $($a)* = $($b)* + } +} + +fn main() {} diff --git a/src/test/compile-fail/issue-39616.rs b/src/test/compile-fail/issue-39616.rs new file mode 100644 index 00000000000..d601249c036 --- /dev/null +++ b/src/test/compile-fail/issue-39616.rs @@ -0,0 +1,15 @@ +// Copyright 2017 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 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +fn foo(a: [0; 1]) {} //~ ERROR expected type, found `0` +//~| ERROR expected one of `->`, `where`, or `{`, found `]` +// FIXME(jseyfried): avoid emitting the second error (preexisting) + +fn main() {} |
