Sign in
fuchsia
/
third_party
/
rust
/
cfcc5c296ed6fabcc8b9d380eaaea8a7352299fd
/
.
/
src
/
test
/
ui
/
self
/
arbitrary_self_types_silly.rs
blob: fb5f9012b1865c8f2b302709dec302ccccafb0d7 [
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
());
}