mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
Add test for #60407.
This commit is contained in:
parent
b779f45fed
commit
1e927d8689
15
src/test/ui/existential_types/issue-60407.rs
Normal file
15
src/test/ui/existential_types/issue-60407.rs
Normal file
@ -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
|
||||
}
|
Loading…
Reference in New Issue
Block a user