Sign in
rust
/
rust
/
08650fbb506c44fbc95d91abfb7cd95a56bbff30
/
.
/
src
/
test
/
ui
/
let-else
/
let-else-binding-immutable.rs
blob: 96de0ffe26e6b4c05a7a4b6a7807a750268a5529 [
file
]
// from rfc2005 test suite
#![
feature
(
let_else
)]
pub
fn
main
()
{
let
Some
(
x
)
=
&
Some
(
3
)
else
{
panic
!();
};
*
x
+=
1
;
//~ ERROR: cannot assign to `*x`, which is behind a `&` reference
}