summaryrefslogtreecommitdiffstats
path: root/tests/ui/typeck/mismatched-map-under-self.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:26:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:26:03 +0000
commit9918693037dce8aa4bb6f08741b6812923486c18 (patch)
tree21d2b40bec7e6a7ea664acee056eb3d08e15a1cf /tests/ui/typeck/mismatched-map-under-self.stderr
parentReleasing progress-linux version 1.75.0+dfsg1-5~progress7.99u1. (diff)
downloadrustc-9918693037dce8aa4bb6f08741b6812923486c18.tar.xz
rustc-9918693037dce8aa4bb6f08741b6812923486c18.zip
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/typeck/mismatched-map-under-self.stderr')
-rw-r--r--tests/ui/typeck/mismatched-map-under-self.stderr8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/ui/typeck/mismatched-map-under-self.stderr b/tests/ui/typeck/mismatched-map-under-self.stderr
index 51491407c..13678b4b8 100644
--- a/tests/ui/typeck/mismatched-map-under-self.stderr
+++ b/tests/ui/typeck/mismatched-map-under-self.stderr
@@ -12,8 +12,8 @@ note: type in trait
|
LL | fn values(&self) -> Self::Values;
| ^^^^^
- = note: expected signature `fn(&Option<T>)`
- found signature `fn(Option<T>)`
+ = note: expected signature `fn(&Option<_>)`
+ found signature `fn(Option<_>)`
error[E0631]: type mismatch in function arguments
--> $DIR/mismatched-map-under-self.rs:12:18
@@ -30,6 +30,10 @@ LL | self.map(Insertable::values).unwrap_or_default()
found function signature `for<'a> fn(&'a _) -> _`
note: required by a bound in `Option::<T>::map`
--> $SRC_DIR/core/src/option.rs:LL:COL
+help: consider wrapping the function in a closure
+ |
+LL | self.map(|arg0: T| Insertable::values(&arg0)).unwrap_or_default()
+ | +++++++++ +++++++
error: aborting due to 2 previous errors