Date: 2019-09-15 05:22 am (UTC)
juan_gandhi: (Default)
From: [personal profile] juan_gandhi
Just tested. It worked!

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

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

Profile

thedeemon: (Default)
Dmitry Popov

May 2025

S M T W T F S
    123
45678910
11 121314151617
18192021222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 24th, 2025 01:55 am
Powered by Dreamwidth Studios