blob: 78024a94c0de3c0590b985020572e44f730b5605 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  | 
// Regression test for issue #137668 where an indirect argument have been marked as nocapture
// despite the fact that callee did in fact capture the address.
//
//@ run-pass
//@ compile-flags: -Copt-level=2
#[inline(never)]
pub fn f(a: [u32; 64], b: [u32; 64]) -> bool {
    &a as *const _ as usize != &b as *const _ as usize
}
fn main() {
    static S: [u32; 64] = [0; 64];
    assert!(f(S, S));
}
 
  |