>f64</span>;

    <span class='kw'>fn</span> <span class='ident'>add</span>(<span class='self'>self</span>, <span class='ident'>rhs</span>: <span class='ident'>i32</span>) <span class='op'>-&gt;</span> <span class='ident'>f64</span> {
        <span class='comment'>// i32をPointに加算しf64を返す</span>
    }
}</pre>

<!-- will let you do this: -->

<p>上のコードによって以下の様に書けるようになります:</p>

<span class='rusttest'>fn main() {
    let p: Point = // ...
let x: f64 