rust/tests/ui/self/explicit-self-closures.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
326 B
Rust
Raw Normal View History

//@ build-pass (FIXME(62277): could be check-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-02-01 01:20:46 +08:00
for x in xs { self.x = *x; }
}
}
pub fn main() {}