blob: aaec1aba0c505a12f151ec2b81311c002a9dbe6a [file]
#![feature(no_core)]
#![no_core]
#![feature(lang_items)]
#![feature(lang_items)]
#[lang = "sized"]
pub trait Sized {}
pub trait Bar {}
pub trait Foo {
type Ty;
fn foo(self) -> Self::Ty;
}
impl<B: Bar> Foo for B {
type Ty = u32;
fn foo(self) -> Self::Ty {
14
}
}
struct Qux;
impl Bar for Qux {}
fn main() {
let a = Qux;
a.foo();
let b = Qux;
Foo::foo(b);
}