diff options
Diffstat (limited to 'tests/ui/inline-const/pat-unsafe-err.rs')
-rw-r--r-- | tests/ui/inline-const/pat-unsafe-err.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/inline-const/pat-unsafe-err.rs b/tests/ui/inline-const/pat-unsafe-err.rs new file mode 100644 index 000000000..e290b438c --- /dev/null +++ b/tests/ui/inline-const/pat-unsafe-err.rs @@ -0,0 +1,17 @@ +// ignore-test This is currently broken +// revisions: mir thir +// [thir]compile-flags: -Z thir-unsafeck + +#![allow(incomplete_features)] +#![feature(inline_const_pat)] + +const unsafe fn require_unsafe() -> usize { 1 } + +fn main() { + match () { + const { + require_unsafe(); + //~^ ERROR [E0133] + } => (), + } +} |