Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
self
/
arbitrary_self_types_silly.rs
blob: 94726bd69cc57edcd9654b74a409dad22c6b7c43 [
file
] [
log
] [
blame
]
//@ run-pass
#![
feature
(
arbitrary_self_types
)]
struct
Foo
;
struct
Bar
;
impl
std
::
ops
::
Deref
for
Bar
{
type
Target
=
Foo
;
fn
deref
(&
self
)
->
&
Foo
{
&
Foo
}
}
impl
Foo
{
fn
bar
(
self
:
Bar
)
->
i32
{
3
}
}
fn
main
()
{
assert_eq
!(
3
,
Bar
.
bar
());
}