about summary refs log tree commit diff
path: root/src/test/ui/error-codes
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2020-01-14 13:18:06 -0800
committerEsteban Küber <esteban@kuber.com.ar>2020-01-16 09:49:13 -0800
commit5b36c187dcbb8a4b6555fe046194f2b6deb74230 (patch)
tree7f6e24d8dbe27ad654a5cf669e6c9d56f8c10cb2 /src/test/ui/error-codes
parent4a75ef91f37dd0bd5267a852fa05ee0a5547a62b (diff)
downloadrust-5b36c187dcbb8a4b6555fe046194f2b6deb74230.tar.gz
rust-5b36c187dcbb8a4b6555fe046194f2b6deb74230.zip
review comments
Diffstat (limited to 'src/test/ui/error-codes')
-rw-r--r--src/test/ui/error-codes/E0746.stderr8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/ui/error-codes/E0746.stderr b/src/test/ui/error-codes/E0746.stderr
index 1c88ce64749..e7a8fd304ca 100644
--- a/src/test/ui/error-codes/E0746.stderr
+++ b/src/test/ui/error-codes/E0746.stderr
@@ -1,23 +1,23 @@
-error[E0746]: return type cannot have a bare trait because it must be `Sized`
+error[E0746]: return type cannot have an unboxed trait object
   --> $DIR/E0746.rs:8:13
    |
 LL | fn foo() -> dyn Trait { Struct }
    |             ^^^^^^^^^ doesn't have a size known at compile-time
    |
    = note: for information on `impl Trait`, see <https://doc.rust-lang.org/book/ch10-02-traits.html#returning-types-that-implement-traits>
-help: you can use the `impl Trait` feature in the return type because all the return paths are of type `Struct`, which implements `dyn Trait`
+help: return `impl Trait` instead, as all return paths are of type `Struct`, which implements `Trait`
    |
 LL | fn foo() -> impl Trait { Struct }
    |             ^^^^^^^^^^
 
-error[E0746]: return type cannot have a bare trait because it must be `Sized`
+error[E0746]: return type cannot have an unboxed trait object
   --> $DIR/E0746.rs:11:13
    |
 LL | fn bar() -> dyn Trait {
    |             ^^^^^^^^^ doesn't have a size known at compile-time
    |
    = note: for information on `impl Trait`, see <https://doc.rust-lang.org/book/ch10-02-traits.html#returning-types-that-implement-traits>
-help: you can use the `impl Trait` feature in the return type because all the return paths are of type `{integer}`, which implements `dyn Trait`
+help: return `impl Trait` instead, as all return paths are of type `{integer}`, which implements `Trait`
    |
 LL | fn bar() -> impl Trait {
    |             ^^^^^^^^^^