about summary refs log tree commit diff
path: root/src/test/ui/issues
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2022-01-11 19:00:34 -0800
committerMichael Goulet <michael@errs.io>2022-02-17 18:45:53 -0800
commitf04f732503a239b3fac22be2238d21971aa03dce (patch)
treeb848c0b433f28671140d28d48ac5b14b13458706 /src/test/ui/issues
parent73a7423e77b49a99e270531fbadda5b8899df3f6 (diff)
Add more information to `impl Trait` deny error
Diffstat (limited to 'src/test/ui/issues')
-rw-r--r--src/test/ui/issues/issue-47715.stderr16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/test/ui/issues/issue-47715.stderr b/src/test/ui/issues/issue-47715.stderr
index 63a28d997e1..5cccc7f3432 100644
--- a/src/test/ui/issues/issue-47715.stderr
+++ b/src/test/ui/issues/issue-47715.stderr
@@ -1,26 +1,34 @@
-error[E0562]: `impl Trait` not allowed outside of function and method return types
+error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
   --> $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 method return types
+error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
   --> $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 method return types
+error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
   --> $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 method return types
+error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
   --> $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