| error[E0019]: constant function contains unimplemented expression type |
| --> $DIR/const_let_assign3.rs:9:9 |
| | |
| LL | self.state = x; |
| | ^^^^^^^^^^^^^^ |
| |
| error[E0017]: references in constants may only refer to immutable values |
| --> $DIR/const_let_assign3.rs:16:5 |
| | |
| LL | s.foo(3); |
| | ^ constants require immutable values |
| |
| error[E0017]: references in constants may only refer to immutable values |
| --> $DIR/const_let_assign3.rs:22:13 |
| | |
| LL | let y = &mut x; |
| | ^^^^^^ constants require immutable values |
| |
| error[E0019]: constant contains unimplemented expression type |
| --> $DIR/const_let_assign3.rs:24:5 |
| | |
| LL | *y = 42; |
| | ^^^^^^^ |
| |
| error: aborting due to 4 previous errors |
| |
| Some errors have detailed explanations: E0017, E0019. |
| For more information about an error, try `rustc --explain E0017`. |