Skip to content

Commit 1f81002

Browse files
Improve error explanation
1 parent 0efc7f1 commit 1f81002

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/librustc_resolve/diagnostics.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -410,10 +410,10 @@ match 0 {
410410
}
411411
```
412412
413-
The compiler needs to know the value of the pattern at compile time,
414-
which is not possible with a `static` variable. Please verify that the
415-
variable is spelled correctly and if so, try to use a `const` instead.
416-
Example:
413+
The compiler needs to know the value of the pattern at compile time;
414+
compile-time patterns can defined via const or enum items. Please verify
415+
that the identifier is spelled correctly, and if so, use a const instead
416+
of static to define it. Example:
417417
418418
```
419419
const FOO : i32 = 0;

0 commit comments

Comments
 (0)