summary refs log tree commit diff
path: root/src/test/run-pass/self/explicit-self-closures.rs
blob: 61be98fe3d3cdc5fbd59bcc50bb05a62a543974a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// run-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]) {
        for x in xs { self.x = *x; }
    }
}

pub fn main() {}