Sign in
fuchsia
/
third_party
/
rust
/
9d09331e00b02f81c714b0c41ce3a38380dd36a2
/
.
/
src
/
test
/
ui
/
self
/
explicit-self-objects-uniq.rs
blob: 0050bc7124d7183da5136ceb4b99d802b8e52700 [
file
] [
log
] [
blame
]
// run-pass
#![
feature
(
box_syntax
)]
trait
Foo
{
fn
f
(
self
:
Box
<
Self
>);
}
struct
S
{
x
:
isize
}
impl
Foo
for
S
{
fn
f
(
self
:
Box
<
S
>)
{
assert_eq
!(
self
.
x
,
3
);
}
}
pub
fn
main
()
{
let
x
=
box S
{
x
:
3
};
let
y
=
x
as
Box
<
dyn
Foo
>;
y
.
f
();
}