diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-07-29 04:07:51 +0200 |
|---|---|---|
| committer | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-07-29 06:56:28 +0200 |
| commit | 1e927d8689bc605cb1b1ff5b7bf9c062f6885443 (patch) | |
| tree | 36de248138e4882088783c8c2cd43f629cad4bf6 | |
| parent | b779f45fedef4b02bd0daebba34b39d5d367181c (diff) | |
| download | rust-1e927d8689bc605cb1b1ff5b7bf9c062f6885443.tar.gz rust-1e927d8689bc605cb1b1ff5b7bf9c062f6885443.zip | |
Add test for #60407.
| -rw-r--r-- | src/test/ui/existential_types/issue-60407.rs | 15 |
1 files changed, 15 insertions, 0 deletions
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<Debuggable> = None; + +fn main() { + unsafe { TEST = Some(foo()) } +} + +fn foo() -> Debuggable { + 0u32 +} |
