summaryrefslogtreecommitdiffstats
path: root/src/test/ui/closures/closure-no-fn-3.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/closures/closure-no-fn-3.stderr')
-rw-r--r--src/test/ui/closures/closure-no-fn-3.stderr9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/closures/closure-no-fn-3.stderr b/src/test/ui/closures/closure-no-fn-3.stderr
new file mode 100644
index 000000000..6009389b1
--- /dev/null
+++ b/src/test/ui/closures/closure-no-fn-3.stderr
@@ -0,0 +1,9 @@
+error[E0605]: non-primitive cast: `[closure@$DIR/closure-no-fn-3.rs:6:28: 6:30]` as `fn() -> u8`
+ --> $DIR/closure-no-fn-3.rs:6:27
+ |
+LL | let baz: fn() -> u8 = (|| { b }) as fn() -> u8;
+ | ^^^^^^^^^^^^^^^^^^^^^^^^ invalid cast
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0605`.