]> git.proxmox.com Git - rustc.git/blame - src/test/ui/nll/issue-48070.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / nll / issue-48070.rs
CommitLineData
0531ce1d 1// run-pass
0531ce1d 2
0531ce1d
XL
3struct Foo {
4 x: u32
5}
6
7impl Foo {
8 fn twiddle(&mut self) -> &mut Self { self }
9 fn twaddle(&mut self) -> &mut Self { self }
10 fn emit(&mut self) {
11 self.x += 1;
12 }
13}
14
a7813a04 15fn main() {
0531ce1d
XL
16 let mut foo = Foo { x: 0 };
17 match 22 {
18 22 => &mut foo,
19 44 => foo.twiddle(),
20 _ => foo.twaddle(),
21 }.emit();
54a0048b 22}