about summary refs log tree commit diff
path: root/src/test/parse-fail
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-04-17 22:22:56 +0000
committerbors <bors@rust-lang.org>2017-04-17 22:22:56 +0000
commit235fe8313fd0ffec665f1400da781ab2cb1e13f9 (patch)
treecadfe51f01ac72de4f2641f63b0fb84213df7a0d /src/test/parse-fail
parent5516bcc4588ea6192298b4e3682eb1d09581912a (diff)
parentd648c10e5bc313af758951c1e6f8ae4782712627 (diff)
downloadrust-235fe8313fd0ffec665f1400da781ab2cb1e13f9.tar.gz
rust-235fe8313fd0ffec665f1400da781ab2cb1e13f9.zip
Auto merge of #41282 - arielb1:missing-impl-item, r=petrochenkov
libsyntax/parse: fix missing kind error reporting

Fixes #41161.
Fixes #41239.
Diffstat (limited to 'src/test/parse-fail')
-rw-r--r--src/test/parse-fail/issue-21153.rs5
-rw-r--r--src/test/parse-fail/trait-pub-assoc-const.rs2
-rw-r--r--src/test/parse-fail/trait-pub-assoc-ty.rs2
-rw-r--r--src/test/parse-fail/trait-pub-method.rs2
4 files changed, 5 insertions, 6 deletions
diff --git a/src/test/parse-fail/issue-21153.rs b/src/test/parse-fail/issue-21153.rs
index c03e0ef7321..b6d95ffb911 100644
--- a/src/test/parse-fail/issue-21153.rs
+++ b/src/test/parse-fail/issue-21153.rs
@@ -10,7 +10,6 @@
 
 // compile-flags: -Z parse-only
 
-trait MyTrait<T>: Iterator {
-    Item = T; //~ ERROR expected one of `!` or `::`, found `=`
-              //~| ERROR expected item, found `=`
+trait MyTrait<T>: Iterator { //~ ERROR missing `fn`, `type`, or `const`
+    Item = T;
 }
diff --git a/src/test/parse-fail/trait-pub-assoc-const.rs b/src/test/parse-fail/trait-pub-assoc-const.rs
index adce0d7bbf4..6bc24e2081d 100644
--- a/src/test/parse-fail/trait-pub-assoc-const.rs
+++ b/src/test/parse-fail/trait-pub-assoc-const.rs
@@ -10,7 +10,7 @@
 
 trait Foo {
     pub const Foo: u32;
-     //~^ ERROR expected one of `const`, `extern`, `fn`, `type`, or `unsafe`, found `pub`
+    //~^ ERROR expected one of `const`, `extern`, `fn`, `type`, `unsafe`, or `}`, found `pub`
 }
 
 fn main() {}
diff --git a/src/test/parse-fail/trait-pub-assoc-ty.rs b/src/test/parse-fail/trait-pub-assoc-ty.rs
index dab6c433aba..493ff087eaf 100644
--- a/src/test/parse-fail/trait-pub-assoc-ty.rs
+++ b/src/test/parse-fail/trait-pub-assoc-ty.rs
@@ -10,7 +10,7 @@
 
 trait Foo {
     pub type Foo;
-    //~^ ERROR expected one of `const`, `extern`, `fn`, `type`, or `unsafe`, found `pub`
+    //~^ ERROR expected one of `const`, `extern`, `fn`, `type`, `unsafe`, or `}`, found `pub`
 }
 
 fn main() {}
diff --git a/src/test/parse-fail/trait-pub-method.rs b/src/test/parse-fail/trait-pub-method.rs
index 7cb9363830c..c2ee3c31d88 100644
--- a/src/test/parse-fail/trait-pub-method.rs
+++ b/src/test/parse-fail/trait-pub-method.rs
@@ -10,7 +10,7 @@
 
 trait Foo {
     pub fn foo();
-    //~^ ERROR expected one of `const`, `extern`, `fn`, `type`, or `unsafe`, found `pub`
+    //~^ ERROR expected one of `const`, `extern`, `fn`, `type`, `unsafe`, or `}`, found `pub`
 }
 
 fn main() {}