Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
pattern
/
patkind-ref-binding-issue-122415.rs
blob: b9f6416027a37d04ec3e43fe0b8338367501fbf2 [
file
] [
log
] [
blame
] [
edit
]
//@ run-rustfix
#![
allow
(
dead_code
)]
fn
mutate
(
_y
:
&
mut
i32
)
{}
fn
foo
(&
x
:
&
i32
)
{
mutate
(&
mut
x
);
//~^ ERROR cannot borrow `x` as mutable
}
fn
main
()
{}