From 8cb193a5cb694ba62c83fb63a804f22720a118cf Mon Sep 17 00:00:00 2001 From: Esteban Küber Date: Mon, 23 Dec 2019 14:16:34 -0800 Subject: Suggest type param when encountering `_` in fn defs When encountering `_` type placeholder in fn arguments and return type, suggest using generic type parameters. Expand what counts as an inferable return type to slice, array and tuples of `_`. --- src/test/ui/error-codes/E0121.stderr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/test/ui/error-codes') diff --git a/src/test/ui/error-codes/E0121.stderr b/src/test/ui/error-codes/E0121.stderr index beb8941320b..5da9a4c080f 100644 --- a/src/test/ui/error-codes/E0121.stderr +++ b/src/test/ui/error-codes/E0121.stderr @@ -5,7 +5,7 @@ LL | fn foo() -> _ { 5 } | ^ | | | not allowed in type signatures - | help: replace `_` with the correct return type: `i32` + | help: replace this with the correct return type: `i32` error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/E0121.rs:3:13 -- cgit 1.4.1-3-g733a5