rust
rust copied to clipboard
compiletest allows incomplete error messages
For example, the test still pass with the following change:
--- a/src/test/compile-fail/assign-imm-local-twice.rs
+++ b/src/test/compile-fail/assign-imm-local-twice.rs
@@ -12,7 +12,7 @@ fn test() {
let v: int;
v = 1; //~ NOTE prior assignment occurs here
debug!("v=%d", v);
- v = 2; //~ ERROR re-assignment of immutable variable
+ v = 2; //~ ERROR re
debug!("v=%d", v);
}
@sammykim this is intentional, it's to allow as much or as little of the error needs to be specified, at the developer's discression. Closing.