Sign in
android
/
toolchain
/
rustc
/
cd1aefd586783f162dd848e314bd6991a5ffe033
/
.
/
tests
/
ui
/
self
/
arbitrary-self-from-method-substs.rs
blob: 0f911a20842bc4e0fe5650dc119c156cc6dea9d5 [
file
] [
log
] [
blame
]
#![
feature
(
arbitrary_self_types
)]
use
std
::
ops
::
Deref
;
struct
Foo
(
u32
);
impl
Foo
{
fn
get
<
R
:
Deref
<
Target
=
Self
>>(
self
:
R
)
->
u32
{
self
.
0
}
}
fn
main
()
{
let
mut
foo
=
Foo
(
1
);
foo
.
get
::<&
Foo
>();
//~^ ERROR mismatched types
}