2019-07-03 06:30:28 +09:00
|
|
|
// build-pass (FIXME(62277): could be check-pass?)
|
2018-09-25 23:51:35 +02:00
|
|
|
#![allow(dead_code)]
|
2012-08-22 13:18:29 -07:00
|
|
|
// Test to make sure that explicit self params work inside closures
|
|
|
|
|
2015-03-22 13:13:15 -07:00
|
|
|
// pretty-expanded FIXME #23616
|
|
|
|
|
2012-08-22 13:18:29 -07:00
|
|
|
struct Box {
|
2015-03-25 17:06:52 -07:00
|
|
|
x: usize
|
2012-08-22 13:18:29 -07:00
|
|
|
}
|
|
|
|
|
2013-05-31 15:17:22 -07:00
|
|
|
impl Box {
|
2015-03-25 17:06:52 -07:00
|
|
|
pub fn set_many(&mut self, xs: &[usize]) {
|
2015-01-31 12:20:46 -05:00
|
|
|
for x in xs { self.x = *x; }
|
2012-08-22 13:18:29 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-02-01 19:43:17 -08:00
|
|
|
pub fn main() {}
|