Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type int32 = i32;
- struct ComplexRefs<'a>
- {
- int_ref: &'a i32,
- unsigned_ref: &'a u32,
- str_ref: &'a str,
- }
- fn main() {
- let a: int32 = -432;
- let b: int32 = 9018239;
- let c: int32 = 2321;
- let d: u32 = 5;
- {
- let str_ref: &str = "Hahaha";
- let cr: ComplexRefs = ComplexRefs {
- int_ref: &a,
- unsigned_ref: &d,
- str_ref,
- };
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement