about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2023-05-30 17:39:12 +0000
committerMichael Goulet <michael@errs.io>2023-06-08 16:17:30 +0000
commit522ae84e0344669ee64754595dd5f04eed9f0d1c (patch)
tree4db57d0d729ed8fdd984792ddc5e0b71b3a04fed /tests
parente7409258db4a43f23dcc66e10061dee91c316055 (diff)
downloadrust-522ae84e0344669ee64754595dd5f04eed9f0d1c.tar.gz
rust-522ae84e0344669ee64754595dd5f04eed9f0d1c.zip
Suggest type mismatches even when using ref syntax on binding
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/switched-expectations.stderr4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/ui/switched-expectations.stderr b/tests/ui/switched-expectations.stderr
index 744d8483bd3..6e1bbf701d7 100644
--- a/tests/ui/switched-expectations.stderr
+++ b/tests/ui/switched-expectations.stderr
@@ -2,7 +2,9 @@ error[E0308]: mismatched types
   --> $DIR/switched-expectations.rs:3:30
    |
 LL |     let ref string: String = var;
-   |                              ^^^ expected `String`, found `i32`
+   |                              ^^^- help: try using a conversion method: `.to_string()`
+   |                              |
+   |                              expected `String`, found `i32`
 
 error: aborting due to previous error