summaryrefslogtreecommitdiffstats
path: root/src/test/ui/unsafe/issue-3080.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/unsafe/issue-3080.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/unsafe/issue-3080.rs b/src/test/ui/unsafe/issue-3080.rs
new file mode 100644
index 000000000..2b5269dda
--- /dev/null
+++ b/src/test/ui/unsafe/issue-3080.rs
@@ -0,0 +1,11 @@
+// revisions: mir thir
+// [thir]compile-flags: -Z thir-unsafeck
+
+struct X(());
+impl X {
+ pub unsafe fn with(&self) { }
+}
+
+fn main() {
+ X(()).with(); //~ ERROR requires unsafe function or block
+}