about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2019-01-11 19:31:45 -0800
committerEsteban Küber <esteban@kuber.com.ar>2019-01-11 19:31:45 -0800
commit5c67ba615c299d47aef592f62f1c7540e824e87f (patch)
treee57849a58dc8d74bee6aa2fc82b23a6a40a6ad22 /src/test
parentc2d381d39d282c0586d50ea7d7a431ffd5ddb3fb (diff)
Continue parser after trailing type argument attribute
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/attrs-with-no-formal-in-generics/attrs-with-no-formal-in-generics-1.stderr2
-rw-r--r--src/test/ui/attrs-with-no-formal-in-generics/attrs-with-no-formal-in-generics-2.stderr2
-rw-r--r--src/test/ui/attrs-with-no-formal-in-generics/attrs-with-no-formal-in-generics-3.rs3
-rw-r--r--src/test/ui/attrs-with-no-formal-in-generics/attrs-with-no-formal-in-generics-3.stderr13
4 files changed, 14 insertions, 6 deletions
diff --git a/src/test/ui/attrs-with-no-formal-in-generics/attrs-with-no-formal-in-generics-1.stderr b/src/test/ui/attrs-with-no-formal-in-generics/attrs-with-no-formal-in-generics-1.stderr
index 75c0d91ee17..c4c0cee5ccc 100644
--- a/src/test/ui/attrs-with-no-formal-in-generics/attrs-with-no-formal-in-generics-1.stderr
+++ b/src/test/ui/attrs-with-no-formal-in-generics/attrs-with-no-formal-in-generics-1.stderr
@@ -2,7 +2,7 @@ error: trailing attribute after lifetime parameters
   --> $DIR/attrs-with-no-formal-in-generics-1.rs:9:25
    |
 LL | impl<#[rustc_1] 'a, 'b, #[oops]> RefIntPair<'a, 'b> {
-   |                         ^^^^^^^
+   |                         ^^^^^^^ attributes must go before parameters
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/attrs-with-no-formal-in-generics/attrs-with-no-formal-in-generics-2.stderr b/src/test/ui/attrs-with-no-formal-in-generics/attrs-with-no-formal-in-generics-2.stderr
index 7585c6dd738..9099d74ce1b 100644
--- a/src/test/ui/attrs-with-no-formal-in-generics/attrs-with-no-formal-in-generics-2.stderr
+++ b/src/test/ui/attrs-with-no-formal-in-generics/attrs-with-no-formal-in-generics-2.stderr
@@ -2,7 +2,7 @@ error: trailing attribute after type parameters
   --> $DIR/attrs-with-no-formal-in-generics-2.rs:9:35
    |
 LL | impl<#[rustc_1] 'a, #[rustc_2] T, #[oops]> RefAny<'a, T> {}
-   |                                   ^^^^^^^
+   |                                   ^^^^^^^ attributes must go before parameters
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/attrs-with-no-formal-in-generics/attrs-with-no-formal-in-generics-3.rs b/src/test/ui/attrs-with-no-formal-in-generics/attrs-with-no-formal-in-generics-3.rs
index 343a2d7a563..84e242f322c 100644
--- a/src/test/ui/attrs-with-no-formal-in-generics/attrs-with-no-formal-in-generics-3.rs
+++ b/src/test/ui/attrs-with-no-formal-in-generics/attrs-with-no-formal-in-generics-3.rs
@@ -7,10 +7,9 @@ struct RefIntPair<'a, 'b>(&'a u32, &'b u32);
 fn hof_lt<Q>(_: Q)
     where Q: for <#[rustc_1] 'a, 'b, #[oops]> Fn(RefIntPair<'a,'b>) -> &'b u32
     //~^ ERROR trailing attribute after lifetime parameters
+    //~| ERROR unless otherwise specified, attributes with the prefix `rustc_` are reserved for
 {
-
 }
 
 fn main() {
-
 }
diff --git a/src/test/ui/attrs-with-no-formal-in-generics/attrs-with-no-formal-in-generics-3.stderr b/src/test/ui/attrs-with-no-formal-in-generics/attrs-with-no-formal-in-generics-3.stderr
index 91960510de4..a918a5a8d99 100644
--- a/src/test/ui/attrs-with-no-formal-in-generics/attrs-with-no-formal-in-generics-3.stderr
+++ b/src/test/ui/attrs-with-no-formal-in-generics/attrs-with-no-formal-in-generics-3.stderr
@@ -2,7 +2,16 @@ error: trailing attribute after lifetime parameters
   --> $DIR/attrs-with-no-formal-in-generics-3.rs:8:38
    |
 LL |     where Q: for <#[rustc_1] 'a, 'b, #[oops]> Fn(RefIntPair<'a,'b>) -> &'b u32
-   |                                      ^^^^^^^
+   |                                      ^^^^^^^ attributes must go before parameters
 
-error: aborting due to previous error
+error[E0658]: unless otherwise specified, attributes with the prefix `rustc_` are reserved for internal compiler diagnostics (see issue #29642)
+  --> $DIR/attrs-with-no-formal-in-generics-3.rs:8:19
+   |
+LL |     where Q: for <#[rustc_1] 'a, 'b, #[oops]> Fn(RefIntPair<'a,'b>) -> &'b u32
+   |                   ^^^^^^^^^^
+   |
+   = help: add #![feature(rustc_attrs)] to the crate attributes to enable
+
+error: aborting due to 2 previous errors
 
+For more information about this error, try `rustc --explain E0658`.