about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/lang-items/issue-86238.rs16
-rw-r--r--src/test/ui/lang-items/issue-86238.stderr10
2 files changed, 26 insertions, 0 deletions
diff --git a/src/test/ui/lang-items/issue-86238.rs b/src/test/ui/lang-items/issue-86238.rs
new file mode 100644
index 00000000000..509f94f3834
--- /dev/null
+++ b/src/test/ui/lang-items/issue-86238.rs
@@ -0,0 +1,16 @@
+// Regression test for the ICE described in issue #86238.
+
+#![feature(lang_items)]
+#![feature(no_core)]
+
+#![no_core]
+fn main() {
+    let one = || {};
+    one()
+    //~^ ERROR: failed to find an overloaded call trait for closure call
+    //~| HELP: make sure the `fn`/`fn_mut`/`fn_once` lang items are defined
+}
+#[lang = "sized"]
+trait Sized {}
+#[lang = "copy"]
+trait Copy {}
diff --git a/src/test/ui/lang-items/issue-86238.stderr b/src/test/ui/lang-items/issue-86238.stderr
new file mode 100644
index 00000000000..767e6de2263
--- /dev/null
+++ b/src/test/ui/lang-items/issue-86238.stderr
@@ -0,0 +1,10 @@
+error: failed to find an overloaded call trait for closure call
+  --> $DIR/issue-86238.rs:9:5
+   |
+LL |     one()
+   |     ^^^^^
+   |
+   = help: make sure the `fn`/`fn_mut`/`fn_once` lang items are defined and have associated `call`/`call_mut`/`call_once` functions
+
+error: aborting due to previous error
+