Sign in
fuchsia
/
third_party
/
rust
/
9d09331e00b02f81c714b0c41ce3a38380dd36a2
/
.
/
src
/
test
/
ui
/
issues
/
issue-3820.rs
blob: c090654623206b85b75f097bc6e269fe88457b05 [
file
] [
log
] [
blame
]
struct
Thing
{
x
:
isize
}
impl
Thing
{
fn
mul
(&
self
,
c
:
&
isize
)
->
Thing
{
Thing
{
x
:
self
.
x
*
*
c
}
}
}
fn
main
()
{
let
u
=
Thing
{
x
:
2
};
let
_v
=
u
.
mul
(&
3
);
// This is ok
let
w
=
u
*
3
;
//~ ERROR cannot multiply `{integer}` to `Thing`
}