about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorLzu Tao <taolzu@gmail.com>2024-07-13 01:06:40 +0000
committerLzu Tao <taolzu@gmail.com>2024-07-15 12:54:00 +0000
commit9c3c278b545d9e03939e3bfcbebb256758b9a8b9 (patch)
treebbf8f6d9d2bde11f953c3eb4b27f147641855db2 /tests
parent9c1a9e03d5e001543a21eaff5d616de8cb4e2220 (diff)
downloadrust-9c3c278b545d9e03939e3bfcbebb256758b9a8b9.tar.gz
rust-9c3c278b545d9e03939e3bfcbebb256758b9a8b9.zip
Add support for `Result<&T, _>'
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/mismatched_types/transforming-option-ref-issue-127545.stderr4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/ui/mismatched_types/transforming-option-ref-issue-127545.stderr b/tests/ui/mismatched_types/transforming-option-ref-issue-127545.stderr
index 0a6d47339d8..1790fc1249a 100644
--- a/tests/ui/mismatched_types/transforming-option-ref-issue-127545.stderr
+++ b/tests/ui/mismatched_types/transforming-option-ref-issue-127545.stderr
@@ -80,6 +80,10 @@ LL |     arg.unwrap_or(&[])
    |                   this argument influences the return type of `unwrap_or`
 note: method defined here
   --> $SRC_DIR/core/src/result.rs:LL:COL
+help: use `Result::map_or` to deref inner value of `Result`
+   |
+LL |     arg.map_or(&[], |v| v)
+   |         ~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 4 previous errors