diff options
Diffstat (limited to 'compiler/rustc_codegen_cranelift/example/std_example.rs')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/example/std_example.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_cranelift/example/std_example.rs b/compiler/rustc_codegen_cranelift/example/std_example.rs index 9bd2ab5c638..2fee912e52c 100644 --- a/compiler/rustc_codegen_cranelift/example/std_example.rs +++ b/compiler/rustc_codegen_cranelift/example/std_example.rs @@ -167,6 +167,14 @@ fn main() { transmute_fat_pointer(); rust_call_abi(); + + const fn no_str() -> Option<Box<str>> { + None + } + + static STATIC_WITH_MAYBE_NESTED_BOX: &Option<Box<str>> = &no_str(); + + println!("{:?}", STATIC_WITH_MAYBE_NESTED_BOX); } fn panic(_: u128) { |
