summary refs log tree commit diff
path: root/src/test/ui/impl-trait
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2020-01-14 14:49:30 -0800
committerEsteban Küber <esteban@kuber.com.ar>2020-01-16 09:49:13 -0800
commit509cb33dbcdb631625288f72c359a35dde6524b7 (patch)
tree82c81cd4edecc5d44b4db29839f884f04b642ec1 /src/test/ui/impl-trait
parent5b36c187dcbb8a4b6555fe046194f2b6deb74230 (diff)
downloadrust-509cb33dbcdb631625288f72c359a35dde6524b7.tar.gz
rust-509cb33dbcdb631625288f72c359a35dde6524b7.zip
review comments
Diffstat (limited to 'src/test/ui/impl-trait')
-rw-r--r--src/test/ui/impl-trait/equality.stderr1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/test/ui/impl-trait/equality.stderr b/src/test/ui/impl-trait/equality.stderr
index be8653d1689..ceb32dd4cd3 100644
--- a/src/test/ui/impl-trait/equality.stderr
+++ b/src/test/ui/impl-trait/equality.stderr
@@ -12,6 +12,7 @@ LL |     0_u32
    |
    = note: to return `impl Trait`, all returned values must be of the same type
    = help: you can instead return a trait object using `Box<dyn Foo>`
+   = help: alternatively, create a new `enum` with a variant for each returned type
    = note: for information on `impl Trait`, see <https://doc.rust-lang.org/book/ch10-02-traits.html#returning-types-that-implement-traits>
    = note: for information on trait objects, see <https://doc.rust-lang.org/book/ch17-02-trait-objects.html#using-trait-objects-that-allow-for-values-of-different-types>