2018-11-24 13:38:31 +00:00
|
|
|
error[E0019]: constant function contains unimplemented expression type
|
2018-12-28 19:05:22 +00:00
|
|
|
--> $DIR/const_let_assign3.rs:9:9
|
2018-11-24 13:38:31 +00:00
|
|
|
|
|
|
|
|
LL | self.state = x;
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
2018-11-19 10:19:14 +00:00
|
|
|
error[E0017]: references in constants may only refer to immutable values
|
2018-12-28 19:05:22 +00:00
|
|
|
--> $DIR/const_let_assign3.rs:16:5
|
2018-11-19 10:19:14 +00:00
|
|
|
|
|
|
|
|
LL | s.foo(3); //~ ERROR references in constants may only refer to immutable values
|
|
|
|
| ^ constants require immutable values
|
|
|
|
|
2018-12-28 19:05:22 +00:00
|
|
|
error[E0017]: references in constants may only refer to immutable values
|
2018-12-30 18:20:53 +00:00
|
|
|
--> $DIR/const_let_assign3.rs:22:13
|
2018-12-28 19:05:22 +00:00
|
|
|
|
|
2018-12-30 18:20:53 +00:00
|
|
|
LL | let y = &mut x;
|
|
|
|
| ^^^^^^ constants require immutable values
|
2018-12-28 19:05:22 +00:00
|
|
|
|
|
|
|
error[E0019]: constant contains unimplemented expression type
|
2018-12-30 18:20:53 +00:00
|
|
|
--> $DIR/const_let_assign3.rs:24:5
|
2018-12-28 19:05:22 +00:00
|
|
|
|
|
2018-12-30 18:20:53 +00:00
|
|
|
LL | *y = 42;
|
|
|
|
| ^^^^^^^
|
2018-12-28 19:05:22 +00:00
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
2018-11-19 10:19:14 +00:00
|
|
|
|
2018-11-24 13:38:31 +00:00
|
|
|
Some errors occurred: E0017, E0019.
|
|
|
|
For more information about an error, try `rustc --explain E0017`.
|