From 1e927d8689bc605cb1b1ff5b7bf9c062f6885443 Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Mon, 29 Jul 2019 04:07:51 +0200 Subject: [PATCH] Add test for #60407. --- src/test/ui/existential_types/issue-60407.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/test/ui/existential_types/issue-60407.rs diff --git a/src/test/ui/existential_types/issue-60407.rs b/src/test/ui/existential_types/issue-60407.rs new file mode 100644 index 00000000000..52162c491b5 --- /dev/null +++ b/src/test/ui/existential_types/issue-60407.rs @@ -0,0 +1,15 @@ +// check-pass + +#![feature(existential_type)] + +existential type Debuggable: core::fmt::Debug; + +static mut TEST: Option = None; + +fn main() { + unsafe { TEST = Some(foo()) } +} + +fn foo() -> Debuggable { + 0u32 +}