summary refs log tree commit diff
path: root/src/test/ui/error-codes/E0302.stderr
blob: a077fcaea4101c8a3cf36f512157928fbc5b5e83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
error[E0302]: cannot assign in a pattern guard
  --> $DIR/E0302.rs:4:21
   |
LL |         option if { option = None; false } => { },
   |                     ^^^^^^^^^^^^^ assignment in pattern guard

error[E0594]: cannot assign to `option`, as it is immutable for the pattern guard
  --> $DIR/E0302.rs:4:21
   |
LL |         option if { option = None; false } => { },
   |                     ^^^^^^^^^^^^^ cannot assign
   |
   = note: variables bound in patterns are immutable until the end of the pattern guard

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0302`.