Sign in
android
/
toolchain
/
rustc
/
d720b3f2ba07cb42ff7b311589c99daefe3aaa22
/
.
/
tests
/
ui
/
rfcs
/
rfc-2005-default-binding-mode
/
reset-mode.rs
blob: 3b9d07610d29aa7792b0fa71961521548f6a968c [
file
] [
log
] [
blame
]
// run-pass
// Test that we "reset" the mode as we pass through a `&` pattern.
//
// cc #46688
fn
surprise
(
x
:
i32
)
{
assert_eq
!(
x
,
2
);
}
fn
main
()
{
let
x
=
&(
1
,
&
2
);
let
(
_
,
&
b
)
=
x
;
surprise
(
b
);
}