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