2 // Tests that two closures can simultaneously have immutable
3 // access to the variable, whether that immutable access be used
4 // for direct reads or for taking immutable ref. Also check
5 // that the main function can read the variable too while
6 // the closures are in scope. Issue #6801.
17 fn get(x: &i32) -> i32 {
38 assert_eq!(a(), 1280);
39 assert_eq!(b(), 1024);
40 assert_eq!(c(), 1280);