<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="trait MyTY {
    fn my_y(&amp;self) -&gt; uint;
}

trait MyTXY: MyTY {
    fn my_x(&amp;self) -&gt; uint;
}

fn bar(mt: &amp;MyTXY) {
    mt.my_x();
    mt.my_y();
}

fn main() {
}"><pre class="notranslate"><code class="notranslate">trait MyTY {
    fn my_y(&amp;self) -&gt; uint;
}

trait MyTXY: MyTY {
    fn my_x(&amp;self) -&gt; uint;
}

fn bar(mt: &amp;MyTXY) {
    mt.my_x();
    mt.my_y();
}

fn main() {
}
</code></pre></div>
<p dir="auto">Bound type parameters can call supertrait methods, objects should be able to as well.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="trait A { fn f() }
trait B: A { }

fn foo(b: &amp;B) {
    b.f()
}"><pre class="notranslate"><code class="notranslate">trait A { fn f() }
trait B: A { }

fn foo(b: &amp;B) {
    b.f()
}
</code></pre></div>