diff options
| author | Sean Patrick Santos <SeanPatrickSantos@gmail.com> | 2015-03-25 10:53:28 -0600 |
|---|---|---|
| committer | Sean Patrick Santos <SeanPatrickSantos@gmail.com> | 2015-04-23 21:02:29 -0600 |
| commit | 29eb550ee6a9fd6961bb00e2680a5735aab95de1 (patch) | |
| tree | 05443f6ba31ac17d54592e96317bca1166230dea /src/test/parse-fail | |
| parent | 91ae5e31ab57de15ef2855c700ad4b012ea00234 (diff) | |
| download | rust-29eb550ee6a9fd6961bb00e2680a5735aab95de1.tar.gz rust-29eb550ee6a9fd6961bb00e2680a5735aab95de1.zip | |
Get associated consts working in match patterns.
Diffstat (limited to 'src/test/parse-fail')
| -rw-r--r-- | src/test/parse-fail/brace-after-qualified-path-in-match.rs | 17 | ||||
| -rw-r--r-- | src/test/parse-fail/paren-after-qualified-path-in-match.rs | 17 |
2 files changed, 34 insertions, 0 deletions
diff --git a/src/test/parse-fail/brace-after-qualified-path-in-match.rs b/src/test/parse-fail/brace-after-qualified-path-in-match.rs new file mode 100644 index 00000000000..66f462df05a --- /dev/null +++ b/src/test/parse-fail/brace-after-qualified-path-in-match.rs @@ -0,0 +1,17 @@ +// Copyright 2015 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() { + match x { + <T as Trait>::Type{key: value} => (), + //~^ ERROR unexpected `{` after qualified path + _ => (), + } +} diff --git a/src/test/parse-fail/paren-after-qualified-path-in-match.rs b/src/test/parse-fail/paren-after-qualified-path-in-match.rs new file mode 100644 index 00000000000..d06fd2bb4e7 --- /dev/null +++ b/src/test/parse-fail/paren-after-qualified-path-in-match.rs @@ -0,0 +1,17 @@ +// Copyright 2015 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() { + match x { + <T as Trait>::Type(2) => (), + //~^ ERROR unexpected `(` after qualified path + _ => (), + } +} |
