]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/closures/2229_closure_analysis/run_pass/tuple-struct-pattern-matching-with-methods.rs
10 // Testing tuple struct patterns
12 points
: Vec
<PointType
>,
16 pub fn test1(&mut self) -> Vec
<usize> {
17 (0..self.points
.len())
20 PointType
::TwoD (..) => Some(i
),
21 PointType
::ThreeD (..) => None
,
27 pub fn test2(&mut self, i
: usize) -> PointType
{
33 let mut points
= Points
{
34 points
: Vec
::<PointType
>::new()
37 points
.points
.push(PointType
::ThreeD(0,0,0));
38 points
.points
.push(PointType
::TwoD(0,0));
39 points
.points
.push(PointType
::ThreeD(0,0,1));
40 points
.points
.push(PointType
::TwoD(0,1));
42 println
!("{:?}", points
.test1());