Update diagnostics.rs
This commit is contained in:
parent
42c5c982c4
commit
dbfc8c5a07
1 changed files with 3 additions and 3 deletions
|
@ -177,9 +177,9 @@ the heap at runtime, and therefore cannot be done at compile time.
|
|||
"##,
|
||||
|
||||
E0011: r##"
|
||||
Using a user-defined operator on const/static variable is restricted to what
|
||||
can be evaluated at compile-time. Using an user-defined operator could call a
|
||||
user-defined function, which is not allowed.
|
||||
Initializers for constants and statics are evaluated at compile time.
|
||||
User-defined operators rely on user-defined functions, which cannot be evaluated
|
||||
at compile time.
|
||||
|
||||
Bad example:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue