From 5b36c187dcbb8a4b6555fe046194f2b6deb74230 Mon Sep 17 00:00:00 2001 From: Esteban Küber Date: Tue, 14 Jan 2020 13:18:06 -0800 Subject: review comments --- src/test/ui/error-codes/E0746.stderr | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/test/ui/error-codes') 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 -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 -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 { | ^^^^^^^^^^ -- cgit 1.4.1-3-g733a5