rust/src/test/ui/self/explicit-self-closures.rs

18 lines
289 B
Rust
Raw Normal View History

2019-05-19 08:17:12 -05:00
// compile-pass
#![allow(dead_code)]
// Test to make sure that explicit self params work inside closures
// pretty-expanded FIXME #23616
struct Box {
x: usize
}
impl Box {
pub fn set_many(&mut self, xs: &[usize]) {
2015-01-31 11:20:46 -06:00
for x in xs { self.x = *x; }
}
}
pub fn main() {}