about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/example/std_example.rs
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2024-03-16 17:23:11 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2024-03-16 17:23:11 +0000
commit6697186f5913f484dd16f893ad06b6692bebe7c2 (patch)
treea9806b5f1373c31bee6118b5d35dc6450cf99c21 /compiler/rustc_codegen_cranelift/example/std_example.rs
parent22e241e32e1331aab358ac2843ec63d4cc4ea9f4 (diff)
parent4cf4ffc6ba514f171b3f52d1c731063e4fc45be3 (diff)
downloadrust-6697186f5913f484dd16f893ad06b6692bebe7c2.tar.gz
rust-6697186f5913f484dd16f893ad06b6692bebe7c2.zip
Merge commit '4cf4ffc6ba514f171b3f52d1c731063e4fc45be3' into sync_cg_clif-2024-03-16
Diffstat (limited to 'compiler/rustc_codegen_cranelift/example/std_example.rs')
-rw-r--r--compiler/rustc_codegen_cranelift/example/std_example.rs8
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) {