mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
17 lines
324 B
Rust
17 lines
324 B
Rust
// 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]) {
|
|
for x in xs { self.x = *x; }
|
|
}
|
|
}
|
|
|
|
pub fn main() {}
|