summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-21701.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/issues/issue-21701.rs')
-rw-r--r--src/test/ui/issues/issue-21701.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-21701.rs b/src/test/ui/issues/issue-21701.rs
new file mode 100644
index 000000000..bfa03c5e4
--- /dev/null
+++ b/src/test/ui/issues/issue-21701.rs
@@ -0,0 +1,15 @@
+fn foo<U>(t: U) {
+ let y = t();
+//~^ ERROR: expected function, found `U`
+}
+
+struct Bar;
+
+pub fn some_func() {
+ let f = Bar();
+//~^ ERROR: expected function, found struct `Bar`
+}
+
+fn main() {
+ foo(|| { 1 });
+}