summaryrefslogtreecommitdiffstats
path: root/src/test/ui/closures/issue-52437.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/closures/issue-52437.stderr')
-rw-r--r--src/test/ui/closures/issue-52437.stderr29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/test/ui/closures/issue-52437.stderr b/src/test/ui/closures/issue-52437.stderr
new file mode 100644
index 000000000..38d9d08ce
--- /dev/null
+++ b/src/test/ui/closures/issue-52437.stderr
@@ -0,0 +1,29 @@
+error: invalid label name `'static`
+ --> $DIR/issue-52437.rs:2:13
+ |
+LL | [(); &(&'static: loop { |x| {}; }) as *const _ as usize]
+ | ^^^^^^^
+
+error[E0282]: type annotations needed
+ --> $DIR/issue-52437.rs:2:30
+ |
+LL | [(); &(&'static: loop { |x| {}; }) as *const _ as usize]
+ | ^
+ |
+help: consider giving this closure parameter an explicit type
+ |
+LL | [(); &(&'static: loop { |x: _| {}; }) as *const _ as usize]
+ | +++
+
+error[E0308]: mismatched types
+ --> $DIR/issue-52437.rs:2:5
+ |
+LL | fn main() {
+ | - expected `()` because of default return type
+LL | [(); &(&'static: loop { |x| {}; }) as *const _ as usize]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found array `[(); _]`
+
+error: aborting due to 3 previous errors
+
+Some errors have detailed explanations: E0282, E0308.
+For more information about an error, try `rustc --explain E0282`.