E3079 Types Errors
Types
cannot take a mutable reference to a const variable; declare the reference as 'const', or copy() the value to get an independent mutable instance
When this occurs
This error is triggered when: cannot take a mutable reference to a const variable; declare the reference as 'const', or copy() the value to get an independent mutable instance
Example error message
error[E3079]:
cannot take a mutable reference to a const variable; declare the reference as 'const', or copy() the value to get an independent mutable instance
How to fix
Review the error message and check your code at the indicated location. The message describes what went wrong — fix the underlying issue it identifies.
Related errors
No related errors.