Created
February 28, 2020 15:09
-
-
Save wrightmikea/255ba027bac58272934305b82e136cfb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://github.com/rust-lang/rust/issues/49733 | |
// https://doc.rust-lang.org/1.7.0/book/box-syntax-and-patterns.html | |
#![feature(box_syntax)] | |
#[derive(Debug)] | |
struct Bix(u8); | |
impl Bix { | |
pub fn new(x: u8) -> Self { | |
Bix(*box x) // for demo only, box serves no practical purpose here | |
} | |
} | |
fn main() { | |
println!("Hello, box1!"); | |
let bix = Bix::new(42); | |
dbg!(&bix); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment