summaryrefslogtreecommitdiffstats
path: root/src/test/incremental/add_private_fn_at_krate_root_cc/auxiliary/point.rs
blob: 16aaad348a80806300e20f7ec22a3c6cd5025e43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
pub struct Point {
    pub x: f32,
    pub y: f32,
}

#[cfg(rpass2)]
fn unused_helper() {
}

pub fn distance_squared(this: &Point) -> f32 {
    return this.x * this.x + this.y * this.y;
}

impl Point {
    pub fn distance_from_origin(&self) -> f32 {
        distance_squared(self).sqrt()
    }
}