juan_gandhi: (Default)
Juan-Carlos Gandhi ([personal profile] juan_gandhi) wrote in [personal profile] thedeemon 2019-09-15 05:22 am (UTC)

Just tested. It worked!

    #[test]
    fn changing_lifetime() {
        let r;
        {
            let x = 5;
            r = make_static(&x);
        }
        println!("r: {}", r);
        assert_eq!(5, *r)
    }


Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting