about summary refs log tree commit diff
path: root/src/test/ui/issues
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2022-02-17 19:18:42 -0800
committerMichael Goulet <michael@errs.io>2022-02-17 19:18:42 -0800
commit207fb5f070174368ebb56a17b6f4e5a161cabe51 (patch)
tree56ccd3588578c71e303a20b34ebd152122767533 /src/test/ui/issues
parentf04f732503a239b3fac22be2238d21971aa03dce (diff)
downloadrust-207fb5f070174368ebb56a17b6f4e5a161cabe51.tar.gz
rust-207fb5f070174368ebb56a17b6f4e5a161cabe51.zip
fix impl trait message, bless tests
Diffstat (limited to 'src/test/ui/issues')
-rw-r--r--src/test/ui/issues/issue-47715.rs8
-rw-r--r--src/test/ui/issues/issue-47715.stderr16
2 files changed, 8 insertions, 16 deletions
diff --git a/src/test/ui/issues/issue-47715.rs b/src/test/ui/issues/issue-47715.rs
index 478ac6a2e89..b8088c18dad 100644
--- a/src/test/ui/issues/issue-47715.rs
+++ b/src/test/ui/issues/issue-47715.rs
@@ -7,22 +7,22 @@ trait Iterable {
 }
 
 struct Container<T: Iterable<Item = impl Foo>> {
-    //~^ ERROR `impl Trait` not allowed
+    //~^ ERROR `impl Trait` only allowed in function and inherent method return types
     field: T
 }
 
 enum Enum<T: Iterable<Item = impl Foo>> {
-    //~^ ERROR `impl Trait` not allowed
+    //~^ ERROR `impl Trait` only allowed in function and inherent method return types
     A(T),
 }
 
 union Union<T: Iterable<Item = impl Foo> + Copy> {
-    //~^ ERROR `impl Trait` not allowed
+    //~^ ERROR `impl Trait` only allowed in function and inherent method return types
     x: T,
 }
 
 type Type<T: Iterable<Item = impl Foo>> = T;
-//~^ ERROR `impl Trait` not allowed
+//~^ ERROR `impl Trait` only allowed in function and inherent method return types
 
 fn main() {
 }
diff --git a/src/test/ui/issues/issue-47715.stderr b/src/test/ui/issues/issue-47715.stderr
index 5cccc7f3432..0ee9388bf2b 100644
--- a/src/test/ui/issues/issue-47715.stderr
+++ b/src/test/ui/issues/issue-47715.stderr
@@ -1,34 +1,26 @@
-error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
+error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in generic
   --> $DIR/issue-47715.rs:9:37
    |
 LL | struct Container<T: Iterable<Item = impl Foo>> {
    |                                     ^^^^^^^^
-   |
-   = note: found `impl Trait` in generic
 
-error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
+error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in generic
   --> $DIR/issue-47715.rs:14:30
    |
 LL | enum Enum<T: Iterable<Item = impl Foo>> {
    |                              ^^^^^^^^
-   |
-   = note: found `impl Trait` in generic
 
-error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
+error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in generic
   --> $DIR/issue-47715.rs:19:32
    |
 LL | union Union<T: Iterable<Item = impl Foo> + Copy> {
    |                                ^^^^^^^^
-   |
-   = note: found `impl Trait` in generic
 
-error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
+error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in generic
   --> $DIR/issue-47715.rs:24:30
    |
 LL | type Type<T: Iterable<Item = impl Foo>> = T;
    |                              ^^^^^^^^
-   |
-   = note: found `impl Trait` in generic
 
 error: aborting due to 4 previous errors