summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-21701.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/issues/issue-21701.stderr')
-rw-r--r--tests/ui/issues/issue-21701.stderr30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-21701.stderr b/tests/ui/issues/issue-21701.stderr
new file mode 100644
index 000000000..9f1fe7dde
--- /dev/null
+++ b/tests/ui/issues/issue-21701.stderr
@@ -0,0 +1,30 @@
+error[E0618]: expected function, found `U`
+ --> $DIR/issue-21701.rs:2:13
+ |
+LL | fn foo<U>(t: U) {
+ | - `t` has type `U`
+LL | let y = t();
+ | ^--
+ | |
+ | call expression requires function
+
+error[E0618]: expected function, found struct `Bar`
+ --> $DIR/issue-21701.rs:9:13
+ |
+LL | struct Bar;
+ | ---------- struct `Bar` defined here
+...
+LL | let f = Bar();
+ | ^^^--
+ | |
+ | call expression requires function
+ |
+help: `Bar` is a unit struct, and does not take parentheses to be constructed
+ |
+LL - let f = Bar();
+LL + let f = Bar;
+ |
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0618`.