diff options
| author | Michael Goulet <michael@errs.io> | 2022-06-19 15:10:42 -0700 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2022-06-19 15:10:42 -0700 |
| commit | 4400a26e31363acd7427d47f7dff33da18419fcf (patch) | |
| tree | fc2bb4173e81151a9b9665276286365966adbd37 /compiler | |
| parent | 2b646bd533e8a20c06a71d0b7837e15eb4c79fa8 (diff) | |
| download | rust-4400a26e31363acd7427d47f7dff33da18419fcf.tar.gz rust-4400a26e31363acd7427d47f7dff33da18419fcf.zip | |
Make missing argument placeholder more obvious that it's a placeholder
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_typeck/src/check/fn_ctxt/checks.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_typeck/src/check/fn_ctxt/checks.rs b/compiler/rustc_typeck/src/check/fn_ctxt/checks.rs index 93ca8e2237f..2326c4069e4 100644 --- a/compiler/rustc_typeck/src/check/fn_ctxt/checks.rs +++ b/compiler/rustc_typeck/src/check/fn_ctxt/checks.rs @@ -955,8 +955,10 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { let input_ty = self.resolve_vars_if_possible(expected_ty); if input_ty.is_unit() { "()".to_string() + } else if !input_ty.is_ty_var() { + format!("/* {} */", input_ty) } else { - format!("{{{}}}", input_ty) + "/* value */".to_string() } }; suggestion += &suggestion_text; |
