summaryrefslogtreecommitdiffstats
path: root/tests/ui/closures/binder/implicit-stuff.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /tests/ui/closures/binder/implicit-stuff.stderr
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/closures/binder/implicit-stuff.stderr')
-rw-r--r--tests/ui/closures/binder/implicit-stuff.stderr107
1 files changed, 107 insertions, 0 deletions
diff --git a/tests/ui/closures/binder/implicit-stuff.stderr b/tests/ui/closures/binder/implicit-stuff.stderr
new file mode 100644
index 000000000..779a08a44
--- /dev/null
+++ b/tests/ui/closures/binder/implicit-stuff.stderr
@@ -0,0 +1,107 @@
+error[E0637]: `&` without an explicit lifetime name cannot be used here
+ --> $DIR/implicit-stuff.rs:20:23
+ |
+LL | let _ = for<> |_: &()| -> () {};
+ | ^ explicit lifetime name needed here
+
+error[E0637]: `&` without an explicit lifetime name cannot be used here
+ --> $DIR/implicit-stuff.rs:21:23
+ |
+LL | let _ = for<> |x: &()| -> &() { x };
+ | ^ explicit lifetime name needed here
+
+error[E0637]: `&` without an explicit lifetime name cannot be used here
+ --> $DIR/implicit-stuff.rs:21:31
+ |
+LL | let _ = for<> |x: &()| -> &() { x };
+ | ^ explicit lifetime name needed here
+
+error[E0637]: `'_` cannot be used here
+ --> $DIR/implicit-stuff.rs:23:24
+ |
+LL | let _ = for<> |x: &'_ ()| -> &'_ () { x };
+ | ^^ `'_` is a reserved lifetime name
+
+error[E0637]: `'_` cannot be used here
+ --> $DIR/implicit-stuff.rs:23:35
+ |
+LL | let _ = for<> |x: &'_ ()| -> &'_ () { x };
+ | ^^ `'_` is a reserved lifetime name
+
+error[E0637]: `&` without an explicit lifetime name cannot be used here
+ --> $DIR/implicit-stuff.rs:25:25
+ |
+LL | let _ = for<'a> |x: &()| -> &'a () { x };
+ | ^ explicit lifetime name needed here
+
+error[E0637]: `&` without an explicit lifetime name cannot be used here
+ --> $DIR/implicit-stuff.rs:26:36
+ |
+LL | let _ = for<'a> |x: &'a ()| -> &() { x };
+ | ^ explicit lifetime name needed here
+
+error: implicit types in closure signatures are forbidden when `for<...>` is present
+ --> $DIR/implicit-stuff.rs:5:22
+ |
+LL | let _ = for<> || {};
+ | ----- ^
+ | |
+ | `for<...>` is here
+
+error: implicit types in closure signatures are forbidden when `for<...>` is present
+ --> $DIR/implicit-stuff.rs:6:31
+ |
+LL | let _ = for<'a> || -> &'a _ { &() };
+ | ------- ^
+ | |
+ | `for<...>` is here
+
+error: implicit types in closure signatures are forbidden when `for<...>` is present
+ --> $DIR/implicit-stuff.rs:7:22
+ |
+LL | let _ = for<'a> |x| -> &'a () { x };
+ | ------- ^
+ | |
+ | `for<...>` is here
+
+error: implicit types in closure signatures are forbidden when `for<...>` is present
+ --> $DIR/implicit-stuff.rs:8:29
+ |
+LL | let _ = for<'a> |x: &'a _| -> &'a () { x };
+ | ------- ^
+ | |
+ | `for<...>` is here
+
+error: implicit types in closure signatures are forbidden when `for<...>` is present
+ --> $DIR/implicit-stuff.rs:9:35
+ |
+LL | let _ = for<'a> |x: &'a Vec::<_>| -> &'a Vec::<()> { x };
+ | ------- ^
+ | |
+ | `for<...>` is here
+
+error: implicit types in closure signatures are forbidden when `for<...>` is present
+ --> $DIR/implicit-stuff.rs:10:49
+ |
+LL | let _ = for<'a> |x: &'a Vec<()>| -> &'a Vec<_> { x };
+ | ------- `for<...>` is here ^
+
+error: implicit types in closure signatures are forbidden when `for<...>` is present
+ --> $DIR/implicit-stuff.rs:11:29
+ |
+LL | let _ = for<'a> |x: &'a _| -> &'a &'a () { x };
+ | ------- ^
+ | |
+ | `for<...>` is here
+
+error: implicit types in closure signatures are forbidden when `for<...>` is present
+ --> $DIR/implicit-stuff.rs:12:29
+ |
+LL | let _ = for<'a> |x: &'a _, y, z: _| -> &'a _ {
+ | ------- ^ ^ ^ ^
+ | |
+ | `for<...>` is here
+
+error: aborting due to 15 previous errors
+
+For more information about this error, try `rustc --explain E0637`.