From 1f810027577461d516297a3cce6f42a201f24a6a Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Fri, 24 Jul 2015 11:02:26 +0200 Subject: [PATCH] Improve error explanation --- src/librustc_resolve/diagnostics.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/librustc_resolve/diagnostics.rs b/src/librustc_resolve/diagnostics.rs index 8a5f78fc811f..d3ec6e558b9e 100644 --- a/src/librustc_resolve/diagnostics.rs +++ b/src/librustc_resolve/diagnostics.rs @@ -410,10 +410,10 @@ match 0 { } ``` -The compiler needs to know the value of the pattern at compile time, -which is not possible with a `static` variable. Please verify that the -variable is spelled correctly and if so, try to use a `const` instead. -Example: +The compiler needs to know the value of the pattern at compile time; +compile-time patterns can defined via const or enum items. Please verify +that the identifier is spelled correctly, and if so, use a const instead +of static to define it. Example: ``` const FOO : i32 = 0;