]> git.lizzy.rs Git - rust.git/commit
Elide E0308 errors in favor of E0746
authorEsteban Küber <esteban@kuber.com.ar>
Tue, 14 Jan 2020 00:12:44 +0000 (16:12 -0800)
committerEsteban Küber <esteban@kuber.com.ar>
Thu, 16 Jan 2020 17:37:24 +0000 (09:37 -0800)
commitea7e885204e1ed6b18406e84708abef748925ec5
treec1f7251d6e76a303a1d2dae31ad50ddfa02c512b
parent75eabb17aec390fd91b5bf11539012e4fc7307b7
Elide E0308 errors in favor of E0746

When a type error involves a `dyn Trait` as the return type, do not emit
the type error, as the "return type is not `Sized`" error will provide
enough information to the user.
src/librustc_typeck/check/coercion.rs
src/librustc_typeck/check/mod.rs
src/test/ui/error-codes/E0746.rs
src/test/ui/error-codes/E0746.stderr
src/test/ui/impl-trait/dyn-trait-return-should-be-impl-trait.rs
src/test/ui/impl-trait/dyn-trait-return-should-be-impl-trait.stderr