2019-07-26 21:54:25 +00:00
|
|
|
//@ run-pass
|
|
|
|
|
2018-09-14 10:20:28 +00:00
|
|
|
#![allow(unused_mut)]
|
2011-08-05 00:27:51 +00:00
|
|
|
// This should typecheck even though the type of e is not fully
|
2013-11-20 00:34:19 +00:00
|
|
|
// resolved when we finish typechecking the ||.
|
2013-01-26 06:46:32 +00:00
|
|
|
|
2014-03-05 23:28:08 +00:00
|
|
|
|
2015-03-26 00:06:52 +00:00
|
|
|
struct Refs { refs: Vec<isize> , n: isize }
|
2013-01-26 06:46:32 +00:00
|
|
|
|
2013-02-02 03:43:17 +00:00
|
|
|
pub fn main() {
|
2016-10-29 21:54:04 +00:00
|
|
|
let mut e = Refs{refs: vec![], n: 0};
|
2015-02-01 17:44:15 +00:00
|
|
|
let _f = || println!("{}", e.n);
|
2015-03-26 00:06:52 +00:00
|
|
|
let x: &[isize] = &e.refs;
|
2014-02-10 12:44:03 +00:00
|
|
|
assert_eq!(x.len(), 0);
|
2011-08-05 00:27:51 +00:00
|
|
|
}
|