about summary refs log tree commit diff
path: root/tests/ui/self/explicit-self-closures.rs
blob: cb8b89e90ce8c7ea15f966b6af94acf5cdbf883b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//@ build-pass (FIXME(62277): could be check-pass?)
#![allow(dead_code)]
// Test to make sure that explicit self params work inside closures


struct Box {
    x: usize
}

impl Box {
    pub fn set_many(&mut self, xs: &[usize]) {
        for x in xs { self.x = *x; }
    }
}

pub fn main() {}