diff options
| author | Gareth Daniel Smith <garethdanielsmith@gmail.com> | 2012-06-30 12:23:59 +0100 |
|---|---|---|
| committer | Gareth Daniel Smith <garethdanielsmith@gmail.com> | 2012-06-30 12:23:59 +0100 |
| commit | 6d86969260b73432c96b9a63a5a68559e56aabcd (patch) | |
| tree | cab3c2f26893cc496933d1b10b87a5ead5e4b5cc | |
| parent | 0b653ab9539140bb04941de9a36c03cf10bfc28b (diff) | |
| download | rust-6d86969260b73432c96b9a63a5a68559e56aabcd.tar.gz rust-6d86969260b73432c96b9a63a5a68559e56aabcd.zip | |
change the test suite `//! kind` syntax to `//~ kind` in order to avoid a
conflict with the new single-line-sugared-inner-doc-comment (`//! ...`).
253 files changed, 596 insertions, 596 deletions
diff --git a/src/compiletest/errors.rs b/src/compiletest/errors.rs index 5d1bba368d4..83ce87b61e7 100644 --- a/src/compiletest/errors.rs +++ b/src/compiletest/errors.rs @@ -21,14 +21,14 @@ fn load_errors(testfile: str) -> [expected_error]/~ { } fn parse_expected(line_num: uint, line: str) -> [expected_error]/~ unsafe { - let error_tag = "//!"; + let error_tag = "//~"; let mut idx; alt str::find_str(line, error_tag) { option::none { ret []/~; } option::some(nn) { idx = (nn as uint) + str::len(error_tag); } } - // "//!^^^ kind msg" denotes a message expected + // "//~^^^ kind msg" denotes a message expected // three lines above current line: let mut adjust_line = 0u; let len = str::len(line); diff --git a/src/test/compile-fail/alt-join.rs b/src/test/compile-fail/alt-join.rs index bc1357372b0..cd39d90b9bd 100644 --- a/src/test/compile-fail/alt-join.rs +++ b/src/test/compile-fail/alt-join.rs @@ -6,6 +6,6 @@ fn my_fail() -> ! { fail; } fn main() { alt true { false { my_fail(); } true { } } - log(debug, x); //! ERROR unresolved name: x + log(debug, x); //~ ERROR unresolved name: x let x: int; } diff --git a/src/test/compile-fail/alt-pattern-field-mismatch-2.rs b/src/test/compile-fail/alt-pattern-field-mismatch-2.rs index 75e0763e4a6..b8d4dab9539 100644 --- a/src/test/compile-fail/alt-pattern-field-mismatch-2.rs +++ b/src/test/compile-fail/alt-pattern-field-mismatch-2.rs @@ -10,7 +10,7 @@ fn main() { rgb(_, _, _) { } cmyk(_, _, _, _) { } no_color(_) { } - //!^ ERROR this pattern has 1 field, but the corresponding variant has no fields + //~^ ERROR this pattern has 1 field, but the corresponding variant has no fields } } } diff --git a/src/test/compile-fail/alt-pattern-field-mismatch.rs b/src/test/compile-fail/alt-pattern-field-mismatch.rs index 086267a85b3..2e24f6a5c89 100644 --- a/src/test/compile-fail/alt-pattern-field-mismatch.rs +++ b/src/test/compile-fail/alt-pattern-field-mismatch.rs @@ -8,7 +8,7 @@ fn main() { fn foo(c: color) { alt c { rgb(_, _) { } - //!^ ERROR this pattern has 2 fields, but the corresponding variant has 3 fields + //~^ ERROR this pattern has 2 fields, but the corresponding variant has 3 fields cmyk(_, _, _, _) { } no_color { } } diff --git a/src/test/compile-fail/ambig_impl_1.rs b/src/test/compile-fail/ambig_impl_1.rs index 0eed1c8f89f..51247c7e8e9 100644 --- a/src/test/compile-fail/ambig_impl_1.rs +++ b/src/test/compile-fail/ambig_impl_1.rs @@ -1,3 +1,3 @@ -impl methods1 for uint { fn me() -> uint { self } } //! NOTE candidate #1 is `methods1::me` -impl methods2 for uint { fn me() -> uint { self } } //! NOTE candidate #2 is `methods2::me` -fn main() { 1u.me(); } //! ERROR multiple applicable methods in scope +impl methods1 for uint { fn me() -> uint { self } } //~ NOTE candidate #1 is `methods1::me` +impl methods2 for uint { fn me() -> uint { self } } //~ NOTE candidate #2 is `methods2::me` +fn main() { 1u.me(); } //~ ERROR multiple applicable methods in scope diff --git a/src/test/compile-fail/ambig_impl_2_exe.rs b/src/test/compile-fail/ambig_impl_2_exe.rs index 5bd20db144f..7cb79ff789e 100644 --- a/src/test/compile-fail/ambig_impl_2_exe.rs +++ b/src/test/compile-fail/ambig_impl_2_exe.rs @@ -2,6 +2,6 @@ // aux-build:ambig_impl_2_lib.rs use ambig_impl_2_lib; import ambig_impl_2_lib::methods1; -impl methods2 for uint { fn me() -> uint { self } } //! NOTE candidate #2 is `methods2::me` -fn main() { 1u.me(); } //! ERROR multiple applicable methods in scope -//!^ NOTE candidate #1 is `ambig_impl_2_lib::methods1::me` +impl methods2 for uint { fn me() -> uint { self } } //~ NOTE candidate #2 is `methods2::me` +fn main() { 1u.me(); } //~ ERROR multiple applicable methods in scope +//~^ NOTE candidate #1 is `ambig_impl_2_lib::methods1::me` diff --git a/src/test/compile-fail/ambig_impl_bounds.rs b/src/test/compile-fail/ambig_impl_bounds.rs index d14e57a21f4..9d7a9634a07 100644 --- a/src/test/compile-fail/ambig_impl_bounds.rs +++ b/src/test/compile-fail/ambig_impl_bounds.rs @@ -2,9 +2,9 @@ iface A { fn foo(); } iface B { fn foo(); } fn foo<T: A B>(t: T) { - t.foo(); //! ERROR multiple applicable methods in scope - //!^ NOTE candidate #1 derives from the bound `A` - //!^^ NOTE candidate #2 derives from the bound `B` + t.foo(); //~ ERROR multiple applicable methods in scope + //~^ NOTE candidate #1 derives from the bound `A` + //~^^ NOTE candidate #2 derives from the bound `B` } fn main() {} \ No newline at end of file diff --git a/src/test/compile-fail/ambig_impl_unify.rs b/src/test/compile-fail/ambig_impl_unify.rs index 038ade94bd4..4a0d4f259dd 100644 --- a/src/test/compile-fail/ambig_impl_unify.rs +++ b/src/test/compile-fail/ambig_impl_unify.rs @@ -1,12 +1,12 @@ impl methods for [uint]/~ { - fn foo() -> int {1} //! NOTE candidate #1 is `methods::foo` + fn foo() -> int {1} //~ NOTE candidate #1 is `methods::foo` } impl methods for [int]/~ { - fn foo() -> int {2} //! NOTE candidate #2 is `methods::foo` + fn foo() -> int {2} //~ NOTE candidate #2 is `methods::foo` } fn main() { let x = []/~; - x.foo(); //! ERROR multiple applicable methods in scope + x.foo(); //~ ERROR multiple applicable methods in scope } \ No newline at end of file diff --git a/src/test/compile-fail/assign-imm-local-twice.rs b/src/test/compile-fail/assign-imm-local-twice.rs index 7472ebe7eff..54b130ae26f 100644 --- a/src/test/compile-fail/assign-imm-local-twice.rs +++ b/src/test/compile-fail/assign-imm-local-twice.rs @@ -1,8 +1,8 @@ fn test() { let v: int; - v = 1; //! NOTE prior assignment occurs here + v = 1; //~ NOTE prior assignment occurs here #debug["v=%d", v]; - v = 2; //! ERROR re-assignment of immutable variable + v = 2; //~ ERROR re-assignment of immutable variable #debug["v=%d", v]; } diff --git a/src/test/compile-fail/assign-super.rs b/src/test/compile-fail/assign-super.rs index 70532cef3ae..a7cb5b38970 100644 --- a/src/test/compile-fail/assign-super.rs +++ b/src/test/compile-fail/assign-super.rs @@ -1,5 +1,5 @@ fn main() { let mut x: [mut int]/~ = [mut 3]/~; let y: [int]/~ = [3]/~; - x = y; //! ERROR values differ in mutability + x = y; //~ ERROR values differ in mutability } \ No newline at end of file diff --git a/src/test/compile-fail/assign-to-method.rs b/src/test/compile-fail/assign-to-method.rs index f7577d21c7e..772a3a945fd 100644 --- a/src/test/compile-fail/assign-to-method.rs +++ b/src/test/compile-fail/assign-to-method.rs @@ -11,5 +11,5 @@ class cat { fn main() { let nyan : cat = cat(52u, 99); - nyan.speak = fn@() { #debug["meow"]; }; //! ERROR assigning to method + nyan.speak = fn@() { #debug["meow"]; }; //~ ERROR assigning to method } diff --git a/src/test/compile-fail/attempted-access-non-fatal.rs b/src/test/compile-fail/attempted-access-non-fatal.rs index 7ead10b3f63..a4183ec310f 100644 --- a/src/test/compile-fail/attempted-access-non-fatal.rs +++ b/src/test/compile-fail/attempted-access-non-fatal.rs @@ -1,6 +1,6 @@ // Check that bogus field access is non-fatal fn main() { let x = 0; - log(debug, x.foo); //! ERROR attempted access of field - log(debug, x.bar); //! ERROR attempted access of field + log(debug, x.foo); //~ ERROR attempted access of field + log(debug, x.bar); //~ ERROR attempted access of field } \ No newline at end of file diff --git a/src/test/compile-fail/attr-before-ext.rs b/src/test/compile-fail/attr-before-ext.rs index 8409ab8ef52..2f4b8111bc9 100644 --- a/src/test/compile-fail/attr-before-ext.rs +++ b/src/test/compile-fail/attr-before-ext.rs @@ -1,4 +1,4 @@ fn main() { #[attr] - #debug("hi"); //! ERROR expected item + #debug("hi"); //~ ERROR expected item } \ No newline at end of file diff --git a/src/test/compile-fail/attr-before-let.rs b/src/test/compile-fail/attr-before-let.rs index 814ad400d6b..f99170e654d 100644 --- a/src/test/compile-fail/attr-before-let.rs +++ b/src/test/compile-fail/attr-before-let.rs @@ -1,4 +1,4 @@ fn main() { #[attr] - let _i = 0; //! ERROR expected item + let _i = 0; //~ ERROR expected item } \ No newline at end of file diff --git a/src/test/compile-fail/bad-bang-ann-3.rs b/src/test/compile-fail/bad-bang-ann-3.rs index bab121bd6d3..3a88afd5346 100644 --- a/src/test/compile-fail/bad-bang-ann-3.rs +++ b/src/test/compile-fail/bad-bang-ann-3.rs @@ -3,7 +3,7 @@ fn bad_bang(i: uint) -> ! { ret 7u; - //!^ ERROR expected `_|_` but found `uint` + //~^ ERROR expected `_|_` but found `uint` } fn main() { bad_bang(5u); } diff --git a/src/test/compile-fail/bad-bang-ann.rs b/src/test/compile-fail/bad-bang-ann.rs index b6e2dea4e5a..a2ad98df959 100644 --- a/src/test/compile-fail/bad-bang-ann.rs +++ b/src/test/compile-fail/bad-bang-ann.rs @@ -3,7 +3,7 @@ fn bad_bang(i: uint) -> ! { if i < 0u { } else { fail; } - //!^ ERROR expected `_|_` but found `()` + //~^ ERROR expected `_|_` but found `()` } fn main() { bad_bang(5u); } diff --git a/src/test/compile-fail/bad-for-loop.rs b/src/test/compile-fail/bad-for-loop.rs index a28d893b97e..5808fcbb161 100644 --- a/src/test/compile-fail/bad-for-loop.rs +++ b/src/test/compile-fail/bad-for-loop.rs @@ -1,4 +1,4 @@ fn main() { fn baz(_x: fn() -> int) {} - for baz {|_e| } //! ERROR should return `bool` + for baz {|_e| } //~ ERROR should return `bool` } diff --git a/src/test/compile-fail/bad-method-typaram-kind.rs b/src/test/compile-fail/bad-method-typaram-kind.rs index 55b259daf1e..9934702fdea 100644 --- a/src/test/compile-fail/bad-method-typaram-kind.rs +++ b/src/test/compile-fail/bad-method-typaram-kind.rs @@ -1,5 +1,5 @@ fn foo<T>() { - 1u.bar::<T>(); //! ERROR: missing `copy` + 1u.bar::<T>(); //~ ERROR: missing `copy` } impl methods for uint { diff --git a/src/test/compile-fail/bad-value-ident-false.rs b/src/test/compile-fail/bad-value-ident-false.rs index fa744c6823d..9498f1c341f 100644 --- a/src/test/compile-fail/bad-value-ident-false.rs +++ b/src/test/compile-fail/bad-value-ident-false.rs @@ -1,2 +1,2 @@ -fn false() { } //! ERROR found `false` in restricted position +fn false() { } //~ ERROR found `false` in restricted position fn main() { } \ No newline at end of file diff --git a/src/test/compile-fail/bad-value-ident-true.rs b/src/test/compile-fail/bad-value-ident-true.rs index 9a4a155c97d..96f172b3285 100644 --- a/src/test/compile-fail/bad-value-ident-true.rs +++ b/src/test/compile-fail/bad-value-ident-true.rs @@ -1,2 +1,2 @@ -fn true() { } //! ERROR found `true` in restricted position +fn true() { } //~ ERROR found `true` in restricted position fn main() { } \ No newline at end of file diff --git a/src/test/compile-fail/bad-var-env-capture-in-block-arg.rs b/src/test/compile-fail/bad-var-env-capture-in-block-arg.rs index 7cd084c2d7f..21c9d7203ed 100644 --- a/src/test/compile-fail/bad-var-env-capture-in-block-arg.rs +++ b/src/test/compile-fail/bad-var-env-capture-in-block-arg.rs @@ -2,6 +2,6 @@ fn main() { let x = 3; fn blah(_a: native fn()) {} blah({|| - log(debug, x); //! ERROR attempted dynamic environment capture + log(debug, x); //~ ERROR attempted dynamic environment capture }); } \ No newline at end of file diff --git a/src/test/compile-fail/bang-tailexpr.rs b/src/test/compile-fail/bang-tailexpr.rs index 83909b6753f..f3d78f2f6c2 100644 --- a/src/test/compile-fail/bang-tailexpr.rs +++ b/src/test/compile-fail/bang-tailexpr.rs @@ -1,4 +1,4 @@ fn f() -> ! { - 3i //! ERROR expected `_|_` but found `int` + 3i //~ ERROR expected `_|_` but found `int` } fn main() { } diff --git a/src/test/compile-fail/binop-typeck.rs b/src/test/compile-fail/binop-typeck.rs index e2669be751b..f48734a48f9 100644 --- a/src/test/compile-fail/binop-typeck.rs +++ b/src/test/compile-fail/binop-typeck.rs @@ -4,5 +4,5 @@ fn main() { let x = true; let y = 1; let z = x + y; - //!^ ERROR binary operation + cannot be applied to type `bool` + //~^ ERROR binary operation + cannot be applied to type `bool` } diff --git a/src/test/compile-fail/block-arg-as-stmt-with-value.rs b/src/test/compile-fail/block-arg-as-stmt-with-value.rs index 76519ff6dad..e89a10a1246 100644 --- a/src/test/compile-fail/block-arg-as-stmt-with-value.rs +++ b/src/test/compile-fail/block-arg-as-stmt-with-value.rs @@ -3,7 +3,7 @@ fn compute1() -> float { let v = [0f, 1f, 2f, 3f]/~; vec::foldl(0f, v) { |x, y| x + y } - 10f - //!^ ERROR mismatched types: expected `()` + //~^ ERROR mismatched types: expected `()` } fn main() { diff --git a/src/test/compile-fail/block-coerce-no-2.rs b/src/test/compile-fail/block-coerce-no-2.rs index 613d1c0028c..780a91b664c 100644 --- a/src/test/compile-fail/block-coerce-no-2.rs +++ b/src/test/compile-fail/block-coerce-no-2.rs @@ -9,5 +9,5 @@ fn main() { } f(g); - //!^ ERROR mismatched types: expected `extern fn(extern fn(extern fn()))` + //~^ ERROR mismatched types: expected `extern fn(extern fn(extern fn()))` } diff --git a/src/test/compile-fail/block-coerce-no.rs b/src/test/compile-fail/block-coerce-no.rs index b544c58e670..45298ccaf8e 100644 --- a/src/test/compile-fail/block-coerce-no.rs +++ b/src/test/compile-fail/block-coerce-no.rs @@ -6,7 +6,7 @@ fn coerce(b: fn()) -> native fn() { g: fn()) -> native fn() { ret f(g); } fn fn_id(f: native fn()) -> native fn() { ret f } ret lol(fn_id, b); - //!^ ERROR mismatched types: expected `extern fn(fn()) -> extern fn()` + //~^ ERROR mismatched types: expected `extern fn(fn()) -> extern fn()` } fn main() { diff --git a/src/test/compile-fail/borrowck-assign-comp-idx.rs b/src/test/compile-fail/borrowck-assign-comp-idx.rs index e2a7610ddc6..accd228dc03 100644 --- a/src/test/compile-fail/borrowck-assign-comp-idx.rs +++ b/src/test/compile-fail/borrowck-assign-comp-idx.rs @@ -4,9 +4,9 @@ fn a() { let mut p = [mut 1]/~; // Create an immutable pointer into p's contents: - let _q: &int = &p[0]; //! NOTE loan of mutable vec content granted here + let _q: &int = &p[0]; //~ NOTE loan of mutable vec content granted here - p[0] = 5; //! ERROR assigning to mutable vec content prohibited due to outstanding loan + p[0] = 5; //~ ERROR assigning to mutable vec content prohibited due to outstanding loan } fn borrow(_x: [int]/&, _f: fn()) {} @@ -17,8 +17,8 @@ fn b() { let mut p = [mut 1]/~; - borrow(p) {|| //! NOTE loan of mutable vec content granted here - p[0] = 5; //! ERROR assigning to mutable vec content prohibited due to outstanding loan + borrow(p) {|| //~ NOTE loan of mutable vec content granted here + p[0] = 5; //~ ERROR assigning to mutable vec content prohibited due to outstanding loan } } diff --git a/src/test/compile-fail/borrowck-assign-comp.rs b/src/test/compile-fail/borrowck-assign-comp.rs index 2e045b84c60..55a29393cae 100644 --- a/src/test/compile-fail/borrowck-assign-comp.rs +++ b/src/test/compile-fail/borrowck-assign-comp.rs @@ -2,12 +2,12 @@ type point = { x: int, y: int }; fn a() { let mut p = {x: 3, y: 4}; - let _q = &p; //! NOTE loan of mutable local variable granted here + let _q = &p; //~ NOTE loan of mutable local variable granted here // This assignment is illegal because the field x is not // inherently mutable; since `p` was made immutable, `p.x` is now // immutable. Otherwise the type of &_q.x (&int) would be wrong. - p.x = 5; //! ERROR assigning to mutable field prohibited due to outstanding loan + p.x = 5; //~ ERROR assigning to mutable field prohibited due to outstanding loan } fn b() { @@ -24,8 +24,8 @@ fn c() { // and then try to overwrite `p` as a whole. let mut p = {x: 3, mut y: 4}; - let _q = &p.y; //! NOTE loan of mutable local variable granted here - p = {x: 5, mut y: 7};//! ERROR assigning to mutable local variable prohibited due to outstanding loan + let _q = &p.y; //~ NOTE loan of mutable local variable granted here + p = {x: 5, mut y: 7};//~ ERROR assigning to mutable local variable prohibited due to outstanding loan copy p; } @@ -34,8 +34,8 @@ fn d() { // address of a subcomponent and then modify that subcomponent: let mut p = {x: 3, mut y: 4}; - let _q = &p.y; //! NOTE loan of mutable field granted here - p.y = 5; //! ERROR assigning to mutable field prohibited due to outstanding loan + let _q = &p.y; //~ NOTE loan of mutable field granted here + p.y = 5; //~ ERROR assigning to mutable field prohibited due to outstanding loan copy p; } diff --git a/src/test/compile-fail/borrowck-assign-to-constants.rs b/src/test/compile-fail/borrowck-assign-to-constants.rs index 59ced0275c0..44ca3b043db 100644 --- a/src/test/compile-fail/borrowck-assign-to-constants.rs +++ b/src/test/compile-fail/borrowck-assign-to-constants.rs @@ -2,6 +2,6 @@ const foo: int = 5; fn main() { // assigning to various global constants - none = some(3); //! ERROR assigning to static item - foo = 6; //! ERROR assigning to static item + none = some(3); //~ ERROR assigning to static item + foo = 6; //~ ERROR assigning to static item } \ No newline at end of file diff --git a/src/test/compile-fail/borrowck-assign-to-enum.rs b/src/test/compile-fail/borrowck-assign-to-enum.rs index 927bcfdc85e..d7770a30d75 100644 --- a/src/test/compile-fail/borrowck-assign-to-enum.rs +++ b/src/test/compile-fail/borrowck-assign-to-enum.rs @@ -2,5 +2,5 @@ enum foo = int; fn main() { let x = foo(3); - *x = 4; //! ERROR assigning to enum content + *x = 4; //~ ERROR assigning to enum content } \ No newline at end of file diff --git a/src/test/compile-fail/borrowck-assign-to-subfield.rs b/src/test/compile-fail/borrowck-assign-to-subfield.rs index 275d8ed7e70..8a14efc09a6 100644 --- a/src/test/compile-fail/borrowck-assign-to-subfield.rs +++ b/src/test/compile-fail/borrowck-assign-to-subfield.rs @@ -14,7 +14,7 @@ fn main() { // in these cases we pass through a box, so the mut // of the box is dominant - p.x.a = 2; //! ERROR assigning to immutable field - p.y.a = 2; //! ERROR assigning to const field + p.x.a = 2; //~ ERROR assigning to immutable field + p.y.a = 2; //~ ERROR assigning to const field p.z.a = 2; } \ No newline at end of file diff --git a/src/test/compile-fail/borrowck-binding-mutbl.rs b/src/test/compile-fail/borrowck-binding-mutbl.rs index 0da9a8a860f..d3de94942ed 100644 --- a/src/test/compile-fail/borrowck-binding-mutbl.rs +++ b/src/test/compile-fail/borrowck-binding-mutbl.rs @@ -6,8 +6,8 @@ fn main() { alt x { {f: v} => { - impure(v); //! ERROR illegal borrow unless pure: unique value in aliasable, mutable location - //!^ NOTE impure due to access to impure function + impure(v); //~ ERROR illegal borrow unless pure: unique value in aliasable, mutable location + //~^ NOTE impure due to access to impure function } } } \ No newline at end of file diff --git a/src/test/compile-fail/borrowck-issue-2657-1.rs b/src/test/compile-fail/borrowck-issue-2657-1.rs index 00c579dc45e..520ae1bf646 100644 --- a/src/test/compile-fail/borrowck-issue-2657-1.rs +++ b/src/test/compile-fail/borrowck-issue-2657-1.rs @@ -1,8 +1,8 @@ fn main() { let x = some(~1); -alt x { //! NOTE loan of immutable local variable granted here +alt x { //~ NOTE loan of immutable local variable granted here some(y) { - let _a <- x; //! ERROR moving out of immutable local variable prohibited due to outstanding loan + let _a <- x; //~ ERROR moving out of immutable local variable prohibited due to outstanding loan } _ {} } diff --git a/src/test/compile-fail/borrowck-issue-2657-2.rs b/src/test/compile-fail/borrowck-issue-2657-2.rs index d8d068ee8fd..07e4ca8229b 100644 --- a/src/test/compile-fail/borrowck-issue-2657-2.rs +++ b/src/test/compile-fail/borrowck-issue-2657-2.rs @@ -2,7 +2,7 @@ fn main() { let x = some(~1); alt x { some(y) { - let _b <- y; //! ERROR moving out of pattern binding + let _b <- y; //~ ERROR moving out of pattern binding } _ {} } diff --git a/src/test/compile-fail/borrowck-lend-args.rs b/src/test/compile-fail/borrowck-lend-args.rs index ef8914b134f..4fbc51183ce 100644 --- a/src/test/compile-fail/borrowck-lend-args.rs +++ b/src/test/compile-fail/borrowck-lend-args.rs @@ -5,8 +5,8 @@ fn borrow_from_arg_imm_ref(&&v: ~int) { } fn borrow_from_arg_mut_ref(&v: ~int) { - borrow(v); //! ERROR illegal borrow unless pure: unique value in aliasable, mutable location - //!^ NOTE impure due to access to impure function + borrow(v); //~ ERROR illegal borrow unless pure: unique value in aliasable, mutable location + //~^ NOTE impure due to access to impure function } fn borrow_from_arg_move(-v: ~int) { diff --git a/src/test/compile-fail/borrowck-lend-flow.rs b/src/test/compile-fail/borrowck-lend-flow.rs index b4d81aa09ae..26618d3436e 100644 --- a/src/test/compile-fail/borrowck-lend-flow.rs +++ b/src/test/compile-fail/borrowck-lend-flow.rs @@ -19,23 +19,23 @@ fn post_aliased_const() { fn post_aliased_mut() { // SPURIOUS--flow let mut v = ~3; - borrow(v); //! ERROR loan of mutable local variable as immutable conflicts with prior loan - let _w = &mut v; //! NOTE prior loan as mutable granted here + borrow(v); //~ ERROR loan of mutable local variable as immutable conflicts with prior loan + let _w = &mut v; //~ NOTE prior loan as mutable granted here } fn post_aliased_scope(cond: bool) { // NDM--scope of & let mut v = ~3; - borrow(v); //! ERROR loan of mutable local variable as immutable conflicts with prior loan - if cond { inc(&mut v); } //! NOTE prior loan as mutable granted here + borrow(v); //~ ERROR loan of mutable local variable as immutable conflicts with prior loan + if cond { inc(&mut v); } //~ NOTE prior loan as mutable granted here } fn loop_aliased_mut() { let mut v = ~3, w = ~4; let mut _x = &mut w; loop { - borrow(v); //! ERROR loan of mutable local variable as immutable conflicts with prior loan - _x = &mut v; //! NOTE prior loan as mutable granted here + borrow(v); //~ ERROR loan of mutable local variable as immutable conflicts with prior loan + _x = &mut v; //~ NOTE prior loan as mutable granted here } } @@ -43,8 +43,8 @@ fn while_aliased_mut(cond: bool) { let mut v = ~3, w = ~4; let mut _x = &mut w; while cond { - borrow(v); //! ERROR loan of mutable local variable as immutable conflicts with prior loan - _x = &mut v; //! NOTE prior loan as mutable granted here + borrow(v); //~ ERROR loan of mutable local variable as immutable conflicts with prior loan + _x = &mut v; //~ NOTE prior loan as mutable granted here } } @@ -52,9 +52,9 @@ fn while_aliased_mut_cond(cond: bool, cond2: bool) { let mut v = ~3, w = ~4; let mut _x = &mut w; while cond { - borrow(v); //! ERROR loan of mutable local variable as immutable conflicts with prior loan + borrow(v); //~ ERROR loan of mutable local variable as immutable conflicts with prior loan if cond2 { - _x = &mut v; //! NOTE prior loan as mutable granted here + _x = &mut v; //~ NOTE prior loan as mutable granted here } } } @@ -63,8 +63,8 @@ fn loop_in_block() { let mut v = ~3, w = ~4; let mut _x = &mut w; for uint::range(0u, 10u) {|_i| - borrow(v); //! ERROR loan of mutable variable declared in an outer block as immutable conflicts with prior loan - _x = &mut v; //! NOTE prior loan as mutable granted here + borrow(v); //~ ERROR loan of mutable variable declared in an outer block as immutable conflicts with prior loan + _x = &mut v; //~ NOTE prior loan as mutable granted here } } @@ -77,8 +77,8 @@ fn at_most_once_block() { let mut v = ~3, w = ~4; let mut _x = &mut w; at_most_once {|| - borrow(v); //! ERROR loan of mutable variable declared in an outer block as immutable conflicts with prior loan - _x = &mut v; //! NOTE prior loan as mutable granted here + borrow(v); //~ ERROR loan of mutable variable declared in an outer block as immutable conflicts with prior loan + _x = &mut v; //~ NOTE prior loan as mutable granted here } } diff --git a/src/test/compile-fail/borrowck-loan-blocks-move-cc.rs b/src/test/compile-fail/borrowck-loan-blocks-move-cc.rs index 0862af2e6fa..78a4de4fc19 100644 --- a/src/test/compile-fail/borrowck-loan-blocks-move-cc.rs +++ b/src/test/compile-fail/borrowck-loan-blocks-move-cc.rs @@ -4,16 +4,16 @@ fn borrow(v: &int, f: fn(x: &int)) { fn box_imm() { let mut v = ~3; - let _w = &mut v; //! NOTE loan of mutable local variable granted here + let _w = &mut v; //~ NOTE loan of mutable local variable granted here task::spawn { |move v| - //!^ ERROR moving out of mutable local variable prohibited due to outstanding loan + //~^ ERROR moving out of mutable local variable prohibited due to outstanding loan #debug["v=%d", *v]; } let mut v = ~3; - let _w = &mut v; //! NOTE loan of mutable local variable granted here + let _w = &mut v; //~ NOTE loan of mutable local variable granted here task::spawn(fn~(move v) { - //!^ ERROR moving out of mutable local variable prohibited due to outstanding loan + //~^ ERROR moving out of mutable local variable prohibited due to outstanding loan #debug["v=%d", *v]; }); } diff --git a/src/test/compile-fail/borrowck-loan-blocks-move.rs b/src/test/compile-fail/borrowck-loan-blocks-move.rs index b5044754ac0..5cecbf9284f 100644 --- a/src/test/compile-fail/borrowck-loan-blocks-move.rs +++ b/src/test/compile-fail/borrowck-loan-blocks-move.rs @@ -3,8 +3,8 @@ fn take(-_v: ~int) { fn box_imm() { let v = ~3; - let _w = &v; //! NOTE loan of immutable local variable granted here - take(v); //! ERROR moving out of immutable local variable prohibited due to outstanding loan + let _w = &v; //~ NOTE loan of immutable local variable granted here + take(v); //~ ERROR moving out of immutable local variable prohibited due to outstanding loan } fn main() { diff --git a/src/test/compile-fail/borrowck-loan-blocks-mut-uniq.rs b/src/test/compile-fail/borrowck-loan-blocks-mut-uniq.rs index a09d2e7a71b..ffed2371334 100644 --- a/src/test/compile-fail/borrowck-loan-blocks-mut-uniq.rs +++ b/src/test/compile-fail/borrowck-loan-blocks-mut-uniq.rs @@ -4,8 +4,8 @@ fn borrow(v: &int, f: fn(x: &int)) { fn box_imm() { let mut v = ~3; - borrow(v) { |w| //! NOTE loan of mutable local variable granted here - v = ~4; //! ERROR assigning to mutable variable declared in an outer block prohibited due to outstanding loan + borrow(v) { |w| //~ NOTE loan of mutable local variable granted here + v = ~4; //~ ERROR assigning to mutable variable declared in an outer block prohibited due to outstanding loan assert *v == 3; assert *w == 4; } diff --git a/src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs b/src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs index a268b37ca72..f75b256079e 100644 --- a/src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs +++ b/src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs @@ -18,11 +18,11 @@ fn b() { // Here I create an outstanding loan and check that we get conflicts: - &mut p; //! NOTE prior loan as mutable granted here - //!^ NOTE prior loan as mutable granted here + &mut p; //~ NOTE prior loan as mutable granted here + //~^ NOTE prior loan as mutable granted here - p + 3; //! ERROR loan of mutable local variable as immutable conflicts with prior loan - p * 3; //! ERROR loan of mutable local variable as immutable conflicts with prior loan + p + 3; //~ ERROR loan of mutable local variable as immutable conflicts with prior loan + p * 3; //~ ERROR loan of mutable local variable as immutable conflicts with prior loan } fn c() { @@ -35,8 +35,8 @@ fn c() { // ...but not impure fns - *q * 3; //! ERROR illegal borrow unless pure: creating immutable alias to aliasable, mutable memory - //!^ NOTE impure due to access to impure function + *q * 3; //~ ERROR illegal borrow unless pure: creating immutable alias to aliasable, mutable memory + //~^ NOTE impure due to access to impure function } fn main() { diff --git a/src/test/compile-fail/borrowck-loan-rcvr.rs b/src/test/compile-fail/borrowck-loan-rcvr.rs index ec543bfc4f9..b749996585b 100644 --- a/src/test/compile-fail/borrowck-loan-rcvr.rs +++ b/src/test/compile-fail/borrowck-loan-rcvr.rs @@ -19,8 +19,8 @@ fn a() { p.impurem(); // But in this case we do not honor the loan: - p.blockm {|| //! NOTE loan of mutable local variable granted here - p.x = 10; //! ERROR assigning to mutable field prohibited due to outstanding loan + p.blockm {|| //~ NOTE loan of mutable local variable granted here + p.x = 10; //~ ERROR assigning to mutable field prohibited due to outstanding loan } } @@ -29,11 +29,11 @@ fn b() { // Here I create an outstanding loan and check that we get conflicts: - &mut p; //! NOTE prior loan as mutable granted here - //!^ NOTE prior loan as mutable granted here + &mut p; //~ NOTE prior loan as mutable granted here + //~^ NOTE prior loan as mutable granted here - p.purem(); //! ERROR loan of mutable local variable as immutable conflicts with prior loan - p.impurem(); //! ERROR loan of mutable local variable as immutable conflicts with prior loan + p.purem(); //~ ERROR loan of mutable local variable as immutable conflicts with prior loan + p.impurem(); //~ ERROR loan of mutable local variable as immutable conflicts with prior loan } fn c() { @@ -45,8 +45,8 @@ fn c() { (*q).purem(); // ...but not impure fns - (*q).impurem(); //! ERROR illegal borrow unless pure: creating immutable alias to aliasable, mutable memory - //!^ NOTE impure due to access to impure function + (*q).impurem(); //~ ERROR illegal borrow unless pure: creating immutable alias to aliasable, mutable memory + //~^ NOTE impure due to access to impure function } fn main() { diff --git a/src/test/compile-fail/borrowck-loan-vec-content.rs b/src/test/compile-fail/borrowck-loan-vec-content.rs index 2e54f948de2..5542f0f4268 100644 --- a/src/test/compile-fail/borrowck-loan-vec-content.rs +++ b/src/test/compile-fail/borrowck-loan-vec-content.rs @@ -14,8 +14,8 @@ fn has_mut_vec_and_does_not_try_to_change_it() { fn has_mut_vec_but_tries_to_change_it() { let v = [mut 1, 2, 3]/~; - takes_imm_elt(&v[0]) {|| //! NOTE loan of mutable vec content granted here - v[1] = 4; //! ERROR assigning to mutable vec content prohibited due to outstanding loan + takes_imm_elt(&v[0]) {|| //~ NOTE loan of mutable vec content granted here + v[1] = 4; //~ ERROR assigning to mutable vec content prohibited due to outstanding loan } } diff --git a/src/test/compile-fail/borrowck-move-from-unsafe-ptr.rs b/src/test/compile-fail/borrowck-move-from-unsafe-ptr.rs index 03fbb6b975c..fc8ff1ffe07 100644 --- a/src/test/compile-fail/borrowck-move-from-unsafe-ptr.rs +++ b/src/test/compile-fail/borrowck-move-from-unsafe-ptr.rs @@ -1,5 +1,5 @@ fn foo(x: *~int) -> ~int { - let y <- *x; //! ERROR dereference of unsafe pointer requires unsafe function or block + let y <- *x; //~ ERROR dereference of unsafe pointer requires unsafe function or block ret y; } diff --git a/src/test/compile-fail/borrowck-mut-addr-of-imm-var.rs b/src/test/compile-fail/borrowck-mut-addr-of-imm-var.rs index d9436d90f9c..d3e6bb68a48 100644 --- a/src/test/compile-fail/borrowck-mut-addr-of-imm-var.rs +++ b/src/test/compile-fail/borrowck-mut-addr-of-imm-var.rs @@ -1,6 +1,6 @@ fn main() { let x: int = 3; - let y: &mut int = &mut x; //! ERROR taking mut reference to immutable local variable + let y: &mut int = &mut x; //~ ERROR taking mut reference to immutable local variable *y = 5; log (debug, *y); } diff --git a/src/test/compile-fail/borrowck-mut-vec-as-imm-slice-bad.rs b/src/test/compile-fail/borrowck-mut-vec-as-imm-slice-bad.rs index 8735e8e48ba..4df662e90c5 100644 --- a/src/test/compile-fail/borrowck-mut-vec-as-imm-slice-bad.rs +++ b/src/test/compile-fail/borrowck-mut-vec-as-imm-slice-bad.rs @@ -5,8 +5,8 @@ fn want_slice(v: [int]/&) -> int { } fn has_mut_vec(+v: @[mut int]/~) -> int { - want_slice(*v) //! ERROR illegal borrow unless pure: creating immutable alias to aliasable, mutable memory - //!^ NOTE impure due to access to impure function + want_slice(*v) //~ ERROR illegal borrow unless pure: creating immutable alias to aliasable, mutable memory + //~^ NOTE impure due to access to impure function } fn main() { diff --git a/src/test/compile-fail/borrowck-no-cycle-in-exchange-heap.rs b/src/test/compile-fail/borrowck-no-cycle-in-exchange-heap.rs index a546ef867e1..a4aeb976e95 100644 --- a/src/test/compile-fail/borrowck-no-cycle-in-exchange-heap.rs +++ b/src/test/compile-fail/borrowck-no-cycle-in-exchange-heap.rs @@ -5,9 +5,9 @@ enum cycle { fn main() { let x = ~node({mut a: ~empty}); // Create a cycle! - alt check *x { //! NOTE loan of immutable local variable granted here + alt check *x { //~ NOTE loan of immutable local variable granted here node(y) { - y.a <- x; //! ERROR moving out of immutable local variable prohibited due to outstanding loan + y.a <- x; //~ ERROR moving out of immutable local variable prohibited due to outstanding loan } }; } \ No newline at end of file diff --git a/src/test/compile-fail/borrowck-pat-enum-in-box.rs b/src/test/compile-fail/borrowck-pat-enum-in-box.rs index 29de06a1104..86ff452c356 100644 --- a/src/test/compile-fail/borrowck-pat-enum-in-box.rs +++ b/src/test/compile-fail/borrowck-pat-enum-in-box.rs @@ -27,8 +27,8 @@ fn process(_i: int) {} fn match_const_box_and_do_bad_things(v: &const @const option<int>) { alt *v { - @some(i) { //! ERROR illegal borrow unless pure: enum variant in aliasable, mutable location - process(i) //! NOTE impure due to access to impure function + @some(i) { //~ ERROR illegal borrow unless pure: enum variant in aliasable, mutable location + process(i) //~ NOTE impure due to access to impure function } @none {} } diff --git a/src/test/compile-fail/borrowck-pat-enum.rs b/src/test/compile-fail/borrowck-pat-enum.rs index 8e87e5d7420..091467283c5 100644 --- a/src/test/compile-fail/borrowck-pat-enum.rs +++ b/src/test/compile-fail/borrowck-pat-enum.rs @@ -33,8 +33,8 @@ fn match_const_reg_unused(v: &const option<int>) { fn match_const_reg_impure(v: &const option<int>) { alt *v { - some(i) {impure(i)} //! ERROR illegal borrow unless pure: enum variant in aliasable, mutable location - //!^ NOTE impure due to access to impure function + some(i) {impure(i)} //~ ERROR illegal borrow unless pure: enum variant in aliasable, mutable location + //~^ NOTE impure due to access to impure function none {} } } diff --git a/src/test/compile-fail/borrowck-pat-reassign-binding.rs b/src/test/compile-fail/borrowck-pat-reassign-binding.rs index cf1199557bd..7ce3ff8f028 100644 --- a/src/test/compile-fail/borrowck-pat-reassign-binding.rs +++ b/src/test/compile-fail/borrowck-pat-reassign-binding.rs @@ -2,11 +2,11 @@ fn main() { let mut x: option<int> = none; - alt x { //! NOTE loan of mutable local variable granted here + alt x { //~ NOTE loan of mutable local variable granted here none {} some(i) { // Not ok: i is an outstanding ptr into x. - x = some(i+1); //! ERROR assigning to mutable local variable prohibited due to outstanding loan + x = some(i+1); //~ ERROR assigning to mutable local variable prohibited due to outstanding loan } } copy x; // just to prevent liveness warnings diff --git a/src/test/compile-fail/borrowck-pat-reassign-sometimes-binding.rs b/src/test/compile-fail/borrowck-pat-reassign-sometimes-binding.rs index db8129d005a..1e1de3e39cf 100644 --- a/src/test/compile-fail/borrowck-pat-reassign-sometimes-binding.rs +++ b/src/test/compile-fail/borrowck-pat-reassign-sometimes-binding.rs @@ -2,14 +2,14 @@ fn main() { let mut x = none; - alt x { //! NOTE loan of mutable local variable granted here + alt x { //~ NOTE loan of mutable local variable granted here none { // It is ok to reassign x here, because there is in // fact no outstanding loan of x! x = some(0); } some(i) { - x = some(1); //! ERROR assigning to mutable local variable prohibited due to outstanding loan + x = some(1); //~ ERROR assigning to mutable local variable prohibited due to outstanding loan } } copy x; // just to prevent liveness warnings diff --git a/src/test/compile-fail/borrowck-pure-scope-in-call.rs b/src/test/compile-fail/borrowck-pure-scope-in-call.rs index 4469dca3620..71a3988b2ee 100644 --- a/src/test/compile-fail/borrowck-pure-scope-in-call.rs +++ b/src/test/compile-fail/borrowck-pure-scope-in-call.rs @@ -4,8 +4,8 @@ fn test1(x: @mut ~int) { // Here, evaluating the second argument actually invalidates the // first borrow, even though it occurs outside of the scope of the // borrow! - pure_borrow(*x, *x = ~5); //! ERROR illegal borrow unless pure: unique value in aliasable, mutable location - //!^ NOTE impure due to assigning to dereference of mutable @ pointer + pure_borrow(*x, *x = ~5); //~ ERROR illegal borrow unless pure: unique value in aliasable, mutable location + //~^ NOTE impure due to assigning to dereference of mutable @ pointer } fn test2() { @@ -13,8 +13,8 @@ fn test2() { // Same, but for loanable data: - pure_borrow(x, x = ~5); //! ERROR assigning to mutable local variable prohibited due to outstanding loan - //!^ NOTE loan of mutable local variable granted here + pure_borrow(x, x = ~5); //~ ERROR assigning to mutable local variable prohibited due to outstanding loan + //~^ NOTE loan of mutable local variable granted here copy x; } diff --git a/src/test/compile-fail/borrowck-unchecked-with-borrow.rs b/src/test/compile-fail/borrowck-unchecked-with-borrow.rs index a5f8b947bf2..c0a2466199f 100644 --- a/src/test/compile-fail/borrowck-unchecked-with-borrow.rs +++ b/src/test/compile-fail/borrowck-unchecked-with-borrow.rs @@ -4,9 +4,9 @@ fn impure(_i: int) {} fn foo(v: &const option<int>) { alt *v { some(i) { - //!^ ERROR illegal borrow unless pure: enum variant in aliasable, mutable location + //~^ ERROR illegal borrow unless pure: enum variant in aliasable, mutable location unchecked { - impure(i); //! NOTE impure due to access to impure function + impure(i); //~ NOTE impure due to access to impure function } } none { diff --git a/src/test/compile-fail/borrowck-uniq-via-box.rs b/src/test/compile-fail/borrowck-uniq-via-box.rs index cf0f5439afc..6fcdf369aba 100644 --- a/src/test/compile-fail/borrowck-uniq-via-box.rs +++ b/src/test/compile-fail/borrowck-uniq-via-box.rs @@ -1,23 +1,23 @@ fn borrow(_v: &int) {} fn box_mut(v: @mut ~int) { - borrow(*v); //! ERROR illegal borrow unless pure: unique value in aliasable, mutable location - //!^ NOTE impure due to access to impure function + borrow(*v); //~ ERROR illegal borrow unless pure: unique value in aliasable, mutable location + //~^ NOTE impure due to access to impure function } fn box_rec_mut(v: @{mut f: ~int}) { - borrow(v.f); //! ERROR illegal borrow unless pure: unique value in aliasable, mutable location - //!^ NOTE impure due to access to impure function + borrow(v.f); //~ ERROR illegal borrow unless pure: unique value in aliasable, mutable location + //~^ NOTE impure due to access to impure function } fn box_mut_rec(v: @mut {f: ~int}) { - borrow(v.f); //! ERROR illegal borrow unless pure: unique value in aliasable, mutable location - //!^ NOTE impure due to access to impure function + borrow(v.f); //~ ERROR illegal borrow unless pure: unique value in aliasable, mutable location + //~^ NOTE impure due to access to impure function } fn box_mut_recs(v: @mut {f: {g: {h: ~int}}}) { - borrow(v.f.g.h); //! ERROR illegal borrow unless pure: unique value in aliasable, mutable location - //!^ NOTE impure due to access to impure function + borrow(v.f.g.h); //~ ERROR illegal borrow unless pure: unique value in aliasable, mutable location + //~^ NOTE impure due to access to impure function } fn box_imm(v: @~int) { @@ -33,28 +33,28 @@ fn box_imm_recs(v: @{f: {g: {h: ~int}}}) { } fn box_const(v: @const ~int) { - borrow(*v); //! ERROR illegal borrow unless pure: unique value in aliasable, mutable location - //!^ NOTE impure due to access to impure function + borrow(*v); //~ ERROR illegal borrow unless pure: unique value in aliasable, mutable location + //~^ NOTE impure due to access to impure function } fn box_rec_const(v: @{const f: ~int}) { - borrow(v.f); //! ERROR illegal borrow unless pure: unique value in aliasable, mutable location - //!^ NOTE impure due to access to impure function + borrow(v.f); //~ ERROR illegal borrow unless pure: unique value in aliasable, mutable location + //~^ NOTE impure due to access to impure function } fn box_recs_const(v: @{f: {g: {const h: ~int}}}) { - borrow(v.f.g.h); //! ERROR illegal borrow unless pure: unique value in aliasable, mutable location - //!^ NOTE impure due to access to impure function + borrow(v.f.g.h); //~ ERROR illegal borrow unless pure: unique value in aliasable, mutable location + //~^ NOTE impure due to access to impure function } fn box_const_rec(v: @const {f: ~int}) { - borrow(v.f); //! ERROR illegal borrow unless pure: unique value in aliasable, mutable location - //!^ NOTE impure due to access to impure function + borrow(v.f); //~ ERROR illegal borrow unless pure: unique value in aliasable, mutable location + //~^ NOTE impure due to access to impure function } fn box_const_recs(v: @const {f: {g: {h: ~int}}}) { - borrow(v.f.g.h); //! ERROR illegal borrow unless pure: unique value in aliasable, mutable location - //!^ NOTE impure due to access to impure function + borrow(v.f.g.h); //~ ERROR illegal borrow unless pure: unique value in aliasable, mutable location + //~^ NOTE impure due to access to impure function } fn main() { diff --git a/src/test/compile-fail/borrowck-uniq-via-lend.rs b/src/test/compile-fail/borrowck-uniq-via-lend.rs index 78bba1576e8..fcc8d2c8775 100644 --- a/src/test/compile-fail/borrowck-uniq-via-lend.rs +++ b/src/test/compile-fail/borrowck-uniq-via-lend.rs @@ -29,8 +29,8 @@ fn aliased_const() { fn aliased_mut() { let mut v = ~3; - let _w = &mut v; //! NOTE prior loan as mutable granted here - borrow(v); //! ERROR loan of mutable local variable as immutable conflicts with prior loan + let _w = &mut v; //~ NOTE prior loan as mutable granted here + borrow(v); //~ ERROR loan of mutable local variable as immutable conflicts with prior loan } fn aliased_other() { @@ -42,8 +42,8 @@ fn aliased_other() { fn aliased_other_reassign() { let mut v = ~3, w = ~4; let mut _x = &mut w; - _x = &mut v; //! NOTE prior loan as mutable granted here - borrow(v); //! ERROR loan of mutable local variable as immutable conflicts with prior loan + _x = &mut v; //~ NOTE prior loan as mutable granted here + borrow(v); //~ ERROR loan of mutable local variable as immutable conflicts with prior loan } fn main() { diff --git a/src/test/compile-fail/borrowck-uniq-via-ref.rs b/src/test/compile-fail/borrowck-uniq-via-ref.rs index 156106b880c..fe825165183 100644 --- a/src/test/compile-fail/borrowck-uniq-via-ref.rs +++ b/src/test/compile-fail/borrowck-uniq-via-ref.rs @@ -1,23 +1,23 @@ fn borrow(_v: &int) {} fn box_mut(v: &mut ~int) { - borrow(*v); //! ERROR illegal borrow unless pure: unique value in aliasable, mutable location - //!^ NOTE impure due to access to impure function + borrow(*v); //~ ERROR illegal borrow unless pure: unique value in aliasable, mutable location + //~^ NOTE impure due to access to impure function } fn box_rec_mut(v: &{mut f: ~int}) { - borrow(v.f); //! ERROR illegal borrow unless pure: unique value in aliasable, mutable location - //!^ NOTE impure due to access to impure function + borrow(v.f); //~ ERROR illegal borrow unless pure: unique value in aliasable, mutable location + //~^ NOTE impure due to access to impure function } fn box_mut_rec(v: &mut {f: ~int}) { - borrow(v.f); //! ERROR illegal borrow unless pure: unique value in aliasable, mutable location - //!^ NOTE impure due to access to impure function + borrow(v.f); //~ ERROR illegal borrow unless pure: unique value in aliasable, mutable location + //~^ NOTE impure due to access to impure function } fn box_mut_recs(v: &mut {f: {g: {h: ~int}}}) { - borrow(v.f.g.h); //! ERROR illegal borrow unless pure: unique value in aliasable, mutable location - //!^ NOTE impure due to access to impure function + borrow(v.f.g.h); //~ ERROR illegal borrow unless pure: unique value in aliasable, mutable location + //~^ NOTE impure due to access to impure function } fn box_imm(v: &~int) { @@ -33,28 +33,28 @@ fn box_imm_recs(v: &{f: {g: {h: ~int}}}) { } fn box_const(v: &const ~int) { - borrow(*v); //! ERROR illegal borrow unless pure: unique value in aliasable, mutable location - //!^ NOTE impure due to access to impure function + borrow(*v); //~ ERROR illegal borrow unless pure: unique value in aliasable, mutable location + //~^ NOTE impure due to access to impure function } fn box_rec_const(v: &{const f: ~int}) { - borrow(v.f); //! ERROR illegal borrow unless pure: unique value in aliasable, mutable location - //!^ NOTE impure due to access to impure function + borrow(v.f); //~ ERROR illegal borrow unless pure: unique value in aliasable, mutable location + //~^ NOTE impure due to access to impure function } fn box_recs_const(v: &{f: {g: {const h: ~int}}}) { - borrow(v.f.g.h); //! ERROR illegal borrow unless pure: unique value in aliasable, mutable location - //!^ NOTE impure due to access to impure function + borrow(v.f.g.h); //~ ERROR illegal borrow unless pure: unique value in aliasable, mutable location + //~^ NOTE impure due to access to impure function } fn box_const_rec(v: &const {f: ~int}) { - borrow(v.f); //! ERROR illegal borrow unless pure: unique value in aliasable, mutable location - //!^ NOTE impure due to access to impure function + borrow(v.f); //~ ERROR illegal borrow unless pure: unique value in aliasable, mutable location + //~^ NOTE impure due to access to impure function } fn box_const_recs(v: &const {f: {g: {h: ~int}}}) { - borrow(v.f.g.h); //! ERROR illegal borrow unless pure: unique value in aliasable, mutable location - //!^ NOTE impure due to access to impure function + borrow(v.f.g.h); //~ ERROR illegal borrow unless pure: unique value in aliasable, mutable location + //~^ NOTE impure due to access to impure function } fn main() { diff --git a/src/test/compile-fail/cap-clause-move-upvar.rs b/src/test/compile-fail/cap-clause-move-upvar.rs index 3920298c355..c070c80edf9 100644 --- a/src/test/compile-fail/cap-clause-move-upvar.rs +++ b/src/test/compile-fail/cap-clause-move-upvar.rs @@ -1,7 +1,7 @@ fn main() { let x = 5; let _y = fn~(move x) -> int { - let _z = fn~(move x) -> int { x }; //! ERROR moving out of variable declared in an outer block + let _z = fn~(move x) -> int { x }; //~ ERROR moving out of variable declared in an outer block 22 }; } diff --git a/src/test/compile-fail/cap-clause-with-stack-closure.rs b/src/test/compile-fail/cap-clause-with-stack-closure.rs index 4d9a77fb3d6..c7192852c37 100644 --- a/src/test/compile-fail/cap-clause-with-stack-closure.rs +++ b/src/test/compile-fail/cap-clause-with-stack-closure.rs @@ -6,9 +6,9 @@ fn main() { foo {|| bar(x); } let x = @3; - foo {|copy x| bar(x); } //! ERROR cannot capture values explicitly with a block closure + foo {|copy x| bar(x); } //~ ERROR cannot capture values explicitly with a block closure let x = @3; - foo {|move x| bar(x); } //! ERROR cannot capture values explicitly with a block closure + foo {|move x| bar(x); } //~ ERROR cannot capture values explicitly with a block closure } diff --git a/src/test/compile-fail/class-implements-int.rs b/src/test/compile-fail/class-implements-int.rs index 1768b8c4bf0..469fee7863b 100644 --- a/src/test/compile-fail/class-implements-int.rs +++ b/src/test/compile-fail/class-implements-int.rs @@ -1,4 +1,4 @@ -class cat : int { //! ERROR can only implement interface types +class cat : int { //~ ERROR can only implement interface types let meows: uint; new(in_x : uint) { self.meows = in_x; } } diff --git a/src/test/compile-fail/class-missing-self.rs b/src/test/compile-fail/class-missing-self.rs index 280ba47031e..5e27afaf164 100644 --- a/src/test/compile-fail/class-missing-self.rs +++ b/src/test/compile-fail/class-missing-self.rs @@ -4,8 +4,8 @@ class cat { fn sleep() { loop{} } fn meow() { #error("Meow"); - meows += 1u; //! ERROR unresolved name - sleep(); //! ERROR unresolved name + meows += 1u; //~ ERROR unresolved name + sleep(); //~ ERROR unresolved name } } diff --git a/src/test/compile-fail/do1.rs b/src/test/compile-fail/do1.rs index 76a10c6d2f1..2034bfcbc58 100644 --- a/src/test/compile-fail/do1.rs +++ b/src/test/compile-fail/do1.rs @@ -1,3 +1,3 @@ fn main() { - let x = do y; //! ERROR: `do` must be followed by a block call + let x = do y; //~ ERROR: `do` must be followed by a block call } diff --git a/src/test/compile-fail/do2.rs b/src/test/compile-fail/do2.rs index 598bb298794..9108c03747f 100644 --- a/src/test/compile-fail/do2.rs +++ b/src/test/compile-fail/do2.rs @@ -1,5 +1,5 @@ fn f(f: fn@(int) -> bool) -> bool { f(10i) } fn main() { - assert do f() { |i| i == 10i } == 10i; //! ERROR: expected `bool` but found `int` + assert do f() { |i| i == 10i } == 10i; //~ ERROR: expected `bool` but found `int` } diff --git a/src/test/compile-fail/empty-vec-trailing-comma.rs b/src/test/compile-fail/empty-vec-trailing-comma.rs index 2d01da0f485..5cc08681e99 100644 --- a/src/test/compile-fail/empty-vec-trailing-comma.rs +++ b/src/test/compile-fail/empty-vec-trailing-comma.rs @@ -1,3 +1,3 @@ fn main() { - let v = [,]/~; //! ERROR unexpected token: ',' + let v = [,]/~; //~ ERROR unexpected token: ',' } diff --git a/src/test/compile-fail/enum-in-scope.rs b/src/test/compile-fail/enum-in-scope.rs index 38e95c21e8f..e1d86936d02 100644 --- a/src/test/compile-fail/enum-in-scope.rs +++ b/src/test/compile-fail/enum-in-scope.rs @@ -1,5 +1,5 @@ enum hello = int; fn main() { - let hello = 0; //!ERROR declaration of `hello` shadows an enum that's in + let hello = 0; //~ERROR declaration of `hello` shadows an enum that's in } \ No newline at end of file diff --git a/src/test/compile-fail/estr-subtyping.rs b/src/test/compile-fail/estr-subtyping.rs index 69b6d45baf7..e5f963733dc 100644 --- a/src/test/compile-fail/estr-subtyping.rs +++ b/src/test/compile-fail/estr-subtyping.rs @@ -4,26 +4,26 @@ fn wants_three(x: str/3) { } fn has_box(x: str/@) { wants_box(x); - wants_uniq(x); //! ERROR str storage differs: expected ~ but found @ - wants_three(x); //! ERROR str storage differs: expected 3 but found @ + wants_uniq(x); //~ ERROR str storage differs: expected ~ but found @ + wants_three(x); //~ ERROR str storage differs: expected 3 but found @ } fn has_uniq(x: str/~) { - wants_box(x); //! ERROR str storage differs: expected @ but found ~ + wants_box(x); //~ ERROR str storage differs: expected @ but found ~ wants_uniq(x); - wants_three(x); //! ERROR str storage differs: expected 3 but found ~ + wants_three(x); //~ ERROR str storage differs: expected 3 but found ~ } fn has_three(x: str/3) { - wants_box(x); //! ERROR str storage differs: expected @ but found 3 - wants_uniq(x); //! ERROR str storage differs: expected ~ but found 3 + wants_box(x); //~ ERROR str storage differs: expected @ but found 3 + wants_uniq(x); //~ ERROR str storage differs: expected ~ but found 3 wants_three(x); } fn has_four(x: str/4) { - wants_box(x); //! ERROR str storage differs: expected @ but found 4 - wants_uniq(x); //! ERROR str storage differs: expected ~ but found 4 - wants_three(x); //! ERROR str storage differs: expected 3 but found 4 + wants_box(x); //~ ERROR str storage differs: expected @ but found 4 + wants_uniq(x); //~ ERROR str storage differs: expected ~ but found 4 + wants_three(x); //~ ERROR str storage differs: expected 3 but found 4 } fn main() { diff --git a/src/test/compile-fail/evec-subtyping.rs b/src/test/compile-fail/evec-subtyping.rs index 843bd77625e..2688213740e 100644 --- a/src/test/compile-fail/evec-subtyping.rs +++ b/src/test/compile-fail/evec-subtyping.rs @@ -4,26 +4,26 @@ fn wants_three(x: [uint]/3) { } fn has_box(x: [uint]/@) { wants_box(x); - wants_uniq(x); //! ERROR [] storage differs: expected ~ but found @ - wants_three(x); //! ERROR [] storage differs: expected 3 but found @ + wants_uniq(x); //~ ERROR [] storage differs: expected ~ but found @ + wants_three(x); //~ ERROR [] storage differs: expected 3 but found @ } fn has_uniq(x: [uint]/~) { - wants_box(x); //! ERROR [] storage differs: expected @ but found ~ + wants_box(x); //~ ERROR [] storage differs: expected @ but found ~ wants_uniq(x); - wants_three(x); //! ERROR [] storage differs: expected 3 but found ~ + wants_three(x); //~ ERROR [] storage differs: expected 3 but found ~ } fn has_three(x: [uint]/3) { - wants_box(x); //! ERROR [] storage differs: expected @ but found 3 - wants_uniq(x); //! ERROR [] storage differs: expected ~ but found 3 + wants_box(x); //~ ERROR [] storage differs: expected @ but found 3 + wants_uniq(x); //~ ERROR [] storage differs: expected ~ but found 3 wants_three(x); } fn has_four(x: [uint]/4) { - wants_box(x); //! ERROR [] storage differs: expected @ but found 4 - wants_uniq(x); //! ERROR [] storage differs: expected ~ but found 4 - wants_three(x); //! ERROR [] storage differs: expected 3 but found 4 + wants_box(x); //~ ERROR [] storage differs: expected @ but found 4 + wants_uniq(x); //~ ERROR [] storage differs: expected ~ but found 4 + wants_three(x); //~ ERROR [] storage differs: expected 3 but found 4 } fn main() { diff --git a/src/test/compile-fail/fn-compare-mismatch.rs b/src/test/compile-fail/fn-compare-mismatch.rs index 3dd0654f2fb..bc78b475843 100644 --- a/src/test/compile-fail/fn-compare-mismatch.rs +++ b/src/test/compile-fail/fn-compare-mismatch.rs @@ -2,5 +2,5 @@ fn main() { fn f() { } fn g(i: int) { } let x = f == g; - //!^ ERROR expected `extern fn()` but found `extern fn(int)` + //~^ ERROR expected `extern fn()` but found `extern fn(int)` } diff --git a/src/test/compile-fail/fn-variance-1.rs b/src/test/compile-fail/fn-variance-1.rs index cb2dbde3d48..01abd73bb47 100644 --- a/src/test/compile-fail/fn-variance-1.rs +++ b/src/test/compile-fail/fn-variance-1.rs @@ -7,11 +7,11 @@ fn apply<T>(t: T, f: fn(T)) { } fn main() { - apply(@3, takes_mut); //! ERROR (values differ in mutability) + apply(@3, takes_mut); //~ ERROR (values differ in mutability) apply(@3, takes_const); apply(@3, takes_imm); apply(@mut 3, takes_mut); apply(@mut 3, takes_const); - apply(@mut 3, takes_imm); //! ERROR (values differ in mutability) + apply(@mut 3, takes_imm); //~ ERROR (values differ in mutability) } diff --git a/src/test/compile-fail/fn-variance-2.rs b/src/test/compile-fail/fn-variance-2.rs index 9d4254a708e..6d9bdabae86 100644 --- a/src/test/compile-fail/fn-variance-2.rs +++ b/src/test/compile-fail/fn-variance-2.rs @@ -18,5 +18,5 @@ fn main() { let g: @const int = r(); // Bad. - let h: @int = r(); //! ERROR (values differ in mutability) + let h: @int = r(); //~ ERROR (values differ in mutability) } diff --git a/src/test/compile-fail/fn-variance-3.rs b/src/test/compile-fail/fn-variance-3.rs index d5989822f94..f9fe3d31fcc 100644 --- a/src/test/compile-fail/fn-variance-3.rs +++ b/src/test/compile-fail/fn-variance-3.rs @@ -20,5 +20,5 @@ fn main() { // mutability check will fail, because the // type of r has been inferred to be // fn(@const int) -> @const int - *r(@mut 3) = 4; //! ERROR assigning to dereference of const @ pointer + *r(@mut 3) = 4; //~ ERROR assigning to dereference of const @ pointer } diff --git a/src/test/compile-fail/fully-qualified-type-name1.rs b/src/test/compile-fail/fully-qualified-type-name1.rs index db574f6f2bc..cb56cbacb48 100644 --- a/src/test/compile-fail/fully-qualified-type-name1.rs +++ b/src/test/compile-fail/fully-qualified-type-name1.rs @@ -3,5 +3,5 @@ fn main() { let x: option<uint>; x = 5; - //!^ ERROR mismatched types: expected `core::option::option<uint>` + //~^ ERROR mismatched types: expected `core::option::option<uint>` } diff --git a/src/test/compile-fail/fully-qualified-type-name2.rs b/src/test/compile-fail/fully-qualified-type-name2.rs index a9293da2eff..db6521cbd78 100644 --- a/src/test/compile-fail/fully-qualified-type-name2.rs +++ b/src/test/compile-fail/fully-qualified-type-name2.rs @@ -10,7 +10,7 @@ mod y { fn bar(x: x::foo) -> y::foo { ret x; - //!^ ERROR mismatched types: expected `y::foo` but found `x::foo` + //~^ ERROR mismatched types: expected `y::foo` but found `x::foo` } fn main() { diff --git a/src/test/compile-fail/fully-qualified-type-name3.rs b/src/test/compile-fail/fully-qualified-type-name3.rs index 411dc2e9e76..6bd764af179 100644 --- a/src/test/compile-fail/fully-qualified-type-name3.rs +++ b/src/test/compile-fail/fully-qualified-type-name3.rs @@ -5,7 +5,7 @@ type T2 = int; fn bar(x: T1) -> T2 { ret x; - //!^ ERROR mismatched types: expected `T2` but found `T1` + //~^ ERROR mismatched types: expected `T2` but found `T1` } fn main() { diff --git a/src/test/compile-fail/fully-qualified-type-name4.rs b/src/test/compile-fail/fully-qualified-type-name4.rs index 73941c45498..73560432032 100644 --- a/src/test/compile-fail/fully-qualified-type-name4.rs +++ b/src/test/compile-fail/fully-qualified-type-name4.rs @@ -4,7 +4,7 @@ import core::task::task; fn bar(x: uint) -> task { ret x; - //!^ ERROR mismatched types: expected `core::task::task` + //~^ ERROR mismatched types: expected `core::task::task` } fn main() { diff --git a/src/test/compile-fail/iface-cast.rs b/src/test/compile-fail/iface-cast.rs index 5c859f21229..a82bb0b80d2 100644 --- a/src/test/compile-fail/iface-cast.rs +++ b/src/test/compile-fail/iface-cast.rs @@ -2,7 +2,7 @@ iface foo<T> { } fn bar(x: foo<uint>) -> foo<int> { ret (x as foo::<int>); - //!^ ERROR mismatched types: expected `foo<int>` but found `foo<uint>` + //~^ ERROR mismatched types: expected `foo<int>` but found `foo<uint>` } fn main() {} diff --git a/src/test/compile-fail/iface-impl-different-num-params.rs b/src/test/compile-fail/iface-impl-different-num-params.rs index 7eadb1fe98e..094dc7ac062 100644 --- a/src/test/compile-fail/iface-impl-different-num-params.rs +++ b/src/test/compile-fail/iface-impl-different-num-params.rs @@ -3,7 +3,7 @@ iface foo { } impl of foo for int { fn bar() -> int { - //!^ ERROR method `bar` has 0 parameters but the iface has 1 + //~^ ERROR method `bar` has 0 parameters but the iface has 1 self } } diff --git a/src/test/compile-fail/iface-test-2.rs b/src/test/compile-fail/iface-test-2.rs index 96e5979084e..b2ee357ffc5 100644 --- a/src/test/compile-fail/iface-test-2.rs +++ b/src/test/compile-fail/iface-test-2.rs @@ -4,8 +4,8 @@ impl of bar for uint { fn dup() -> uint { self } fn blah<X>() {} } impl of bar for uint { fn dup() -> uint { self } fn blah<X>() {} } fn main() { - 10.dup::<int>(); //! ERROR does not take type parameters - 10.blah::<int, int>(); //! ERROR incorrect number of type parameters - 10u.dup(); //! ERROR multiple applicable methods - (10 as bar).dup(); //! ERROR contains a self type + 10.dup::<int>(); //~ ERROR does not take type parameters + 10.blah::<int, int>(); //~ ERROR incorrect number of type parameters + 10u.dup(); //~ ERROR multiple applicable methods + (10 as bar).dup(); //~ ERROR contains a self type } diff --git a/src/test/compile-fail/iface-test.rs b/src/test/compile-fail/iface-test.rs index 86c5a478d81..1d45832d6df 100644 --- a/src/test/compile-fail/iface-test.rs +++ b/src/test/compile-fail/iface-test.rs @@ -1,9 +1,9 @@ iface foo { fn foo(); } -impl of foo for uint {} //! ERROR missing method `foo` +impl of foo for uint {} //~ ERROR missing method `foo` -impl of foo for uint { fn foo() -> int {} } //! ERROR incompatible type +impl of foo for uint { fn foo() -> int {} } //~ ERROR incompatible type -impl of int for uint { fn foo() {} } //! ERROR can only implement interface +impl of int for uint { fn foo() {} } //~ ERROR can only implement interface fn main() {} diff --git a/src/test/compile-fail/impure-pred.rs b/src/test/compile-fail/impure-pred.rs index 41990fe167c..aef5080e3ae 100644 --- a/src/test/compile-fail/impure-pred.rs +++ b/src/test/compile-fail/impure-pred.rs @@ -3,7 +3,7 @@ fn g() { } pure fn f(_q: int) -> bool { - g(); //! ERROR access to impure function prohibited in pure context + g(); //~ ERROR access to impure function prohibited in pure context ret true; } diff --git a/src/test/compile-fail/index_message.rs b/src/test/compile-fail/index_message.rs index 4c8a9f10e66..d138efbe5e2 100644 --- a/src/test/compile-fail/index_message.rs +++ b/src/test/compile-fail/index_message.rs @@ -1,4 +1,4 @@ fn main() { let z = (); - log(debug, z[0]); //! ERROR cannot index a value of type `()` + log(debug, z[0]); //~ ERROR cannot index a value of type `()` } diff --git a/src/test/compile-fail/integer-literal-suffix-inference.rs b/src/test/compile-fail/integer-literal-suffix-inference.rs index 96c7983c2ba..8efc2650fa7 100644 --- a/src/test/compile-fail/integer-literal-suffix-inference.rs +++ b/src/test/compile-fail/integer-literal-suffix-inference.rs @@ -29,62 +29,62 @@ fn main() { fn id_u64(n: u64) -> u64 { n } id_i8(a8); // ok - id_i8(a16); //! ERROR mismatched types: expected `i8` but found `i16` - id_i8(a32); //! ERROR mismatched types: expected `i8` but found `i32` - id_i8(a64); //! ERROR mismatched types: expected `i8` but found `i64` + id_i8(a16); //~ ERROR mismatched types: expected `i8` but found `i16` + id_i8(a32); //~ ERROR mismatched types: expected `i8` but found `i32` + id_i8(a64); //~ ERROR mismatched types: expected `i8` but found `i64` - id_i16(a8); //! ERROR mismatched types: expected `i16` but found `i8` + id_i16(a8); //~ ERROR mismatched types: expected `i16` but found `i8` id_i16(a16); // ok - id_i16(a32); //! ERROR mismatched types: expected `i16` but found `i32` - id_i16(a64); //! ERROR mismatched types: expected `i16` but found `i64` + id_i16(a32); //~ ERROR mismatched types: expected `i16` but found `i32` + id_i16(a64); //~ ERROR mismatched types: expected `i16` but found `i64` - id_i32(a8); //! ERROR mismatched types: expected `i32` but found `i8` - id_i32(a16); //! ERROR mismatched types: expected `i32` but found `i16` + id_i32(a8); //~ ERROR mismatched types: expected `i32` but found `i8` + id_i32(a16); //~ ERROR mismatched types: expected `i32` but found `i16` id_i32(a32); // ok - id_i32(a64); //! ERROR mismatched types: expected `i32` but found `i64` + id_i32(a64); //~ ERROR mismatched types: expected `i32` but found `i64` - id_i64(a8); //! ERROR mismatched types: expected `i64` but found `i8` - id_i64(a16); //! ERROR mismatched types: expected `i64` but found `i16` - id_i64(a32); //! ERROR mismatched types: expected `i64` but found `i32` + id_i64(a8); //~ ERROR mismatched types: expected `i64` but found `i8` + id_i64(a16); //~ ERROR mismatched types: expected `i64` but found `i16` + id_i64(a32); //~ ERROR mismatched types: expected `i64` but found `i32` id_i64(a64); // ok id_i8(c8); // ok - id_i8(c16); //! ERROR mismatched types: expected `i8` but found `i16` - id_i8(c32); //! ERROR mismatched types: expected `i8` but found `i32` - id_i8(c64); //! ERROR mismatched types: expected `i8` but found `i64` + id_i8(c16); //~ ERROR mismatched types: expected `i8` but found `i16` + id_i8(c32); //~ ERROR mismatched types: expected `i8` but found `i32` + id_i8(c64); //~ ERROR mismatched types: expected `i8` but found `i64` - id_i16(c8); //! ERROR mismatched types: expected `i16` but found `i8` + id_i16(c8); //~ ERROR mismatched types: expected `i16` but found `i8` id_i16(c16); // ok - id_i16(c32); //! ERROR mismatched types: expected `i16` but found `i32` - id_i16(c64); //! ERROR mismatched types: expected `i16` but found `i64` + id_i16(c32); //~ ERROR mismatched types: expected `i16` but found `i32` + id_i16(c64); //~ ERROR mismatched types: expected `i16` but found `i64` - id_i32(c8); //! ERROR mismatched types: expected `i32` but found `i8` - id_i32(c16); //! ERROR mismatched types: expected `i32` but found `i16` + id_i32(c8); //~ ERROR mismatched types: expected `i32` but found `i8` + id_i32(c16); //~ ERROR mismatched types: expected `i32` but found `i16` id_i32(c32); // ok - id_i32(c64); //! ERROR mismatched types: expected `i32` but found `i64` + id_i32(c64); //~ ERROR mismatched types: expected `i32` but found `i64` - id_i64(a8); //! ERROR mismatched types: expected `i64` but found `i8` - id_i64(a16); //! ERROR mismatched types: expected `i64` but found `i16` - id_i64(a32); //! ERROR mismatched types: expected `i64` but found `i32` + id_i64(a8); //~ ERROR mismatched types: expected `i64` but found `i8` + id_i64(a16); //~ ERROR mismatched types: expected `i64` but found `i16` + id_i64(a32); //~ ERROR mismatched types: expected `i64` but found `i32` id_i64(a64); // ok id_u8(b8); // ok - id_u8(b16); //! ERROR mismatched types: expected `u8` but found `u16` - id_u8(b32); //! ERROR mismatched types: expected `u8` but found `u32` - id_u8(b64); //! ERROR mismatched types: expected `u8` but found `u64` + id_u8(b16); //~ ERROR mismatched types: expected `u8` but found `u16` + id_u8(b32); //~ ERROR mismatched types: expected `u8` but found `u32` + id_u8(b64); //~ ERROR mismatched types: expected `u8` but found `u64` - id_u16(b8); //! ERROR mismatched types: expected `u16` but found `u8` + id_u16(b8); //~ ERROR mismatched types: expected `u16` but found `u8` id_u16(b16); // ok - id_u16(b32); //! ERROR mismatched types: expected `u16` but found `u32` - id_u16(b64); //! ERROR mismatched types: expected `u16` but found `u64` + id_u16(b32); //~ ERROR mismatched types: expected `u16` but found `u32` + id_u16(b64); //~ ERROR mismatched types: expected `u16` but found `u64` - id_u32(b8); //! ERROR mismatched types: expected `u32` but found `u8` - id_u32(b16); //! ERROR mismatched types: expected `u32` but found `u16` + id_u32(b8); //~ ERROR mismatched types: expected `u32` but found `u8` + id_u32(b16); //~ ERROR mismatched types: expected `u32` but found `u16` id_u32(b32); // ok - id_u32(b64); //! ERROR mismatched types: expected `u32` but found `u64` + id_u32(b64); //~ ERROR mismatched types: expected `u32` but found `u64` - id_u64(b8); //! ERROR mismatched types: expected `u64` but found `u8` - id_u64(b16); //! ERROR mismatched types: expected `u64` but found `u16` - id_u64(b32); //! ERROR mismatched types: expected `u64` but found `u32` + id_u64(b8); //~ ERROR mismatched types: expected `u64` but found `u8` + id_u64(b16); //~ ERROR mismatched types: expected `u64` but found `u16` + id_u64(b32); //~ ERROR mismatched types: expected `u64` but found `u32` id_u64(b64); // ok } diff --git a/src/test/compile-fail/issue-1362.rs b/src/test/compile-fail/issue-1362.rs index 890e230e829..c11b98cfe52 100644 --- a/src/test/compile-fail/issue-1362.rs +++ b/src/test/compile-fail/issue-1362.rs @@ -1,7 +1,7 @@ // Regression test for issue #1362 - without that fix the span will be bogus // no-reformat fn main() { - let x: uint = 20i; //! ERROR mismatched types + let x: uint = 20i; //~ ERROR mismatched types } // NOTE: Do not add any extra lines as the line number the error is // on is significant; an error later in the source file might not diff --git a/src/test/compile-fail/issue-1448-1.rs b/src/test/compile-fail/issue-1448-1.rs index 8c3617a99da..89189fc1fca 100644 --- a/src/test/compile-fail/issue-1448-1.rs +++ b/src/test/compile-fail/issue-1448-1.rs @@ -3,5 +3,5 @@ fn main() { #macro[[#apply[f, [x, ...]], f(x, ...)]]; fn add(a: int, b: int) -> int { ret a + b; } - assert (#apply[add, [y, 15]] == 16); //! ERROR unresolved name: y + assert (#apply[add, [y, 15]] == 16); //~ ERROR unresolved name: y } diff --git a/src/test/compile-fail/issue-1448-2.rs b/src/test/compile-fail/issue-1448-2.rs index 9677a74a1b6..d91d48ac172 100644 --- a/src/test/compile-fail/issue-1448-2.rs +++ b/src/test/compile-fail/issue-1448-2.rs @@ -1,5 +1,5 @@ // Regresion test for issue #1448 and #1386 fn main() { - #debug["%u", 10i]; //! ERROR mismatched types + #debug["%u", 10i]; //~ ERROR mismatched types } diff --git a/src/test/compile-fail/issue-1697.rs b/src/test/compile-fail/issue-1697.rs index 6579cd507dd..63b316813ff 100644 --- a/src/test/compile-fail/issue-1697.rs +++ b/src/test/compile-fail/issue-1697.rs @@ -1,7 +1,7 @@ // Testing that we don't fail abnormally after hitting the errors -import unresolved::*; //! ERROR unresolved modulename -//!^ ERROR unresolved does not name a module +import unresolved::*; //~ ERROR unresolved modulename +//~^ ERROR unresolved does not name a module fn main() { } \ No newline at end of file diff --git a/src/test/compile-fail/issue-1763.rs b/src/test/compile-fail/issue-1763.rs index 17510164a5f..ba4828f88bc 100644 --- a/src/test/compile-fail/issue-1763.rs +++ b/src/test/compile-fail/issue-1763.rs @@ -1,6 +1,6 @@ // Issue #1763 - infer types correctly -type actor<T> = { //! ERROR type parameter `T` is unused +type actor<T> = { //~ ERROR type parameter `T` is unused unused: bool }; diff --git a/src/test/compile-fail/issue-1896.rs b/src/test/compile-fail/issue-1896.rs index eea82506061..765e014f7d8 100644 --- a/src/test/compile-fail/issue-1896.rs +++ b/src/test/compile-fail/issue-1896.rs @@ -3,6 +3,6 @@ type t<T> = { f: fn() -> T }; fn f<T>(_x: t<T>) {} fn main() { - let x: t<()> = { f: { || () } }; //! ERROR expressions with stack closure + let x: t<()> = { f: { || () } }; //~ ERROR expressions with stack closure f(x); } diff --git a/src/test/compile-fail/issue-1962.rs b/src/test/compile-fail/issue-1962.rs index ff47022ab65..aaf3c7653fb 100644 --- a/src/test/compile-fail/issue-1962.rs +++ b/src/test/compile-fail/issue-1962.rs @@ -1,7 +1,7 @@ // compile-flags: -W err-while-true fn main() { let mut i = 0; - while true { //! ERROR denote infinite loops with loop + while true { //~ ERROR denote infinite loops with loop i += 1; if i == 5 { break; } } diff --git a/src/test/compile-fail/issue-2063-resource.rs b/src/test/compile-fail/issue-2063-resource.rs index 0fb4f2caf6c..9f489101f1b 100644 --- a/src/test/compile-fail/issue-2063-resource.rs +++ b/src/test/compile-fail/issue-2063-resource.rs @@ -1,12 +1,12 @@ // test that autoderef of a type like this does not // cause compiler to loop. Note that no instances // of such a type could ever be constructed. -class t { //! ERROR this type cannot be instantiated +class t { //~ ERROR this type cannot be instantiated let x: x; let to_str: (); new(x: x) { self.x = x; self.to_str = (); } } -enum x = @t; //! ERROR this type cannot be instantiated +enum x = @t; //~ ERROR this type cannot be instantiated fn main() { } diff --git a/src/test/compile-fail/issue-2063.rs b/src/test/compile-fail/issue-2063.rs index b061ed9d733..07b7d1ad3f4 100644 --- a/src/test/compile-fail/issue-2063.rs +++ b/src/test/compile-fail/issue-2063.rs @@ -1,7 +1,7 @@ // test that autoderef of a type like this does not // cause compiler to loop. Note that no instances // of such a type could ever be constructed. -enum t = @t; //! ERROR this type cannot be instantiated +enum t = @t; //~ ERROR this type cannot be instantiated // I use an impl here because it will cause // the compiler to attempt autoderef and then diff --git a/src/test/compile-fail/issue-2111.rs b/src/test/compile-fail/issue-2111.rs index 5e289af9f51..957d84eaa84 100644 --- a/src/test/compile-fail/issue-2111.rs +++ b/src/test/compile-fail/issue-2111.rs @@ -1,5 +1,5 @@ fn foo(a: option<uint>, b: option<uint>) { - alt (a,b) { //! ERROR: non-exhaustive patterns: none not covered + alt (a,b) { //~ ERROR: non-exhaustive patterns: none not covered (some(a), some(b)) if a == b { } (some(_), none) | (none, some(_)) { } diff --git a/src/test/compile-fail/issue-2149.rs b/src/test/compile-fail/issue-2149.rs index 6363ca5fb6c..c8b36e0da18 100644 --- a/src/test/compile-fail/issue-2149.rs +++ b/src/test/compile-fail/issue-2149.rs @@ -2,8 +2,8 @@ impl monad<A> for [A]/~ { fn bind<B>(f: fn(A) -> [B]/~) { let mut r = fail; for self.each {|elt| r += f(elt); } - //!^ WARNING unreachable expression - //!^^ ERROR the type of this value must be known + //~^ WARNING unreachable expression + //~^^ ERROR the type of this value must be known } } fn main() { diff --git a/src/test/compile-fail/issue-2150.rs b/src/test/compile-fail/issue-2150.rs index a4877dad5b9..c523de89e84 100644 --- a/src/test/compile-fail/issue-2150.rs +++ b/src/test/compile-fail/issue-2150.rs @@ -1,8 +1,8 @@ fn fail_len(v: [const int]/~) -> uint { let mut i = fail; for v.each {|x| i += 1u; } - //!^ WARNING unreachable statement - //!^^ ERROR the type of this value must be known + //~^ WARNING unreachable statement + //~^^ ERROR the type of this value must be known ret i; } fn main() {} \ No newline at end of file diff --git a/src/test/compile-fail/issue-2151.rs b/src/test/compile-fail/issue-2151.rs index a69b6df1106..06ee782e779 100644 --- a/src/test/compile-fail/issue-2151.rs +++ b/src/test/compile-fail/issue-2151.rs @@ -1,6 +1,6 @@ fn main() { vec::iter(fail) {|i| log (debug, i * 2); - //!^ ERROR the type of this value must be known + //~^ ERROR the type of this value must be known }; } \ No newline at end of file diff --git a/src/test/compile-fail/issue-2330.rs b/src/test/compile-fail/issue-2330.rs index 355b90bb2aa..b0b21051714 100644 --- a/src/test/compile-fail/issue-2330.rs +++ b/src/test/compile-fail/issue-2330.rs @@ -5,7 +5,7 @@ iface channel<T> { } // `chan` is not an iface, it's an enum -impl of chan for int { //! ERROR can only implement interface types +impl of chan for int { //~ ERROR can only implement interface types fn send(v: int) { fail } } diff --git a/src/test/compile-fail/issue-2354.rs b/src/test/compile-fail/issue-2354.rs index 5b557cb1d75..cf7a36224bb 100644 --- a/src/test/compile-fail/issue-2354.rs +++ b/src/test/compile-fail/issue-2354.rs @@ -4,7 +4,7 @@ near the corresponding open brace. But currently it's reported at the end. xfailed for now (see Issue #2354) */ -fn foo() { //! ERROR this open brace is not closed +fn foo() { //~ ERROR this open brace is not closed alt some(x) { some(y) { fail; } none { fail; } diff --git a/src/test/compile-fail/issue-2467.rs b/src/test/compile-fail/issue-2467.rs index 2429273e1ec..f22fd18d356 100644 --- a/src/test/compile-fail/issue-2467.rs +++ b/src/test/compile-fail/issue-2467.rs @@ -1,5 +1,5 @@ -enum test { thing = 3u } //! ERROR mismatched types -//!^ ERROR expected signed integer constant +enum test { thing = 3u } //~ ERROR mismatched types +//~^ ERROR expected signed integer constant fn main() { log(error, thing as int); assert(thing as int == 3); diff --git a/src/test/compile-fail/issue-2487-b.rs b/src/test/compile-fail/issue-2487-b.rs index a1438c53187..9868bef2ec3 100644 --- a/src/test/compile-fail/issue-2487-b.rs +++ b/src/test/compile-fail/issue-2487-b.rs @@ -7,7 +7,7 @@ class socket { fn set_identity() { closure { || - setsockopt_bytes(self.sock) //! ERROR copying a noncopyable value + setsockopt_bytes(self.sock) //~ ERROR copying a noncopyable value } } } diff --git a/src/test/compile-fail/issue-2509-a.rs b/src/test/compile-fail/issue-2509-a.rs index 2113a1ec127..7039bec64d1 100644 --- a/src/test/compile-fail/issue-2509-a.rs +++ b/src/test/compile-fail/issue-2509-a.rs @@ -1,4 +1,4 @@ -class c { //! ERROR a class must have at least one field +class c { //~ ERROR a class must have at least one field new() { } } diff --git a/src/test/compile-fail/issue-2590.rs b/src/test/compile-fail/issue-2590.rs index c27fee9f8a8..d6e3022acc3 100644 --- a/src/test/compile-fail/issue-2590.rs +++ b/src/test/compile-fail/issue-2590.rs @@ -6,7 +6,7 @@ type parser = { impl parser for parser { fn parse() -> [mut int] { - dvec::unwrap(self.tokens) //! ERROR illegal move from self + dvec::unwrap(self.tokens) //~ ERROR illegal move from self } } diff --git a/src/test/compile-fail/issue-2718-a.rs b/src/test/compile-fail/issue-2718-a.rs index 1eb8d4a1b69..b068f9e1dc2 100644 --- a/src/test/compile-fail/issue-2718-a.rs +++ b/src/test/compile-fail/issue-2718-a.rs @@ -6,7 +6,7 @@ class send_packet<T: copy> { mod pingpong { type ping = send_packet<pong>; - enum pong = send_packet<ping>; //! ERROR illegal recursive enum type; wrap the inner value in a box to make it representable + enum pong = send_packet<ping>; //~ ERROR illegal recursive enum type; wrap the inner value in a box to make it representable } fn main() {} diff --git a/src/test/compile-fail/issue-511.rs b/src/test/compile-fail/issue-511.rs index 793bb48c79a..9dea2443187 100644 --- a/src/test/compile-fail/issue-511.rs +++ b/src/test/compile-fail/issue-511.rs @@ -7,7 +7,7 @@ fn f<T>(&o: option<T>) { fn main() { f::<int>(option::none); - //!^ ERROR taking mut reference to static item - //!^^ ERROR illegal borrow unless pure: creating mutable alias to aliasable, immutable memory - //!^^^ NOTE impure due to access to impure function + //~^ ERROR taking mut reference to static item + //~^^ ERROR illegal borrow unless pure: creating mutable alias to aliasable, immutable memory + //~^^^ NOTE impure due to access to impure function } \ No newline at end of file diff --git a/src/test/compile-fail/issue-897-2.rs b/src/test/compile-fail/issue-897-2.rs index ee9ff378804..ce6737cc962 100644 --- a/src/test/compile-fail/issue-897-2.rs +++ b/src/test/compile-fail/issue-897-2.rs @@ -1,6 +1,6 @@ fn g() -> ! { fail; } fn f() -> ! { - ret 42i; //! ERROR expected `_|_` but found `int` - g(); //! WARNING unreachable statement + ret 42i; //~ ERROR expected `_|_` but found `int` + g(); //~ WARNING unreachable statement } fn main() { } diff --git a/src/test/compile-fail/issue-897.rs b/src/test/compile-fail/issue-897.rs index 35a56b255af..1adf8534cca 100644 --- a/src/test/compile-fail/issue-897.rs +++ b/src/test/compile-fail/issue-897.rs @@ -1,5 +1,5 @@ fn f() -> ! { - ret 42i; //! ERROR expected `_|_` but found `int` - fail; //! WARNING unreachable statement + ret 42i; //~ ERROR expected `_|_` but found `int` + fail; //~ WARNING unreachable statement } fn main() { } diff --git a/src/test/compile-fail/kindck-implicit-close-over-mut-var.rs b/src/test/compile-fail/kindck-implicit-close-over-mut-var.rs index d646d6db07f..f1da5ef1328 100644 --- a/src/test/compile-fail/kindck-implicit-close-over-mut-var.rs +++ b/src/test/compile-fail/kindck-implicit-close-over-mut-var.rs @@ -4,7 +4,7 @@ fn foo() { // Here, i is *moved* into the closure: Not actually OK let mut i = 0; task::spawn {|| - use(i); //! ERROR mutable variables cannot be implicitly captured + use(i); //~ ERROR mutable variables cannot be implicitly captured } } @@ -14,7 +14,7 @@ fn bar() { let mut i = 0; while i < 10 { task::spawn {|| - use(i); //! ERROR mutable variables cannot be implicitly captured + use(i); //~ ERROR mutable variables cannot be implicitly captured } i += 1; } diff --git a/src/test/compile-fail/kindck-nonsendable-1.rs b/src/test/compile-fail/kindck-nonsendable-1.rs index 29f34c5a51e..fce28489cbf 100644 --- a/src/test/compile-fail/kindck-nonsendable-1.rs +++ b/src/test/compile-fail/kindck-nonsendable-1.rs @@ -2,7 +2,7 @@ fn foo(_x: @uint) {} fn main() { let x = @3u; - let _ = fn~() { foo(x); }; //! ERROR not a sendable value - let _ = fn~(copy x) { foo(x); }; //! ERROR not a sendable value - let _ = fn~(move x) { foo(x); }; //! ERROR not a sendable value + let _ = fn~() { foo(x); }; //~ ERROR not a sendable value + let _ = fn~(copy x) { foo(x); }; //~ ERROR not a sendable value + let _ = fn~(move x) { foo(x); }; //~ ERROR not a sendable value } \ No newline at end of file diff --git a/src/test/compile-fail/liveness-and-init.rs b/src/test/compile-fail/liveness-and-init.rs index aea30e3465c..7deafdce363 100644 --- a/src/test/compile-fail/liveness-and-init.rs +++ b/src/test/compile-fail/liveness-and-init.rs @@ -2,5 +2,5 @@ fn main() { let i: int; log(debug, false && { i = 5; true }); - log(debug, i); //! ERROR use of possibly uninitialized variable: `i` + log(debug, i); //~ ERROR use of possibly uninitialized variable: `i` } diff --git a/src/test/compile-fail/liveness-assign-imm-local-in-loop.rs b/src/test/compile-fail/liveness-assign-imm-local-in-loop.rs index 2fc1bca5a63..41b9fd4f1d9 100644 --- a/src/test/compile-fail/liveness-assign-imm-local-in-loop.rs +++ b/src/test/compile-fail/liveness-assign-imm-local-in-loop.rs @@ -1,8 +1,8 @@ fn test() { let v: int; loop { - v = 1; //! ERROR re-assignment of immutable variable - //!^ NOTE prior assignment occurs here + v = 1; //~ ERROR re-assignment of immutable variable + //~^ NOTE prior assignment occurs here copy v; // just to prevent liveness warnings } } diff --git a/src/test/compile-fail/liveness-assign-imm-local-in-op-eq.rs b/src/test/compile-fail/liveness-assign-imm-local-in-op-eq.rs index adb42333523..baf0d55f057 100644 --- a/src/test/compile-fail/liveness-assign-imm-local-in-op-eq.rs +++ b/src/test/compile-fail/liveness-assign-imm-local-in-op-eq.rs @@ -1,7 +1,7 @@ fn test() { let v: int; - v = 2; //! NOTE prior assignment occurs here - v += 1; //! ERROR re-assignment of immutable variable + v = 2; //~ NOTE prior assignment occurs here + v += 1; //~ ERROR re-assignment of immutable variable copy v; } diff --git a/src/test/compile-fail/liveness-assign-imm-local-in-swap.rs b/src/test/compile-fail/liveness-assign-imm-local-in-swap.rs index c432d03bed3..d2388f200d6 100644 --- a/src/test/compile-fail/liveness-assign-imm-local-in-swap.rs +++ b/src/test/compile-fail/liveness-assign-imm-local-in-swap.rs @@ -1,17 +1,17 @@ fn test1() { let v: int; let mut w: int; - v = 1; //! NOTE prior assignment occurs here + v = 1; //~ NOTE prior assignment occurs here w = 2; - v <-> w; //! ERROR re-assignment of immutable variable + v <-> w; //~ ERROR re-assignment of immutable variable } fn test2() { let v: int; let mut w: int; - v = 1; //! NOTE prior assignment occurs here + v = 1; //~ NOTE prior assignment occurs here w = 2; - w <-> v; //! ERROR re-assignment of immutable variable + w <-> v; //~ ERROR re-assignment of immutable variable } fn main() { diff --git a/src/test/compile-fail/liveness-assign-imm-local-with-init.rs b/src/test/compile-fail/liveness-assign-imm-local-with-init.rs index 045ce5baa46..1b46e97dbd2 100644 --- a/src/test/compile-fail/liveness-assign-imm-local-with-init.rs +++ b/src/test/compile-fail/liveness-assign-imm-local-with-init.rs @@ -1,7 +1,7 @@ fn test() { - let v: int = 1; //! NOTE prior assignment occurs here + let v: int = 1; //~ NOTE prior assignment occurs here copy v; - v = 2; //! ERROR re-assignment of immutable variable + v = 2; //~ ERROR re-assignment of immutable variable copy v; } diff --git a/src/test/compile-fail/liveness-block-unint.rs b/src/test/compile-fail/liveness-block-unint.rs index 698f9f7cf79..e341ed33c2f 100644 --- a/src/test/compile-fail/liveness-block-unint.rs +++ b/src/test/compile-fail/liveness-block-unint.rs @@ -2,6 +2,6 @@ fn force(f: fn()) { f(); } fn main() { let x: int; force(fn&() { - log(debug, x); //! ERROR capture of possibly uninitialized variable: `x` + log(debug, x); //~ ERROR capture of possibly uninitialized variable: `x` }); } diff --git a/src/test/compile-fail/liveness-break-uninit-2.rs b/src/test/compile-fail/liveness-break-uninit-2.rs index 4b18845f878..fc1c941836e 100644 --- a/src/test/compile-fail/liveness-break-uninit-2.rs +++ b/src/test/compile-fail/liveness-break-uninit-2.rs @@ -3,10 +3,10 @@ fn foo() -> int { while 1 != 2 { break; - x = 0; //! WARNING unreachable statement + x = 0; //~ WARNING unreachable statement } - log(debug, x); //! ERROR use of possibly uninitialized variable: `x` + log(debug, x); //~ ERROR use of possibly uninitialized variable: `x` ret 17; } diff --git a/src/test/compile-fail/liveness-break-uninit.rs b/src/test/compile-fail/liveness-break-uninit.rs index 5bba9535e53..56753a3a95c 100644 --- a/src/test/compile-fail/liveness-break-uninit.rs +++ b/src/test/compile-fail/liveness-break-uninit.rs @@ -3,10 +3,10 @@ fn foo() -> int { loop { break; - x = 0; //! WARNING unreachable statement + x = 0; //~ WARNING unreachable statement } - log(debug, x); //! ERROR use of possibly uninitialized variable: `x` + log(debug, x); //~ ERROR use of possibly uninitialized variable: `x` ret 17; } diff --git a/src/test/compile-fail/liveness-ctor-access-self-with-uninit-fields.rs b/src/test/compile-fail/liveness-ctor-access-self-with-uninit-fields.rs index 9c982292816..0480bc71798 100644 --- a/src/test/compile-fail/liveness-ctor-access-self-with-uninit-fields.rs +++ b/src/test/compile-fail/liveness-ctor-access-self-with-uninit-fields.rs @@ -3,7 +3,7 @@ class cat { fn meow() {} new() { self.meow(); - //!^ ERROR use of possibly uninitialized field: `self.how_hungry` + //~^ ERROR use of possibly uninitialized field: `self.how_hungry` } } diff --git a/src/test/compile-fail/liveness-ctor-field-never-init.rs b/src/test/compile-fail/liveness-ctor-field-never-init.rs index b979bdd9255..d71dff98064 100644 --- a/src/test/compile-fail/liveness-ctor-field-never-init.rs +++ b/src/test/compile-fail/liveness-ctor-field-never-init.rs @@ -1,6 +1,6 @@ class cat { let how_hungry : int; - new() {} //! ERROR field `self.how_hungry` is never initialized + new() {} //~ ERROR field `self.how_hungry` is never initialized } fn main() { diff --git a/src/test/compile-fail/liveness-ctor-uninit-field.rs b/src/test/compile-fail/liveness-ctor-uninit-field.rs index 080d4678a2f..3d4a88db262 100644 --- a/src/test/compile-fail/liveness-ctor-uninit-field.rs +++ b/src/test/compile-fail/liveness-ctor-uninit-field.rs @@ -6,7 +6,7 @@ class cat { new() { self.a = 3; self.b = self.a; - self.a += self.c; //! ERROR use of possibly uninitialized field: `self.c` + self.a += self.c; //~ ERROR use of possibly uninitialized field: `self.c` } } diff --git a/src/test/compile-fail/liveness-ctor-uninit-var.rs b/src/test/compile-fail/liveness-ctor-uninit-var.rs index 3bbccd62ae3..d03c7888974 100644 --- a/src/test/compile-fail/liveness-ctor-uninit-var.rs +++ b/src/test/compile-fail/liveness-ctor-uninit-var.rs @@ -12,7 +12,7 @@ class cat { new(in_x : uint, in_y : int) { let foo; self.meows = in_x + (in_y as uint); - self.how_hungry = foo; //! ERROR use of possibly uninitialized variable: `foo` + self.how_hungry = foo; //~ ERROR use of possibly uninitialized variable: `foo` } } diff --git a/src/test/compile-fail/liveness-dead.rs b/src/test/compile-fail/liveness-dead.rs index bda153b5ad4..a115d7c4e34 100644 --- a/src/test/compile-fail/liveness-dead.rs +++ b/src/test/compile-fail/liveness-dead.rs @@ -3,7 +3,7 @@ fn f1(&x: int) { } fn f2() { - let mut x = 3; //! WARNING value assigned to `x` is never read + let mut x = 3; //~ WARNING value assigned to `x` is never read x = 4; copy x; } @@ -11,10 +11,10 @@ fn f2() { fn f3() { let mut x = 3; copy x; - x = 4; //! WARNING value assigned to `x` is never read + x = 4; //~ WARNING value assigned to `x` is never read } fn main() { // leave this in here just to trigger compile-fail: let x: int; - copy x; //! ERROR use of possibly uninitialized variable: `x` + copy x; //~ ERROR use of possibly uninitialized variable: `x` } diff --git a/src/test/compile-fail/liveness-if-no-else.rs b/src/test/compile-fail/liveness-if-no-else.rs index 5cbd24a6a5b..dfdcfa266fc 100644 --- a/src/test/compile-fail/liveness-if-no-else.rs +++ b/src/test/compile-fail/liveness-if-no-else.rs @@ -2,5 +2,5 @@ fn foo(x: int) { log(debug, x); } fn main() { let x: int; if 1 > 2 { x = 10; } - foo(x); //! ERROR use of possibly uninitialized variable: `x` + foo(x); //~ ERROR use of possibly uninitialized variable: `x` } diff --git a/src/test/compile-fail/liveness-if-with-else.rs b/src/test/compile-fail/liveness-if-with-else.rs index dbb3e6b1645..7f7003dbbe4 100644 --- a/src/test/compile-fail/liveness-if-with-else.rs +++ b/src/test/compile-fail/liveness-if-with-else.rs @@ -7,5 +7,5 @@ fn main() { } else { x = 10; } - foo(x); //! ERROR use of possibly uninitialized variable: `x` + foo(x); //~ ERROR use of possibly uninitialized variable: `x` } diff --git a/src/test/compile-fail/liveness-init-in-called-fn-expr.rs b/src/test/compile-fail/liveness-init-in-called-fn-expr.rs index 28351ceeb08..5716a380936 100644 --- a/src/test/compile-fail/liveness-init-in-called-fn-expr.rs +++ b/src/test/compile-fail/liveness-init-in-called-fn-expr.rs @@ -1,7 +1,7 @@ fn main() { let j = fn@() -> int { let i: int; - ret i; //! ERROR use of possibly uninitialized variable: `i` + ret i; //~ ERROR use of possibly uninitialized variable: `i` }; j(); } diff --git a/src/test/compile-fail/liveness-init-in-fn-expr.rs b/src/test/compile-fail/liveness-init-in-fn-expr.rs index 8c68ba750a8..cffba2132c2 100644 --- a/src/test/compile-fail/liveness-init-in-fn-expr.rs +++ b/src/test/compile-fail/liveness-init-in-fn-expr.rs @@ -1,7 +1,7 @@ fn main() { let f = fn@() -> int { let i: int; - ret i; //! ERROR use of possibly uninitialized variable: `i` + ret i; //~ ERROR use of possibly uninitialized variable: `i` }; log(error, f()); } diff --git a/src/test/compile-fail/liveness-init-in-fru.rs b/src/test/compile-fail/liveness-init-in-fru.rs index a9a80e9ad6e..f6ba7c32792 100644 --- a/src/test/compile-fail/liveness-init-in-fru.rs +++ b/src/test/compile-fail/liveness-init-in-fru.rs @@ -4,6 +4,6 @@ type point = {x: int, y: int}; fn main() { let mut origin: point; - origin = {x: 10 with origin}; //! ERROR use of possibly uninitialized variable: `origin` + origin = {x: 10 with origin}; //~ ERROR use of possibly uninitialized variable: `origin` copy origin; } diff --git a/src/test/compile-fail/liveness-init-op-equal.rs b/src/test/compile-fail/liveness-init-op-equal.rs index 8d397e73b1f..89b07847e73 100644 --- a/src/test/compile-fail/liveness-init-op-equal.rs +++ b/src/test/compile-fail/liveness-init-op-equal.rs @@ -1,6 +1,6 @@ fn test() { let v: int; - v += 1; //! ERROR use of possibly uninitialized variable: `v` + v += 1; //~ ERROR use of possibly uninitialized variable: `v` copy v; } diff --git a/src/test/compile-fail/liveness-init-plus-equal.rs b/src/test/compile-fail/liveness-init-plus-equal.rs index dacc1f4f922..afb384b24d5 100644 --- a/src/test/compile-fail/liveness-init-plus-equal.rs +++ b/src/test/compile-fail/liveness-init-plus-equal.rs @@ -1,6 +1,6 @@ fn test() { let mut v: int; - v = v + 1; //! ERROR use of possibly uninitialized variable: `v` + v = v + 1; //~ ERROR use of possibly uninitialized variable: `v` copy v; } diff --git a/src/test/compile-fail/liveness-issue-2163.rs b/src/test/compile-fail/liveness-issue-2163.rs index e5a7cd0365d..0165cd8e86f 100644 --- a/src/test/compile-fail/liveness-issue-2163.rs +++ b/src/test/compile-fail/liveness-issue-2163.rs @@ -1,5 +1,5 @@ fn main(_s: [str]/~) { let a: [int]/~ = []/~; - vec::each(a) { |_x| //! ERROR not all control paths return a value + vec::each(a) { |_x| //~ ERROR not all control paths return a value } } diff --git a/src/test/compile-fail/liveness-move-from-args.rs b/src/test/compile-fail/liveness-move-from-args.rs index 0c3e594040b..27e7e51b405 100644 --- a/src/test/compile-fail/liveness-move-from-args.rs +++ b/src/test/compile-fail/liveness-move-from-args.rs @@ -1,15 +1,15 @@ fn take(-_x: int) { } fn from_by_value_arg(++x: int) { - take(x); //! ERROR illegal move from argument `x`, which is not copy or move mode + take(x); //~ ERROR illegal move from argument `x`, which is not copy or move mode } fn from_by_mut_ref_arg(&x: int) { - take(x); //! ERROR illegal move from argument `x`, which is not copy or move mode + take(x); //~ ERROR illegal move from argument `x`, which is not copy or move mode } fn from_by_ref_arg(&&x: int) { - take(x); //! ERROR illegal move from argument `x`, which is not copy or move mode + take(x); //~ ERROR illegal move from argument `x`, which is not copy or move mode } fn from_copy_arg(+x: int) { diff --git a/src/test/compile-fail/liveness-move-from-mode.rs b/src/test/compile-fail/liveness-move-from-mode.rs index f0db4926734..a837d337f98 100644 --- a/src/test/compile-fail/liveness-move-from-mode.rs +++ b/src/test/compile-fail/liveness-move-from-mode.rs @@ -4,7 +4,7 @@ fn main() { let x: int = 25; loop { - take(x); //! ERROR use of moved variable: `x` - //!^ NOTE move of variable occurred here + take(x); //~ ERROR use of moved variable: `x` + //~^ NOTE move of variable occurred here } } diff --git a/src/test/compile-fail/liveness-move-in-loop.rs b/src/test/compile-fail/liveness-move-in-loop.rs index 1bdfc392bd9..d9233e41e38 100644 --- a/src/test/compile-fail/liveness-move-in-loop.rs +++ b/src/test/compile-fail/liveness-move-in-loop.rs @@ -7,8 +7,8 @@ fn main() { loop { loop { loop { - x <- y; //! ERROR use of moved variable - //!^ NOTE move of variable occurred here + x <- y; //~ ERROR use of moved variable + //~^ NOTE move of variable occurred here copy x; } diff --git a/src/test/compile-fail/liveness-move-in-while.rs b/src/test/compile-fail/liveness-move-in-while.rs index d5a95b08bd8..261eb310890 100644 --- a/src/test/compile-fail/liveness-move-in-while.rs +++ b/src/test/compile-fail/liveness-move-in-while.rs @@ -5,7 +5,7 @@ fn main() { loop { log(debug, y); while true { while true { while true { x <- y; copy x; } } } - //!^ ERROR use of moved variable: `y` - //!^^ NOTE move of variable occurred here + //~^ ERROR use of moved variable: `y` + //~^^ NOTE move of variable occurred here } } diff --git a/src/test/compile-fail/liveness-or-init.rs b/src/test/compile-fail/liveness-or-init.rs index 5912378cf42..138dbc0a7a8 100644 --- a/src/test/compile-fail/liveness-or-init.rs +++ b/src/test/compile-fail/liveness-or-init.rs @@ -2,5 +2,5 @@ fn main() { let i: int; log(debug, false || { i = 5; true }); - log(debug, i); //! ERROR use of possibly uninitialized variable: `i` + log(debug, i); //~ ERROR use of possibly uninitialized variable: `i` } diff --git a/src/test/compile-fail/liveness-return.rs b/src/test/compile-fail/liveness-return.rs index cee1444ca63..830eb9f8e89 100644 --- a/src/test/compile-fail/liveness-return.rs +++ b/src/test/compile-fail/liveness-return.rs @@ -1,6 +1,6 @@ fn f() -> int { let x: int; - ret x; //! ERROR use of possibly uninitialized variable: `x` + ret x; //~ ERROR use of possibly uninitialized variable: `x` } fn main() { f(); } diff --git a/src/test/compile-fail/liveness-swap-uninit.rs b/src/test/compile-fail/liveness-swap-uninit.rs index d3a5395bfff..5291c9925b6 100644 --- a/src/test/compile-fail/liveness-swap-uninit.rs +++ b/src/test/compile-fail/liveness-swap-uninit.rs @@ -1,6 +1,6 @@ fn main() { let mut x = 3; let y; - x <-> y; //! ERROR use of possibly uninitialized variable: `y` + x <-> y; //~ ERROR use of possibly uninitialized variable: `y` copy x; } diff --git a/src/test/compile-fail/liveness-uninit-after-item.rs b/src/test/compile-fail/liveness-uninit-after-item.rs index 678a063284e..af8afda4e62 100644 --- a/src/test/compile-fail/liveness-uninit-after-item.rs +++ b/src/test/compile-fail/liveness-uninit-after-item.rs @@ -1,6 +1,6 @@ fn main() { let bar; fn baz(_x: int) { } - baz(bar); //! ERROR use of possibly uninitialized variable: `bar` + baz(bar); //~ ERROR use of possibly uninitialized variable: `bar` } diff --git a/src/test/compile-fail/liveness-uninit.rs b/src/test/compile-fail/liveness-uninit.rs index 1930a2e3352..59bb9e847dc 100644 --- a/src/test/compile-fail/liveness-uninit.rs +++ b/src/test/compile-fail/liveness-uninit.rs @@ -2,5 +2,5 @@ fn foo(x: int) { log(debug, x); } fn main() { let x: int; - foo(x); //! ERROR use of possibly uninitialized variable: `x` + foo(x); //~ ERROR use of possibly uninitialized variable: `x` } diff --git a/src/test/compile-fail/liveness-unused.rs b/src/test/compile-fail/liveness-unused.rs index a1ad07f6ecb..7db0a9fe171 100644 --- a/src/test/compile-fail/liveness-unused.rs +++ b/src/test/compile-fail/liveness-unused.rs @@ -1,26 +1,26 @@ fn f1(x: int) { - //!^ WARNING unused variable: `x` + //~^ WARNING unused variable: `x` } fn f1b(&x: int) { - //!^ WARNING unused variable: `x` + //~^ WARNING unused variable: `x` } fn f2() { let x = 3; - //!^ WARNING unused variable: `x` + //~^ WARNING unused variable: `x` } fn f3() { let mut x = 3; - //!^ WARNING variable `x` is assigned to, but never used + //~^ WARNING variable `x` is assigned to, but never used x += 4; - //!^ WARNING value assigned to `x` is never read + //~^ WARNING value assigned to `x` is never read } fn f3b() { let mut z = 3; - //!^ WARNING variable `z` is assigned to, but never used + //~^ WARNING variable `z` is assigned to, but never used loop { z += 4; } @@ -40,5 +40,5 @@ fn even(i: int) : is_even(i) -> int { i } fn main() { let i: int = 4; log(debug, false && { check is_even(i); true }); - even(i); //! ERROR unsatisfied precondition + even(i); //~ ERROR unsatisfied precondition } diff --git a/src/test/compile-fail/liveness-use-after-move.rs b/src/test/compile-fail/liveness-use-after-move.rs index 34a932a5a16..f060fe8307f 100644 --- a/src/test/compile-fail/liveness-use-after-move.rs +++ b/src/test/compile-fail/liveness-use-after-move.rs @@ -1,6 +1,6 @@ fn main() { let x = @5; - let y <- x; //! NOTE move of variable occurred here - log(debug, *x); //! ERROR use of moved variable: `x` + let y <- x; //~ NOTE move of variable occurred here + log(debug, *x); //~ ERROR use of moved variable: `x` copy y; } diff --git a/src/test/compile-fail/liveness-use-after-send.rs b/src/test/compile-fail/liveness-use-after-send.rs index 3827598c0a7..6dfa9a997ff 100644 --- a/src/test/compile-fail/liveness-use-after-send.rs +++ b/src/test/compile-fail/liveness-use-after-send.rs @@ -9,8 +9,8 @@ enum _chan<T> = int; // Tests that "log(debug, message);" is flagged as using // message after the send deinitializes it fn test00_start(ch: _chan<int>, message: int, _count: int) { - send(ch, message); //! NOTE move of variable occurred here - log(debug, message); //! ERROR use of moved variable: `message` + send(ch, message); //~ NOTE move of variable occurred here + log(debug, message); //~ ERROR use of moved variable: `message` } fn main() { fail; } diff --git a/src/test/compile-fail/liveness-use-in-index-lvalue.rs b/src/test/compile-fail/liveness-use-in-index-lvalue.rs index fd7ad945a57..de0706ecb6c 100644 --- a/src/test/compile-fail/liveness-use-in-index-lvalue.rs +++ b/src/test/compile-fail/liveness-use-in-index-lvalue.rs @@ -1,6 +1,6 @@ fn test() { let w: [int]/~; - w[5] = 0; //! ERROR use of possibly uninitialized variable: `w` + w[5] = 0; //~ ERROR use of possibly uninitialized variable: `w` } fn main() { test(); } diff --git a/src/test/compile-fail/liveness-while-break.rs b/src/test/compile-fail/liveness-while-break.rs index 755deb31fba..c963e2dee4e 100644 --- a/src/test/compile-fail/liveness-while-break.rs +++ b/src/test/compile-fail/liveness-while-break.rs @@ -4,7 +4,7 @@ fn test(cond: bool) { v = 3; break; } - #debug["%d", v]; //! ERROR use of possibly uninitialized variable: `v` + #debug["%d", v]; //~ ERROR use of possibly uninitialized variable: `v` } fn main() { diff --git a/src/test/compile-fail/liveness-while-cond.rs b/src/test/compile-fail/liveness-while-cond.rs index a0a90e9550c..28a5fb18a7f 100644 --- a/src/test/compile-fail/liveness-while-cond.rs +++ b/src/test/compile-fail/liveness-while-cond.rs @@ -1,4 +1,4 @@ fn main() { let x: bool; - while x { } //! ERROR use of possibly uninitialized variable: `x` + while x { } //~ ERROR use of possibly uninitialized variable: `x` } diff --git a/src/test/compile-fail/liveness-while.rs b/src/test/compile-fail/liveness-while.rs index b69012bc3f2..9cd61330bae 100644 --- a/src/test/compile-fail/liveness-while.rs +++ b/src/test/compile-fail/liveness-while.rs @@ -1,7 +1,7 @@ fn f() -> int { let mut x: int; while 1 == 1 { x = 10; } - ret x; //! ERROR use of possibly uninitialized variable: `x` + ret x; //~ ERROR use of possibly uninitialized variable: `x` } fn main() { f(); } diff --git a/src/test/compile-fail/loop-does-not-diverge.rs b/src/test/compile-fail/loop-does-not-diverge.rs index e0cf57c1588..06a227cffd2 100644 --- a/src/test/compile-fail/loop-does-not-diverge.rs +++ b/src/test/compile-fail/loop-does-not-diverge.rs @@ -4,7 +4,7 @@ fn forever() -> ! { loop { break; } - ret 42i; //! ERROR expected `_|_` but found `int` + ret 42i; //~ ERROR expected `_|_` but found `int` } fn main() { diff --git a/src/test/compile-fail/lub-in-args.rs b/src/test/compile-fail/lub-in-args.rs index 1b10639445a..dd44a137161 100644 --- a/src/test/compile-fail/lub-in-args.rs +++ b/src/test/compile-fail/lub-in-args.rs @@ -12,6 +12,6 @@ fn main() { // shortcoming of the current inference algorithm. These errors // are *not* desirable. - two_args(x, y); //! ERROR (values differ in mutability) - two_args(a, b); //! ERROR (values differ in mutability) + two_args(x, y); //~ ERROR (values differ in mutability) + two_args(a, b); //~ ERROR (values differ in mutability) } \ No newline at end of file diff --git a/src/test/compile-fail/main-wrong-type-2.rs b/src/test/compile-fail/main-wrong-type-2.rs index 338956f7796..106b0daf4b3 100644 --- a/src/test/compile-fail/main-wrong-type-2.rs +++ b/src/test/compile-fail/main-wrong-type-2.rs @@ -1,3 +1,3 @@ fn main() -> char { -//!^ ERROR Wrong type in main function: found `extern fn() -> char` +//~^ ERROR Wrong type in main function: found `extern fn() -> char` } diff --git a/src/test/compile-fail/main-wrong-type.rs b/src/test/compile-fail/main-wrong-type.rs index 859a70e0a51..b920f02e069 100644 --- a/src/test/compile-fail/main-wrong-type.rs +++ b/src/test/compile-fail/main-wrong-type.rs @@ -1,3 +1,3 @@ fn main(foo: {x: int, y: int}) { -//!^ ERROR Wrong type in main function: found `extern fn({x: int,y: int})` +//~^ ERROR Wrong type in main function: found `extern fn({x: int,y: int})` } diff --git a/src/test/compile-fail/map-types.rs b/src/test/compile-fail/map-types.rs index c4005048bf1..084cbf9529c 100644 --- a/src/test/compile-fail/map-types.rs +++ b/src/test/compile-fail/map-types.rs @@ -8,5 +8,5 @@ import std::map::map; fn main() { let x: map<str,str> = map::str_hash::<str>() as map::<str,str>; let y: map<uint,str> = x; - //!^ ERROR mismatched types: expected `std::map::map<uint,str>` + //~^ ERROR mismatched types: expected `std::map::map<uint,str>` } diff --git a/src/test/compile-fail/mode-inference-fail.rs b/src/test/compile-fail/mode-inference-fail.rs index 732c9a4311f..0a42bef5968 100644 --- a/src/test/compile-fail/mode-inference-fail.rs +++ b/src/test/compile-fail/mode-inference-fail.rs @@ -7,5 +7,5 @@ fn apply_int(f: fn(int) -> int, a: int) -> int { f(a) } fn main() { let f = {|i| i}; assert apply_int(f, 2) == 2; - assert apply(f, 2) == 2; //! ERROR expected argument mode ++ + assert apply(f, 2) == 2; //~ ERROR expected argument mode ++ } diff --git a/src/test/compile-fail/mutable-arguments.rs b/src/test/compile-fail/mutable-arguments.rs index 79e7f412163..4fcb73e8516 100644 --- a/src/test/compile-fail/mutable-arguments.rs +++ b/src/test/compile-fail/mutable-arguments.rs @@ -5,25 +5,25 @@ fn mutate_by_mut_ref(&x: uint) { } fn mutate_by_ref(&&x: uint) { - //!^ WARNING unused variable: `x` - x = 0u; //! ERROR assigning to argument + //~^ WARNING unused variable: `x` + x = 0u; //~ ERROR assigning to argument } fn mutate_by_val(++x: uint) { - //!^ WARNING unused variable: `x` - x = 0u; //! ERROR assigning to argument + //~^ WARNING unused variable: `x` + x = 0u; //~ ERROR assigning to argument } fn mutate_by_copy(+x: uint) { - //!^ WARNING unused variable: `x` - x = 0u; //! ERROR assigning to argument - //!^ WARNING value assigned to `x` is never read + //~^ WARNING unused variable: `x` + x = 0u; //~ ERROR assigning to argument + //~^ WARNING value assigned to `x` is never read } fn mutate_by_move(-x: uint) { - //!^ WARNING unused variable: `x` - x = 0u; //! ERROR assigning to argument - //!^ WARNING value assigned to `x` is never read + //~^ WARNING unused variable: `x` + x = 0u; //~ ERROR assigning to argument + //~^ WARNING value assigned to `x` is never read } fn main() { diff --git a/src/test/compile-fail/mutable-huh-box-assign.rs b/src/test/compile-fail/mutable-huh-box-assign.rs index 5b5150b985c..c9484e62c1e 100644 --- a/src/test/compile-fail/mutable-huh-box-assign.rs +++ b/src/test/compile-fail/mutable-huh-box-assign.rs @@ -1,6 +1,6 @@ fn main() { fn f(&&v: @const int) { - *v = 1 //! ERROR assigning to dereference of const @ pointer + *v = 1 //~ ERROR assigning to dereference of const @ pointer } let v = @0; diff --git a/src/test/compile-fail/mutable-huh-field-assign.rs b/src/test/compile-fail/mutable-huh-field-assign.rs index e1bf6fe665b..44da70f463c 100644 --- a/src/test/compile-fail/mutable-huh-field-assign.rs +++ b/src/test/compile-fail/mutable-huh-field-assign.rs @@ -1,7 +1,7 @@ fn main() { fn f(&&v: {const field: int}) { // This shouldn't be possible - v.field = 1 //! ERROR assigning to const field + v.field = 1 //~ ERROR assigning to const field } let v = {field: 0}; diff --git a/src/test/compile-fail/mutable-huh-ptr-assign.rs b/src/test/compile-fail/mutable-huh-ptr-assign.rs index 77ba86d6d6f..1aa965869be 100644 --- a/src/test/compile-fail/mutable-huh-ptr-assign.rs +++ b/src/test/compile-fail/mutable-huh-ptr-assign.rs @@ -2,7 +2,7 @@ use std; fn main() { unsafe fn f(&&v: *const int) { - *v = 1 //! ERROR assigning to dereference of const * pointer + *v = 1 //~ ERROR assigning to dereference of const * pointer } unsafe { diff --git a/src/test/compile-fail/mutable-huh-unique-assign.rs b/src/test/compile-fail/mutable-huh-unique-assign.rs index 591ea069b07..1b9b7a22191 100644 --- a/src/test/compile-fail/mutable-huh-unique-assign.rs +++ b/src/test/compile-fail/mutable-huh-unique-assign.rs @@ -1,6 +1,6 @@ fn main() { fn f(&&v: ~const int) { - *v = 1 //! ERROR assigning to dereference of const ~ pointer + *v = 1 //~ ERROR assigning to dereference of const ~ pointer } let v = ~0; diff --git a/src/test/compile-fail/mutable-huh-variance-vec1.rs b/src/test/compile-fail/mutable-huh-variance-vec1.rs index ba25fbbb9d7..3a3575e001f 100644 --- a/src/test/compile-fail/mutable-huh-variance-vec1.rs +++ b/src/test/compile-fail/mutable-huh-variance-vec1.rs @@ -8,5 +8,5 @@ fn main() { v[0] = [mut 3] } - f(v); //! ERROR (values differ in mutability) + f(v); //~ ERROR (values differ in mutability) } diff --git a/src/test/compile-fail/mutable-huh-variance-vec2.rs b/src/test/compile-fail/mutable-huh-variance-vec2.rs index cab07b804e6..69a69b447be 100644 --- a/src/test/compile-fail/mutable-huh-variance-vec2.rs +++ b/src/test/compile-fail/mutable-huh-variance-vec2.rs @@ -8,5 +8,5 @@ fn main() { v[0] = [3] } - f(v); //! ERROR (values differ in mutability) + f(v); //~ ERROR (values differ in mutability) } diff --git a/src/test/compile-fail/mutable-huh-variance-vec3.rs b/src/test/compile-fail/mutable-huh-variance-vec3.rs index afba07126cf..81844c69341 100644 --- a/src/test/compile-fail/mutable-huh-variance-vec3.rs +++ b/src/test/compile-fail/mutable-huh-variance-vec3.rs @@ -8,5 +8,5 @@ fn main() { v[0][1] = [mut 3] } - f(v); //! ERROR (values differ in mutability) + f(v); //~ ERROR (values differ in mutability) } diff --git a/src/test/compile-fail/mutable-huh-variance-vec4.rs b/src/test/compile-fail/mutable-huh-variance-vec4.rs index a7394928076..ebb535bcdd0 100644 --- a/src/test/compile-fail/mutable-huh-variance-vec4.rs +++ b/src/test/compile-fail/mutable-huh-variance-vec4.rs @@ -27,20 +27,20 @@ fn main() { f(v); g(v); - h(v); //! ERROR (values differ in mutability) - i(v); //! ERROR (values differ in mutability) - j(v); //! ERROR (values differ in mutability) + h(v); //~ ERROR (values differ in mutability) + i(v); //~ ERROR (values differ in mutability) + j(v); //~ ERROR (values differ in mutability) - f(w); //! ERROR (values differ in mutability) + f(w); //~ ERROR (values differ in mutability) g(w); h(w); - i(w); //! ERROR (values differ in mutability) - j(w); //! ERROR (values differ in mutability) + i(w); //~ ERROR (values differ in mutability) + j(w); //~ ERROR (values differ in mutability) // Note that without adding f() or h() to the mix, it is valid for // x to have the type [mut [const int]/~]/~, and thus we can safely // call g() and i() but not j(): g(x); i(x); - j(x); //! ERROR (values differ in mutability) + j(x); //~ ERROR (values differ in mutability) } diff --git a/src/test/compile-fail/mutable-huh-vec-assign.rs b/src/test/compile-fail/mutable-huh-vec-assign.rs index 3a94c6d9b17..9bf6b457513 100644 --- a/src/test/compile-fail/mutable-huh-vec-assign.rs +++ b/src/test/compile-fail/mutable-huh-vec-assign.rs @@ -1,7 +1,7 @@ fn main() { fn f(&&v: [const int]/~) { // This shouldn't be possible - v[0] = 1 //! ERROR assigning to const vec content + v[0] = 1 //~ ERROR assigning to const vec content } let v = [0]/~; diff --git a/src/test/compile-fail/native-unsafe-fn-called.rs b/src/test/compile-fail/native-unsafe-fn-called.rs index ee44500fee3..b24a4cf6918 100644 --- a/src/test/compile-fail/native-unsafe-fn-called.rs +++ b/src/test/compile-fail/native-unsafe-fn-called.rs @@ -7,6 +7,6 @@ native mod test { fn main() { test::free(); - //!^ ERROR access to unsafe function requires unsafe function or block + //~^ ERROR access to unsafe function requires unsafe function or block } diff --git a/src/test/compile-fail/native-unsafe-fn.rs b/src/test/compile-fail/native-unsafe-fn.rs index 8615c7795a9..fd2ace23457 100644 --- a/src/test/compile-fail/native-unsafe-fn.rs +++ b/src/test/compile-fail/native-unsafe-fn.rs @@ -7,7 +7,7 @@ native mod test { fn main() { let x = test::free; - //!^ ERROR access to unsafe function requires unsafe function or block + //~^ ERROR access to unsafe function requires unsafe function or block } diff --git a/src/test/compile-fail/no-reuse-move-arc.rs b/src/test/compile-fail/no-reuse-move-arc.rs index 2369edd43dc..87923c9cbeb 100644 --- a/src/test/compile-fail/no-reuse-move-arc.rs +++ b/src/test/compile-fail/no-reuse-move-arc.rs @@ -4,12 +4,12 @@ fn main() { let v = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]/~; let arc_v = arc::arc(v); - task::spawn() {|move arc_v| //! NOTE move of variable occurred here + task::spawn() {|move arc_v| //~ NOTE move of variable occurred here let v = *arc::get(&arc_v); assert v[3] == 4; }; - assert (*arc::get(&arc_v))[2] == 3; //! ERROR use of moved variable: `arc_v` + assert (*arc::get(&arc_v))[2] == 3; //~ ERROR use of moved variable: `arc_v` log(info, arc_v); } diff --git a/src/test/compile-fail/no-send-res-ports.rs b/src/test/compile-fail/no-send-res-ports.rs index 3f8fde8927e..b6ff823615a 100644 --- a/src/test/compile-fail/no-send-res-ports.rs +++ b/src/test/compile-fail/no-send-res-ports.rs @@ -7,7 +7,7 @@ fn main() { let x = ~mut some(foo(comm::port())); - task::spawn {|move x| //! ERROR not a sendable value + task::spawn {|move x| //~ ERROR not a sendable value let mut y = none; *x <-> y; log(error, y); diff --git a/src/test/compile-fail/noexporttypeexe.rs b/src/test/compile-fail/noexporttypeexe.rs index b88f3b34c61..22de85cdbfb 100644 --- a/src/test/compile-fail/noexporttypeexe.rs +++ b/src/test/compile-fail/noexporttypeexe.rs @@ -8,6 +8,6 @@ fn main() { // because the def_id associated with the type was // not convertible to a path. let x: int = noexporttypelib::foo(); - //!^ ERROR expected `int` but found `core::option::option<int>` + //~^ ERROR expected `int` but found `core::option::option<int>` } diff --git a/src/test/compile-fail/non-const.rs b/src/test/compile-fail/non-const.rs index ab542f3bc1e..5319b28e910 100644 --- a/src/test/compile-fail/non-const.rs +++ b/src/test/compile-fail/non-const.rs @@ -16,15 +16,15 @@ class r2 { fn main() { foo({f: 3}); - foo({mut f: 3}); //! ERROR missing `const` + foo({mut f: 3}); //~ ERROR missing `const` foo([1]/~); - foo([mut 1]/~); //! ERROR missing `const` + foo([mut 1]/~); //~ ERROR missing `const` foo(~1); - foo(~mut 1); //! ERROR missing `const` + foo(~mut 1); //~ ERROR missing `const` foo(@1); - foo(@mut 1); //! ERROR missing `const` + foo(@mut 1); //~ ERROR missing `const` foo(r(1)); // this is okay now. - foo(r2(@mut 1)); //! ERROR missing `const` + foo(r2(@mut 1)); //~ ERROR missing `const` foo("123"); - foo({f: {mut f: 1}}); //! ERROR missing `const` + foo({f: {mut f: 1}}); //~ ERROR missing `const` } diff --git a/src/test/compile-fail/non-copyable-void.rs b/src/test/compile-fail/non-copyable-void.rs index 07b93989ba7..6a77d0fb6e5 100644 --- a/src/test/compile-fail/non-copyable-void.rs +++ b/src/test/compile-fail/non-copyable-void.rs @@ -3,6 +3,6 @@ fn main() { let y : *libc::c_void = x as *libc::c_void; unsafe { let _z = *y; - //!^ ERROR copying a noncopyable value + //~^ ERROR copying a noncopyable value } } diff --git a/src/test/compile-fail/non-exhaustive-match.rs b/src/test/compile-fail/non-exhaustive-match.rs index 8863be41474..0d004df5c1a 100644 --- a/src/test/compile-fail/non-exhaustive-match.rs +++ b/src/test/compile-fail/non-exhaustive-match.rs @@ -2,21 +2,21 @@ enum t { a, b, } fn main() { let x = a; - alt x { b { } } //! ERROR non-exhaustive patterns - alt true { //! ERROR non-exhaustive patterns + alt x { b { } } //~ ERROR non-exhaustive patterns + alt true { //~ ERROR non-exhaustive patterns true {} } - alt @some(10) { //! ERROR non-exhaustive patterns + alt @some(10) { //~ ERROR non-exhaustive patterns @none {} } - alt (2, 3, 4) { //! ERROR non-exhaustive patterns + alt (2, 3, 4) { //~ ERROR non-exhaustive patterns (_, _, 4) {} } - alt (a, a) { //! ERROR non-exhaustive patterns + alt (a, a) { //~ ERROR non-exhaustive patterns (a, b) {} (b, a) {} } - alt a { //! ERROR b not covered + alt a { //~ ERROR b not covered a {} } // This is exhaustive, though the algorithm got it wrong at one point diff --git a/src/test/compile-fail/not-enough-arguments.rs b/src/test/compile-fail/not-enough-arguments.rs index 2aeda5a7652..36480253c97 100644 --- a/src/test/compile-fail/not-enough-arguments.rs +++ b/src/test/compile-fail/not-enough-arguments.rs @@ -8,5 +8,5 @@ fn foo(a: int, b: int, c: int, d:int) { fn main() { foo(1, 2, 3); - //!^ ERROR this function takes 4 parameters but 3 + //~^ ERROR this function takes 4 parameters but 3 } diff --git a/src/test/compile-fail/occurs-check.rs b/src/test/compile-fail/occurs-check.rs index a802967bc7a..49b6d42a129 100644 --- a/src/test/compile-fail/occurs-check.rs +++ b/src/test/compile-fail/occurs-check.rs @@ -1,4 +1,4 @@ fn main() { - let f; //! ERROR cyclic type of infinite size + let f; //~ ERROR cyclic type of infinite size f = @f; } diff --git a/src/test/compile-fail/omitted-arg-in-item-fn.rs b/src/test/compile-fail/omitted-arg-in-item-fn.rs index 85674b92a1d..157718a26a6 100644 --- a/src/test/compile-fail/omitted-arg-in-item-fn.rs +++ b/src/test/compile-fail/omitted-arg-in-item-fn.rs @@ -1,4 +1,4 @@ // xfail-test -fn foo(x) { //! ERROR expecting ':' but found ')' +fn foo(x) { //~ ERROR expecting ':' but found ')' } \ No newline at end of file diff --git a/src/test/compile-fail/omitted-arg-wrong-types.rs b/src/test/compile-fail/omitted-arg-wrong-types.rs index 7f5fb30f63b..e6ad54f219d 100644 --- a/src/test/compile-fail/omitted-arg-wrong-types.rs +++ b/src/test/compile-fail/omitted-arg-wrong-types.rs @@ -4,8 +4,8 @@ fn let_in<T>(x: T, f: fn(T)) {} fn main() { let_in(3u, fn&(i) { assert i == 3; }); - //!^ ERROR expected `uint` but found `int` + //~^ ERROR expected `uint` but found `int` let_in(3, fn&(i) { assert i == 3u; }); - //!^ ERROR expected `int` but found `uint` + //~^ ERROR expected `int` but found `uint` } \ No newline at end of file diff --git a/src/test/compile-fail/pat-shadow-in-nested-binding.rs b/src/test/compile-fail/pat-shadow-in-nested-binding.rs index 60fb9b831ab..c4ba5131879 100644 --- a/src/test/compile-fail/pat-shadow-in-nested-binding.rs +++ b/src/test/compile-fail/pat-shadow-in-nested-binding.rs @@ -1,5 +1,5 @@ enum foo = uint; fn main() { - let (foo, _) = (2, 3); //! ERROR declaration of `foo` shadows an enum that's in scope + let (foo, _) = (2, 3); //~ ERROR declaration of `foo` shadows an enum that's in scope } diff --git a/src/test/compile-fail/placement-new-bad-method-type.rs b/src/test/compile-fail/placement-new-bad-method-type.rs index 562faf84136..10db67161d1 100644 --- a/src/test/compile-fail/placement-new-bad-method-type.rs +++ b/src/test/compile-fail/placement-new-bad-method-type.rs @@ -11,5 +11,5 @@ impl methods for malloc_pool { fn main() { let p = &malloc_pool(()); let x = new(*p) 4u; - //!^ ERROR mismatched types: expected `fn(uint, uint) -> *()` + //~^ ERROR mismatched types: expected `fn(uint, uint) -> *()` } diff --git a/src/test/compile-fail/pptypedef.rs b/src/test/compile-fail/pptypedef.rs index 941535ef0f1..90d0df078b8 100644 --- a/src/test/compile-fail/pptypedef.rs +++ b/src/test/compile-fail/pptypedef.rs @@ -4,5 +4,5 @@ fn bar(_t: foo) {} fn main() { // we used to print foo<int>: - bar(some(3u)); //! ERROR mismatched types: expected `foo` + bar(some(3u)); //~ ERROR mismatched types: expected `foo` } \ No newline at end of file diff --git a/src/test/compile-fail/prim-with-args.rs b/src/test/compile-fail/prim-with-args.rs index 955d17cb33b..6edb9cb59d8 100644 --- a/src/test/compile-fail/prim-with-args.rs +++ b/src/test/compile-fail/prim-with-args.rs @@ -1,29 +1,29 @@ fn main() { -let x: int<int>; //! ERROR Type parameters are not allowed on this type. -let x: i8<int>; //! ERROR Type parameters are not allowed on this type. -let x: i16<int>; //! ERROR Type parameters are not allowed on this type. -let x: i32<int>; //! ERROR Type parameters are not allowed on this type. -let x: i64<int>; //! ERROR Type parameters are not allowed on this type. -let x: uint<int>; //! ERROR Type parameters are not allowed on this type. -let x: u8<int>; //! ERROR Type parameters are not allowed on this type. -let x: u16<int>; //! ERROR Type parameters are not allowed on this type. -let x: u32<int>; //! ERROR Type parameters are not allowed on this type. -let x: u64<int>; //! ERROR Type parameters are not allowed on this type. -let x: float<int>; //! ERROR Type parameters are not allowed on this type. -let x: char<int>; //! ERROR Type parameters are not allowed on this type. +let x: int<int>; //~ ERROR Type parameters are not allowed on this type. +let x: i8<int>; //~ ERROR Type parameters are not allowed on this type. +let x: i16<int>; //~ ERROR Type parameters are not allowed on this type. +let x: i32<int>; //~ ERROR Type parameters are not allowed on this type. +let x: i64<int>; //~ ERROR Type parameters are not allowed on this type. +let x: uint<int>; //~ ERROR Type parameters are not allowed on this type. +let x: u8<int>; //~ ERROR Type parameters are not allowed on this type. +let x: u16<int>; //~ ERROR Type parameters are not allowed on this type. +let x: u32<int>; //~ ERROR Type parameters are not allowed on this type. +let x: u64<int>; //~ ERROR Type parameters are not allowed on this type. +let x: float<int>; //~ ERROR Type parameters are not allowed on this type. +let x: char<int>; //~ ERROR Type parameters are not allowed on this type. -let x: int/&; //! ERROR Region parameters are not allowed on this type. -let x: i8/&; //! ERROR Region parameters are not allowed on this type. -let x: i16/&; //! ERROR Region parameters are not allowed on this type. -let x: i32/&; //! ERROR Region parameters are not allowed on this type. -let x: i64/&; //! ERROR Region parameters are not allowed on this type. -let x: uint/&; //! ERROR Region parameters are not allowed on this type. -let x: u8/&; //! ERROR Region parameters are not allowed on this type. -let x: u16/&; //! ERROR Region parameters are not allowed on this type. -let x: u32/&; //! ERROR Region parameters are not allowed on this type. -let x: u64/&; //! ERROR Region parameters are not allowed on this type. -let x: float/&; //! ERROR Region parameters are not allowed on this type. -let x: char/&; //! ERROR Region parameters are not allowed on this type. +let x: int/&; //~ ERROR Region parameters are not allowed on this type. +let x: i8/&; //~ ERROR Region parameters are not allowed on this type. +let x: i16/&; //~ ERROR Region parameters are not allowed on this type. +let x: i32/&; //~ ERROR Region parameters are not allowed on this type. +let x: i64/&; //~ ERROR Region parameters are not allowed on this type. +let x: uint/&; //~ ERROR Region parameters are not allowed on this type. +let x: u8/&; //~ ERROR Region parameters are not allowed on this type. +let x: u16/&; //~ ERROR Region parameters are not allowed on this type. +let x: u32/&; //~ ERROR Region parameters are not allowed on this type. +let x: u64/&; //~ ERROR Region parameters are not allowed on this type. +let x: float/&; //~ ERROR Region parameters are not allowed on this type. +let x: char/&; //~ ERROR Region parameters are not allowed on this type. } diff --git a/src/test/compile-fail/pure-higher-order.rs b/src/test/compile-fail/pure-higher-order.rs index 22d43c27e1a..830f065b623 100644 --- a/src/test/compile-fail/pure-higher-order.rs +++ b/src/test/compile-fail/pure-higher-order.rs @@ -19,20 +19,20 @@ pure fn range3(from: uint, to: uint, f: fn(uint)) { } pure fn range4(from: uint, to: uint) { - range(from, to, print) //! ERROR access to impure function prohibited in pure context + range(from, to, print) //~ ERROR access to impure function prohibited in pure context } pure fn range5(from: uint, to: uint, x: {f: fn(uint)}) { - range(from, to, x.f) //! ERROR access to impure function prohibited in pure context + range(from, to, x.f) //~ ERROR access to impure function prohibited in pure context } pure fn range6(from: uint, to: uint, x: @{f: fn(uint)}) { - range(from, to, x.f) //! ERROR access to impure function prohibited in pure context + range(from, to, x.f) //~ ERROR access to impure function prohibited in pure context } pure fn range7(from: uint, to: uint) { range(from, to) { |i| - print(i); //! ERROR access to impure function prohibited in pure context + print(i); //~ ERROR access to impure function prohibited in pure context } } diff --git a/src/test/compile-fail/pure-loop-body.rs b/src/test/compile-fail/pure-loop-body.rs index 5774cf19bb4..7a7f92e6a51 100644 --- a/src/test/compile-fail/pure-loop-body.rs +++ b/src/test/compile-fail/pure-loop-body.rs @@ -14,7 +14,7 @@ pure fn range2(from: uint, to: uint, f: fn(uint)) { pure fn range3(from: uint, to: uint, f: {x: fn(uint)}) { for range(from, to) { |i| - f.x(i*2u); //! ERROR access to impure function prohibited + f.x(i*2u); //~ ERROR access to impure function prohibited } } diff --git a/src/test/compile-fail/pure-modifies-aliased.rs b/src/test/compile-fail/pure-modifies-aliased.rs index e8f469a8c8c..d63169d512f 100644 --- a/src/test/compile-fail/pure-modifies-aliased.rs +++ b/src/test/compile-fail/pure-modifies-aliased.rs @@ -1,16 +1,16 @@ // Check that pure functions cannot modify aliased state. pure fn modify_in_ref(&&sum: {mut f: int}) { - sum.f = 3; //! ERROR assigning to mutable field prohibited in pure context + sum.f = 3; //~ ERROR assigning to mutable field prohibited in pure context } pure fn modify_in_box(sum: @mut {f: int}) { - sum.f = 3; //! ERROR assigning to mutable field prohibited in pure context + sum.f = 3; //~ ERROR assigning to mutable field prohibited in pure context } impl foo for int { pure fn modify_in_box_rec(sum: @{mut f: int}) { - sum.f = self; //! ERROR assigning to mutable field prohibited in pure context + sum.f = self; //~ ERROR assigning to mutable field prohibited in pure context } } diff --git a/src/test/compile-fail/pure-overloaded-op.rs b/src/test/compile-fail/pure-overloaded-op.rs index cb7bdeb6442..3f29e385202 100644 --- a/src/test/compile-fail/pure-overloaded-op.rs +++ b/src/test/compile-fail/pure-overloaded-op.rs @@ -15,12 +15,12 @@ impl foo for point { pure fn a(p: point) -> int { p + 3 } pure fn b(p: point) -> int { p * 3 } -//!^ ERROR access to impure function prohibited in pure context +//~^ ERROR access to impure function prohibited in pure context pure fn c(p: point) -> int { p[3] } -//!^ ERROR access to impure function prohibited in pure context +//~^ ERROR access to impure function prohibited in pure context pure fn d(p: point) -> int { -p } -//!^ ERROR access to impure function prohibited in pure context +//~^ ERROR access to impure function prohibited in pure context fn main() {} diff --git a/src/test/compile-fail/pure-subtyping.rs b/src/test/compile-fail/pure-subtyping.rs index da0cab02e6b..6725bd19e44 100644 --- a/src/test/compile-fail/pure-subtyping.rs +++ b/src/test/compile-fail/pure-subtyping.rs @@ -2,14 +2,14 @@ fn assign_to_pure(x: pure fn(), y: fn(), z: unsafe fn()) { let a: pure fn() = x; - let b: pure fn() = y; //! ERROR expected pure fn but found impure fn - let c: pure fn() = z; //! ERROR expected pure fn but found unsafe fn + let b: pure fn() = y; //~ ERROR expected pure fn but found impure fn + let c: pure fn() = z; //~ ERROR expected pure fn but found unsafe fn } fn assign_to_impure(x: pure fn(), y: fn(), z: unsafe fn()) { let h: fn() = x; let i: fn() = y; - let j: fn() = z; //! ERROR expected impure fn but found unsafe fn + let j: fn() = z; //~ ERROR expected impure fn but found unsafe fn } fn assign_to_unsafe(x: pure fn(), y: fn(), z: unsafe fn()) { @@ -20,16 +20,16 @@ fn assign_to_unsafe(x: pure fn(), y: fn(), z: unsafe fn()) { fn assign_to_pure2(x: pure fn@(), y: fn@(), z: unsafe fn@()) { let a: pure fn() = x; - let b: pure fn() = y; //! ERROR expected pure fn but found impure fn - let c: pure fn() = z; //! ERROR expected pure fn but found unsafe fn + let b: pure fn() = y; //~ ERROR expected pure fn but found impure fn + let c: pure fn() = z; //~ ERROR expected pure fn but found unsafe fn - let a: pure fn~() = x; //! ERROR closure protocol mismatch (fn~ vs fn@) - let b: pure fn~() = y; //! ERROR closure protocol mismatch (fn~ vs fn@) - let c: pure fn~() = z; //! ERROR closure protocol mismatch (fn~ vs fn@) + let a: pure fn~() = x; //~ ERROR closure protocol mismatch (fn~ vs fn@) + let b: pure fn~() = y; //~ ERROR closure protocol mismatch (fn~ vs fn@) + let c: pure fn~() = z; //~ ERROR closure protocol mismatch (fn~ vs fn@) - let a: unsafe fn~() = x; //! ERROR closure protocol mismatch (fn~ vs fn@) - let b: unsafe fn~() = y; //! ERROR closure protocol mismatch (fn~ vs fn@) - let c: unsafe fn~() = z; //! ERROR closure protocol mismatch (fn~ vs fn@) + let a: unsafe fn~() = x; //~ ERROR closure protocol mismatch (fn~ vs fn@) + let b: unsafe fn~() = y; //~ ERROR closure protocol mismatch (fn~ vs fn@) + let c: unsafe fn~() = z; //~ ERROR closure protocol mismatch (fn~ vs fn@) } fn main() { diff --git a/src/test/compile-fail/qquote-1.rs b/src/test/compile-fail/qquote-1.rs index c88bf563e71..d460864ac83 100644 --- a/src/test/compile-fail/qquote-1.rs +++ b/src/test/compile-fail/qquote-1.rs @@ -40,7 +40,7 @@ fn main() { let abc = #ast{23}; check_pp(abc, pprust::print_expr, "23"); - let expr3 = #ast{2 - $(abcd) + 7}; //! ERROR unresolved name: abcd + let expr3 = #ast{2 - $(abcd) + 7}; //~ ERROR unresolved name: abcd check_pp(expr3, pprust::print_expr, "2 - 23 + 7"); } diff --git a/src/test/compile-fail/qquote-2.rs b/src/test/compile-fail/qquote-2.rs index af5cf1c3fab..4cf49e183ba 100644 --- a/src/test/compile-fail/qquote-2.rs +++ b/src/test/compile-fail/qquote-2.rs @@ -37,7 +37,7 @@ fn mk_ctxt() -> fake_ext_ctxt { fn main() { let ext_cx = mk_ctxt(); - let stmt = #ast(stmt){let x int = 20;}; //! ERROR expected end-of-string + let stmt = #ast(stmt){let x int = 20;}; //~ ERROR expected end-of-string check_pp(*stmt, pprust::print_stmt, ""); } diff --git a/src/test/compile-fail/rec-expected.rs b/src/test/compile-fail/rec-expected.rs index acbb7f03531..1f69ffc7a4d 100644 --- a/src/test/compile-fail/rec-expected.rs +++ b/src/test/compile-fail/rec-expected.rs @@ -3,7 +3,7 @@ type bar = {b: int}; fn want_foo(f: foo) {} fn have_bar(b: bar) { - want_foo(b); //! ERROR expected a record with field `a` + want_foo(b); //~ ERROR expected a record with field `a` } fn main() {} \ No newline at end of file diff --git a/src/test/compile-fail/region-unused.rs b/src/test/compile-fail/region-unused.rs index 617315853af..bf48e3f0da2 100644 --- a/src/test/compile-fail/region-unused.rs +++ b/src/test/compile-fail/region-unused.rs @@ -1,3 +1,3 @@ -type foo/& = {f: int}; //! ERROR lifetime `self` unused +type foo/& = {f: int}; //~ ERROR lifetime `self` unused fn main() {} \ No newline at end of file diff --git a/src/test/compile-fail/regions-addr-of-arg.rs b/src/test/compile-fail/regions-addr-of-arg.rs index 4c14937de68..09b5008aa99 100644 --- a/src/test/compile-fail/regions-addr-of-arg.rs +++ b/src/test/compile-fail/regions-addr-of-arg.rs @@ -1,5 +1,5 @@ fn foo(a: int) { - let _p: &static.int = &a; //! ERROR mismatched types + let _p: &static.int = &a; //~ ERROR mismatched types } fn bar(a: int) { diff --git a/src/test/compile-fail/regions-addr-of-self.rs b/src/test/compile-fail/regions-addr-of-self.rs index b9943bc18e0..39e9f568758 100644 --- a/src/test/compile-fail/regions-addr-of-self.rs +++ b/src/test/compile-fail/regions-addr-of-self.rs @@ -6,7 +6,7 @@ class dog { } fn chase_cat() { - let p: &static.mut uint = &mut self.cats_chased; //! ERROR mismatched types + let p: &static.mut uint = &mut self.cats_chased; //~ ERROR mismatched types *p += 1u; } diff --git a/src/test/compile-fail/regions-addr-of-upvar-self.rs b/src/test/compile-fail/regions-addr-of-upvar-self.rs index b0cd97d24d3..f7e39ee5243 100644 --- a/src/test/compile-fail/regions-addr-of-upvar-self.rs +++ b/src/test/compile-fail/regions-addr-of-upvar-self.rs @@ -7,7 +7,7 @@ class dog { fn chase_cat() { uint::range(0u, 10u) { |i| - let p: &static.mut uint = &mut self.food; //! ERROR mismatched types + let p: &static.mut uint = &mut self.food; //~ ERROR mismatched types *p = 3u; } } diff --git a/src/test/compile-fail/regions-appearance-constraint.rs b/src/test/compile-fail/regions-appearance-constraint.rs index c37d3c1d219..300aece8c3c 100644 --- a/src/test/compile-fail/regions-appearance-constraint.rs +++ b/src/test/compile-fail/regions-appearance-constraint.rs @@ -17,7 +17,7 @@ fn testfn(cond: bool) { let mut y = @4; let mut a = &*x; - //!^ ERROR reference is not valid outside of its lifetime + //~^ ERROR reference is not valid outside of its lifetime let mut exp = 3; if cond { diff --git a/src/test/compile-fail/regions-blk.rs b/src/test/compile-fail/regions-blk.rs index 0d0cdb6d93f..9e6b5d0d342 100644 --- a/src/test/compile-fail/regions-blk.rs +++ b/src/test/compile-fail/regions-blk.rs @@ -7,7 +7,7 @@ fn foo(cond: bool) { z = &x; } else { let w: &blk.int = &x; - z = w; //! ERROR mismatched types + z = w; //~ ERROR mismatched types } } diff --git a/src/test/compile-fail/regions-borrow.rs b/src/test/compile-fail/regions-borrow.rs index 5bcfc984162..5e893246cdc 100644 --- a/src/test/compile-fail/regions-borrow.rs +++ b/src/test/compile-fail/regions-borrow.rs @@ -3,6 +3,6 @@ fn foo(x: &uint) -> &uint { x } fn main() { let p = @3u; let r = foo(p); - //!^ ERROR reference is not valid + //~^ ERROR reference is not valid assert *p == *r; } diff --git a/src/test/compile-fail/regions-bounds.rs b/src/test/compile-fail/regions-bounds.rs index c62db9b8fff..9eef8c1a643 100644 --- a/src/test/compile-fail/regions-bounds.rs +++ b/src/test/compile-fail/regions-bounds.rs @@ -7,20 +7,20 @@ iface an_iface/& { } class a_class/& { let x:int; new(x:int) { self.x = x; } } fn a_fn1(e: an_enum/&a) -> an_enum/&b { - ret e; //! ERROR mismatched types: expected `an_enum/&b` but found `an_enum/&a` + ret e; //~ ERROR mismatched types: expected `an_enum/&b` but found `an_enum/&a` } fn a_fn2(e: an_iface/&a) -> an_iface/&b { - ret e; //! ERROR mismatched types: expected `an_iface/&b` but found `an_iface/&a` + ret e; //~ ERROR mismatched types: expected `an_iface/&b` but found `an_iface/&a` } fn a_fn3(e: a_class/&a) -> a_class/&b { - ret e; //! ERROR mismatched types: expected `a_class/&b` but found `a_class/&a` + ret e; //~ ERROR mismatched types: expected `a_class/&b` but found `a_class/&a` } fn a_fn4(e: int/&a) -> int/&b { - //!^ ERROR Region parameters are not allowed on this type. - //!^^ ERROR Region parameters are not allowed on this type. + //~^ ERROR Region parameters are not allowed on this type. + //~^^ ERROR Region parameters are not allowed on this type. ret e; } diff --git a/src/test/compile-fail/regions-creating-enums.rs b/src/test/compile-fail/regions-creating-enums.rs index 226039f4c2a..3873dcb6d0a 100644 --- a/src/test/compile-fail/regions-creating-enums.rs +++ b/src/test/compile-fail/regions-creating-enums.rs @@ -20,12 +20,12 @@ fn compute(x: &ast) -> uint { fn map_nums(x: &ast, f: fn(uint) -> uint) -> &ast { alt *x { num(x) { - ret &num(f(x)); //! ERROR mismatched types: expected `&ast/&` but found + ret &num(f(x)); //~ ERROR mismatched types: expected `&ast/&` but found } add(x, y) { let m_x = map_nums(x, f); let m_y = map_nums(y, f); - ret &add(m_x, m_y); //! ERROR mismatched types: expected `&ast/&` but found + ret &add(m_x, m_y); //~ ERROR mismatched types: expected `&ast/&` but found } } } diff --git a/src/test/compile-fail/regions-creating-enums3.rs b/src/test/compile-fail/regions-creating-enums3.rs index d650441aab7..7f162b494aa 100644 --- a/src/test/compile-fail/regions-creating-enums3.rs +++ b/src/test/compile-fail/regions-creating-enums3.rs @@ -4,7 +4,7 @@ enum ast/& { } fn mk_add_bad1(x: &a.ast, y: &b.ast) -> ast/&a { - add(x, y) //! ERROR mismatched types: expected `&a.ast/&a` but found `&b.ast/&b` + add(x, y) //~ ERROR mismatched types: expected `&a.ast/&a` but found `&b.ast/&b` } fn main() { diff --git a/src/test/compile-fail/regions-creating-enums4.rs b/src/test/compile-fail/regions-creating-enums4.rs index f80334d3fea..a95b6f9f4bd 100644 --- a/src/test/compile-fail/regions-creating-enums4.rs +++ b/src/test/compile-fail/regions-creating-enums4.rs @@ -4,7 +4,7 @@ enum ast/& { } fn mk_add_bad2(x: &a.ast, y: &a.ast, z: &ast) -> ast { - add(x, y) //! ERROR mismatched types: expected `ast/&` but found `ast/&a` + add(x, y) //~ ERROR mismatched types: expected `ast/&` but found `ast/&a` } fn main() { diff --git a/src/test/compile-fail/regions-escape-into-other-fn.rs b/src/test/compile-fail/regions-escape-into-other-fn.rs index fc3247de055..67c7dd3317a 100644 --- a/src/test/compile-fail/regions-escape-into-other-fn.rs +++ b/src/test/compile-fail/regions-escape-into-other-fn.rs @@ -3,5 +3,5 @@ fn bar(x: &uint) -> uint { *x } fn main() { let p = @3u; - bar(foo(p)); //! ERROR reference is not valid + bar(foo(p)); //~ ERROR reference is not valid } diff --git a/src/test/compile-fail/regions-escape-loop-via-variable.rs b/src/test/compile-fail/regions-escape-loop-via-variable.rs index bf0c625abab..04900da8ae5 100644 --- a/src/test/compile-fail/regions-escape-loop-via-variable.rs +++ b/src/test/compile-fail/regions-escape-loop-via-variable.rs @@ -4,7 +4,7 @@ fn main() { // Here, the variable `p` gets inferred to a type with a lifetime // of the loop body. The regionck then determines that this type // is invalid. - let mut p = //! ERROR reference is not valid + let mut p = //~ ERROR reference is not valid &x; loop { diff --git a/src/test/compile-fail/regions-escape-loop-via-vec.rs b/src/test/compile-fail/regions-escape-loop-via-vec.rs index 309cb030233..c1b096c5f51 100644 --- a/src/test/compile-fail/regions-escape-loop-via-vec.rs +++ b/src/test/compile-fail/regions-escape-loop-via-vec.rs @@ -2,16 +2,16 @@ // This generates a ton of error msgs at the moment. fn broken() -> int { let mut x = 3; - let mut y = [&mut x]/~; //! ERROR reference is not valid + let mut y = [&mut x]/~; //~ ERROR reference is not valid while x < 10 { let mut z = x; y += [&mut z]/~; x += 1; } vec::foldl(0, y) {|v, p| v + *p } - //!^ ERROR reference is not valid - //!^^ ERROR reference is not valid - //!^^^ ERROR reference is not valid + //~^ ERROR reference is not valid + //~^^ ERROR reference is not valid + //~^^^ ERROR reference is not valid } fn main() { } \ No newline at end of file diff --git a/src/test/compile-fail/regions-fn-subtyping.rs b/src/test/compile-fail/regions-fn-subtyping.rs index 3cbee781bba..571b5da41fe 100644 --- a/src/test/compile-fail/regions-fn-subtyping.rs +++ b/src/test/compile-fail/regions-fn-subtyping.rs @@ -7,7 +7,7 @@ fn has_same_region(f: fn(x: &a.int, g: fn(y: &a.int))) { // accept any region. That is, the type that `has_same_region` // expects is *not* a subtype of the type that `wants_two_regions` // expects. - wants_two_regions(f); //! ERROR mismatched types + wants_two_regions(f); //~ ERROR mismatched types } fn wants_two_regions(_f: fn(x: &int, g: fn(y: &int))) { diff --git a/src/test/compile-fail/regions-fns.rs b/src/test/compile-fail/regions-fns.rs index 0f636d27dc4..fc8a631c6b7 100644 --- a/src/test/compile-fail/regions-fns.rs +++ b/src/test/compile-fail/regions-fns.rs @@ -2,7 +2,7 @@ // with lifetime r, and a is a pointer with unspecified lifetime. fn not_ok_1(a: &uint) { let mut g: fn@(x: &uint) = fn@(x: &r.uint) {}; - //!^ ERROR mismatched types + //~^ ERROR mismatched types g(a); } @@ -11,7 +11,7 @@ fn not_ok_1(a: &uint) { fn not_ok_2(s: &s.uint) { let mut g: fn@(x: &uint) = fn@(x: &r.uint) {}; - //!^ ERROR mismatched types + //~^ ERROR mismatched types g(s); } diff --git a/src/test/compile-fail/regions-iface-1.rs b/src/test/compile-fail/regions-iface-1.rs index a2a2e39a2f8..f6d4d5885f9 100644 --- a/src/test/compile-fail/regions-iface-1.rs +++ b/src/test/compile-fail/regions-iface-1.rs @@ -11,7 +11,7 @@ impl/& of get_ctxt for has_ctxt { // Here an error occurs because we used `&self` but // the definition used `&`: - fn get_ctxt() -> &self.ctxt { //! ERROR method `get_ctxt` has an incompatible type + fn get_ctxt() -> &self.ctxt { //~ ERROR method `get_ctxt` has an incompatible type self.c } diff --git a/src/test/compile-fail/regions-iface-2.rs b/src/test/compile-fail/regions-iface-2.rs index 76f4d24291a..3ebba4e2d2f 100644 --- a/src/test/compile-fail/regions-iface-2.rs +++ b/src/test/compile-fail/regions-iface-2.rs @@ -13,7 +13,7 @@ impl/& of get_ctxt for has_ctxt { fn make_gc() -> get_ctxt { let ctxt = { v: 22u }; let hc = { c: &ctxt }; - ret hc as get_ctxt; //! ERROR mismatched types: expected `get_ctxt/&` + ret hc as get_ctxt; //~ ERROR mismatched types: expected `get_ctxt/&` } fn main() { diff --git a/src/test/compile-fail/regions-iface-3.rs b/src/test/compile-fail/regions-iface-3.rs index ae8d0130dff..efd15583ab6 100644 --- a/src/test/compile-fail/regions-iface-3.rs +++ b/src/test/compile-fail/regions-iface-3.rs @@ -3,11 +3,11 @@ iface get_ctxt/& { } fn make_gc1(gc: get_ctxt/&a) -> get_ctxt/&b { - ret gc; //! ERROR mismatched types: expected `get_ctxt/&b` but found `get_ctxt/&a` + ret gc; //~ ERROR mismatched types: expected `get_ctxt/&b` but found `get_ctxt/&a` } fn make_gc2(gc: get_ctxt/&a) -> get_ctxt/&b { - ret gc as get_ctxt; //! ERROR mismatched types: expected `get_ctxt/&b` but found `get_ctxt/&a` + ret gc as get_ctxt; //~ ERROR mismatched types: expected `get_ctxt/&b` but found `get_ctxt/&a` } fn main() { diff --git a/src/test/compile-fail/regions-in-consts.rs b/src/test/compile-fail/regions-in-consts.rs index c48fec0f8ac..83a117d951a 100644 --- a/src/test/compile-fail/regions-in-consts.rs +++ b/src/test/compile-fail/regions-in-consts.rs @@ -1,7 +1,7 @@ // xfail-test -const c_x: &blk.int = 22; //! ERROR only the static region is allowed here -const c_y: &static.int = &22; //! ERROR only the static region is allowed here +const c_x: &blk.int = 22; //~ ERROR only the static region is allowed here +const c_y: &static.int = &22; //~ ERROR only the static region is allowed here fn main() { } \ No newline at end of file diff --git a/src/test/compile-fail/regions-in-enums.rs b/src/test/compile-fail/regions-in-enums.rs index 4126ef75547..d7b1ddf1e18 100644 --- a/src/test/compile-fail/regions-in-enums.rs +++ b/src/test/compile-fail/regions-in-enums.rs @@ -1,13 +1,13 @@ enum no0 { - x0(&uint) //! ERROR to use region types here, the containing type must be declared with a region bound + x0(&uint) //~ ERROR to use region types here, the containing type must be declared with a region bound } enum no1 { - x1(&self.uint) //! ERROR to use region types here, the containing type must be declared with a region bound + x1(&self.uint) //~ ERROR to use region types here, the containing type must be declared with a region bound } enum no2 { - x2(&foo.uint) //! ERROR named regions other than `self` are not allowed as part of a type declaration + x2(&foo.uint) //~ ERROR named regions other than `self` are not allowed as part of a type declaration } enum yes0/& { @@ -19,7 +19,7 @@ enum yes1/& { } enum yes2/& { - x5(&foo.uint) //! ERROR named regions other than `self` are not allowed as part of a type declaration + x5(&foo.uint) //~ ERROR named regions other than `self` are not allowed as part of a type declaration } fn main() {} \ No newline at end of file diff --git a/src/test/compile-fail/regions-in-rsrcs.rs b/src/test/compile-fail/regions-in-rsrcs.rs index fe1482f92e8..55990fb0568 100644 --- a/src/test/compile-fail/regions-in-rsrcs.rs +++ b/src/test/compile-fail/regions-in-rsrcs.rs @@ -1,18 +1,18 @@ class no0 { - let x: &uint; //! ERROR to use region types here, the containing type must be declared with a region bound - new(x: &uint) { self.x = x; } //! ERROR to use region types here, the containing type must be declared with a region bound + let x: &uint; //~ ERROR to use region types here, the containing type must be declared with a region bound + new(x: &uint) { self.x = x; } //~ ERROR to use region types here, the containing type must be declared with a region bound drop {} } class no1 { - let x: &self.uint; //! ERROR to use region types here, the containing type must be declared with a region bound - new(x: &self.uint) { self.x = x; } //! ERROR to use region types here, the containing type must be declared with a region bound + let x: &self.uint; //~ ERROR to use region types here, the containing type must be declared with a region bound + new(x: &self.uint) { self.x = x; } //~ ERROR to use region types here, the containing type must be declared with a region bound drop {} } class no2 { - let x: &foo.uint; //! ERROR named regions other than `self` are not allowed as part of a type declaration - new(x: &foo.uint) { self.x = x; } //! ERROR named regions other than `self` are not allowed as part of a type declaration + let x: &foo.uint; //~ ERROR named regions other than `self` are not allowed as part of a type declaration + new(x: &foo.uint) { self.x = x; } //~ ERROR named regions other than `self` are not allowed as part of a type declaration drop {} } @@ -29,8 +29,8 @@ class yes1/& { } class yes2/& { - let x: &foo.uint; //! ERROR named regions other than `self` are not allowed as part of a type declaration - new(x: &foo.uint) { self.x = x; } //! ERROR named regions other than `self` are not allowed as part of a type declaration + let x: &foo.uint; //~ ERROR named regions other than `self` are not allowed as part of a type declaration + new(x: &foo.uint) { self.x = x; } //~ ERROR named regions other than `self` are not allowed as part of a type declaration drop {} } diff --git a/src/test/compile-fail/regions-in-type-items.rs b/src/test/compile-fail/regions-in-type-items.rs index c4619001e7c..bbc5da2004d 100644 --- a/src/test/compile-fail/regions-in-type-items.rs +++ b/src/test/compile-fail/regions-in-type-items.rs @@ -1,13 +1,13 @@ type item_ty_no0 = { - x: &uint //! ERROR to use region types here, the containing type must be declared with a region bound + x: &uint //~ ERROR to use region types here, the containing type must be declared with a region bound }; type item_ty_no1 = { - x: &self.uint //! ERROR to use region types here, the containing type must be declared with a region bound + x: &self.uint //~ ERROR to use region types here, the containing type must be declared with a region bound }; type item_ty_no2 = { - x: &foo.uint //! ERROR named regions other than `self` are not allowed as part of a type declaration + x: &foo.uint //~ ERROR named regions other than `self` are not allowed as part of a type declaration }; type item_ty_yes0/& = { @@ -18,8 +18,8 @@ type item_ty_yes1/& = { x: &self.uint }; -type item_ty_yes2/& = { //! ERROR lifetime `self` unused inside reference-parameterized type - x: &foo.uint //! ERROR named regions other than `self` are not allowed as part of a type declaration +type item_ty_yes2/& = { //~ ERROR lifetime `self` unused inside reference-parameterized type + x: &foo.uint //~ ERROR named regions other than `self` are not allowed as part of a type declaration }; fn main() {} \ No newline at end of file diff --git a/src/test/compile-fail/regions-nested-fns.rs b/src/test/compile-fail/regions-nested-fns.rs index 3f0a871a342..c6393d89d2b 100644 --- a/src/test/compile-fail/regions-nested-fns.rs +++ b/src/test/compile-fail/regions-nested-fns.rs @@ -7,13 +7,13 @@ fn nested(x: &x.int) { ignore(fn&(z: &z.int) { ay = x; ay = &y; - ay = z; //! ERROR references with lifetime + ay = z; //~ ERROR references with lifetime }); ignore(fn&(z: &z.int) -> &z.int { - if false { ret x; } //! ERROR references with lifetime - if false { ret &y; } //! ERROR references with lifetime - if false { ret ay; } //! ERROR references with lifetime + if false { ret x; } //~ ERROR references with lifetime + if false { ret &y; } //~ ERROR references with lifetime + if false { ret ay; } //~ ERROR references with lifetime ret z; }); } diff --git a/src/test/compile-fail/regions-out-of-scope-slice.rs b/src/test/compile-fail/regions-out-of-scope-slice.rs index 5f5aadaa107..02ec5b1b643 100644 --- a/src/test/compile-fail/regions-out-of-scope-slice.rs +++ b/src/test/compile-fail/regions-out-of-scope-slice.rs @@ -3,7 +3,7 @@ fn foo(cond: bool) { // Here we will infer a type that uses the // region of the if stmt then block, but in the scope: - let mut x; //! ERROR foo + let mut x; //~ ERROR foo if cond { x = [1,2,3]/&blk; diff --git a/src/test/compile-fail/regions-scoping.rs b/src/test/compile-fail/regions-scoping.rs index aea02babfa0..f694f6a10fa 100644 --- a/src/test/compile-fail/regions-scoping.rs +++ b/src/test/compile-fail/regions-scoping.rs @@ -9,19 +9,19 @@ fn nested(x: &x.int) { // (1) z: &z.int) -> &z.int) // A fresh region `z` (3) -> &x.int { - if false { ret z(x, x, x); } //! ERROR mismatched types: expected `&y.int` but found `&x.int` - if false { ret z(x, x, y); } //! ERROR mismatched types: expected `&y.int` but found `&x.int` - //!^ ERROR mismatched types: expected `&x.int` but found `&y.int` + if false { ret z(x, x, x); } //~ ERROR mismatched types: expected `&y.int` but found `&x.int` + if false { ret z(x, x, y); } //~ ERROR mismatched types: expected `&y.int` but found `&x.int` + //~^ ERROR mismatched types: expected `&x.int` but found `&y.int` if false { ret z(x, y, x); } - if false { ret z(x, y, y); } //! ERROR mismatched types: expected `&x.int` but found `&y.int` - if false { ret z(y, x, x); } //! ERROR mismatched types: expected `&x.int` but found `&y.int` - //!^ ERROR mismatched types: expected `&y.int` but found `&x.int` - if false { ret z(y, x, y); } //! ERROR mismatched types: expected `&x.int` but found `&y.int` - //!^ ERROR mismatched types: expected `&y.int` but found `&x.int` - //!^^ ERROR mismatched types: expected `&x.int` but found `&y.int` - if false { ret z(y, y, x); } //! ERROR mismatched types: expected `&x.int` but found `&y.int` - if false { ret z(y, y, y); } //! ERROR mismatched types: expected `&x.int` but found `&y.int` - //!^ ERROR mismatched types: expected `&x.int` but found `&y.int` + if false { ret z(x, y, y); } //~ ERROR mismatched types: expected `&x.int` but found `&y.int` + if false { ret z(y, x, x); } //~ ERROR mismatched types: expected `&x.int` but found `&y.int` + //~^ ERROR mismatched types: expected `&y.int` but found `&x.int` + if false { ret z(y, x, y); } //~ ERROR mismatched types: expected `&x.int` but found `&y.int` + //~^ ERROR mismatched types: expected `&y.int` but found `&x.int` + //~^^ ERROR mismatched types: expected `&x.int` but found `&y.int` + if false { ret z(y, y, x); } //~ ERROR mismatched types: expected `&x.int` but found `&y.int` + if false { ret z(y, y, y); } //~ ERROR mismatched types: expected `&x.int` but found `&y.int` + //~^ ERROR mismatched types: expected `&x.int` but found `&y.int` fail; } ) {|foo| @@ -33,10 +33,10 @@ fn nested(x: &x.int) { // (1) let z = 3i; let d: &x.int = foo(x, x) { |_x, _y, z| z }; let e: &x.int = foo(x, &z) { |_x, _y, z| z }; - let f: &x.int = foo(&z, &z) { |_x, _y, z| z }; //! ERROR mismatched types: expected `&x.int` but found + let f: &x.int = foo(&z, &z) { |_x, _y, z| z }; //~ ERROR mismatched types: expected `&x.int` but found - foo(x, &z) { |x, _y, _z| x }; //! ERROR mismatched types: expected `&z.int` but found `&x.int` - foo(x, &z) { |_x, y, _z| y }; //! ERROR mismatched types: expected `&z.int` but found `&<block at + foo(x, &z) { |x, _y, _z| x }; //~ ERROR mismatched types: expected `&z.int` but found `&x.int` + foo(x, &z) { |_x, y, _z| y }; //~ ERROR mismatched types: expected `&z.int` but found `&<block at } } diff --git a/src/test/compile-fail/regions-var-type-out-of-scope.rs b/src/test/compile-fail/regions-var-type-out-of-scope.rs index b8aecb05e89..bb40a436fba 100644 --- a/src/test/compile-fail/regions-var-type-out-of-scope.rs +++ b/src/test/compile-fail/regions-var-type-out-of-scope.rs @@ -3,7 +3,7 @@ fn foo(cond: bool) { // Here we will infer a type that uses the // region of the if stmt then block: - let mut x; //! ERROR foo + let mut x; //~ ERROR foo if cond { x = &3; diff --git a/src/test/compile-fail/selftype-astparam.rs b/src/test/compile-fail/selftype-astparam.rs index f0d79ccc589..8136e0c7440 100644 --- a/src/test/compile-fail/selftype-astparam.rs +++ b/src/test/compile-fail/selftype-astparam.rs @@ -11,5 +11,5 @@ fn do_add<A:add>(x: A, y: A) -> A { x + y } fn main() { let x = 3 as add; let y = 4 as add; - do_add(x, y); //! ERROR a boxed iface with self types may not be passed as a bounded type + do_add(x, y); //~ ERROR a boxed iface with self types may not be passed as a bounded type } diff --git a/src/test/compile-fail/selftype-ifacetype.rs b/src/test/compile-fail/selftype-ifacetype.rs index 2772b359849..bbaf49e85bf 100644 --- a/src/test/compile-fail/selftype-ifacetype.rs +++ b/src/test/compile-fail/selftype-ifacetype.rs @@ -3,7 +3,7 @@ iface add { } fn do_add(x: add, y: add) -> add { - x + y //! ERROR can not call a method that contains a self type through a boxed iface + x + y //~ ERROR can not call a method that contains a self type through a boxed iface } fn main() {} diff --git a/src/test/compile-fail/sendfn-is-not-a-lambda.rs b/src/test/compile-fail/sendfn-is-not-a-lambda.rs index 09d33197909..5aee9cd6fa7 100644 --- a/src/test/compile-fail/sendfn-is-not-a-lambda.rs +++ b/src/test/compile-fail/sendfn-is-not-a-lambda.rs @@ -4,5 +4,5 @@ fn test(f: fn@(uint) -> uint) -> uint { fn main() { let f = fn~(x: uint) -> uint { ret 4u; }; - log(debug, test(f)); //! ERROR expected `fn@(uint) -> uint` + log(debug, test(f)); //~ ERROR expected `fn@(uint) -> uint` } diff --git a/src/test/compile-fail/seq-args.rs b/src/test/compile-fail/seq-args.rs index 0587e21e5aa..8edc11e84f6 100644 --- a/src/test/compile-fail/seq-args.rs +++ b/src/test/compile-fail/seq-args.rs @@ -2,7 +2,7 @@ use std; fn main() { iface seq { } -impl <T> of seq<T> for [T]/~ { //! ERROR wrong number of type arguments +impl <T> of seq<T> for [T]/~ { //~ ERROR wrong number of type arguments /* ... */ } impl of seq<bool> for u32 { diff --git a/src/test/compile-fail/swap-no-lval.rs b/src/test/compile-fail/swap-no-lval.rs index 8366aa5421e..b7a5fce6b5a 100644 --- a/src/test/compile-fail/swap-no-lval.rs +++ b/src/test/compile-fail/swap-no-lval.rs @@ -1,5 +1,5 @@ fn main() { 5 <-> 3; - //!^ ERROR swapping to and from non-lvalue - //!^^ ERROR swapping to and from non-lvalue + //~^ ERROR swapping to and from non-lvalue + //~^^ ERROR swapping to and from non-lvalue } diff --git a/src/test/compile-fail/terr-in-field.rs b/src/test/compile-fail/terr-in-field.rs index 0b676e35db7..84cb3bc9ac5 100644 --- a/src/test/compile-fail/terr-in-field.rs +++ b/src/test/compile-fail/terr-in-field.rs @@ -3,7 +3,7 @@ type bar = {a: int, b: uint}; fn want_foo(f: foo) {} fn have_bar(b: bar) { - want_foo(b); //! ERROR (in field `b`, int vs uint) + want_foo(b); //~ ERROR (in field `b`, int vs uint) } fn main() {} diff --git a/src/test/compile-fail/terr-sorts.rs b/src/test/compile-fail/terr-sorts.rs index 6ab384673c1..d7d8bd48b38 100644 --- a/src/test/compile-fail/terr-sorts.rs +++ b/src/test/compile-fail/terr-sorts.rs @@ -3,7 +3,7 @@ type bar = @foo; fn want_foo(f: foo) {} fn have_bar(b: bar) { - want_foo(b); //! ERROR (record vs @-ptr) + want_foo(b); //~ ERROR (record vs @-ptr) } fn main() {} diff --git a/src/test/compile-fail/tps-invariant-class.rs b/src/test/compile-fail/tps-invariant-class.rs index 0c4b3b54b83..a3ecbec5b11 100644 --- a/src/test/compile-fail/tps-invariant-class.rs +++ b/src/test/compile-fail/tps-invariant-class.rs @@ -13,7 +13,7 @@ fn set_box_impl<T>(b: box_impl<@const T>, v: @const T) { fn main() { let b = box_impl::<@int>(@3); set_box_impl(b, @mut 5); - //!^ ERROR values differ in mutability + //~^ ERROR values differ in mutability // No error when type of parameter actually IS @const int let b = box_impl::<@const int>(@3); diff --git a/src/test/compile-fail/tps-invariant-enum.rs b/src/test/compile-fail/tps-invariant-enum.rs index 16375bd8b47..4c9691a1c58 100644 --- a/src/test/compile-fail/tps-invariant-enum.rs +++ b/src/test/compile-fail/tps-invariant-enum.rs @@ -9,7 +9,7 @@ fn set_box_impl<T>(b: box_impl<@const T>, v: @const T) { fn main() { let b = box_impl::<@int>({mut f: @3}); set_box_impl(b, @mut 5); - //!^ ERROR values differ in mutability + //~^ ERROR values differ in mutability // No error when type of parameter actually IS @const int let x: @const int = @3; // only way I could find to upcast diff --git a/src/test/compile-fail/tps-invariant-iface.rs b/src/test/compile-fail/tps-invariant-iface.rs index 49ab080998e..81caef856c2 100644 --- a/src/test/compile-fail/tps-invariant-iface.rs +++ b/src/test/compile-fail/tps-invariant-iface.rs @@ -23,7 +23,7 @@ fn set_box_impl<T>(b: box_impl<@const T>, v: @const T) { fn main() { let b = box_impl::<@int>({mut f: @3}); set_box_iface(b as box_iface::<@int>, @mut 5); - //!^ ERROR values differ in mutability + //~^ ERROR values differ in mutability set_box_impl(b, @mut 5); - //!^ ERROR values differ in mutability + //~^ ERROR values differ in mutability } \ No newline at end of file diff --git a/src/test/compile-fail/tstate-and-init.rs b/src/test/compile-fail/tstate-and-init.rs index 7b254fe2e19..d6e01f20ff4 100644 --- a/src/test/compile-fail/tstate-and-init.rs +++ b/src/test/compile-fail/tstate-and-init.rs @@ -3,5 +3,5 @@ fn even(i: int) : is_even(i) -> int { i } fn main() { let i: int = 4; log(debug, false && { check is_even(i); true }); - even(i); //! ERROR unsatisfied precondition + even(i); //~ ERROR unsatisfied precondition } diff --git a/src/test/compile-fail/tstate-block-uninit.rs b/src/test/compile-fail/tstate-block-uninit.rs index 3fbf812a9dc..91a31fed6cf 100644 --- a/src/test/compile-fail/tstate-block-uninit.rs +++ b/src/test/compile-fail/tstate-block-uninit.rs @@ -6,6 +6,6 @@ fn force(f: fn()) { f(); } fn main() { let x: int = 4; force(fn&() { - even(x); //! ERROR unsatisfied precondition + even(x); //~ ERROR unsatisfied precondition }); } diff --git a/src/test/compile-fail/tstate-break-uninit-2.rs b/src/test/compile-fail/tstate-break-uninit-2.rs index 8ea5446c809..7d75009098f 100644 --- a/src/test/compile-fail/tstate-break-uninit-2.rs +++ b/src/test/compile-fail/tstate-break-uninit-2.rs @@ -6,10 +6,10 @@ fn foo() -> int { while 1 != 2 { break; - check is_even(x); //! WARNING unreachable statement + check is_even(x); //~ WARNING unreachable statement } - even(x); //! ERROR unsatisfied precondition + even(x); //~ ERROR unsatisfied precondition ret 17; } diff --git a/src/test/compile-fail/tstate-break-uninit.rs b/src/test/compile-fail/tstate-break-uninit.rs index 55146447b44..b0d51deb5df 100644 --- a/src/test/compile-fail/tstate-break-uninit.rs +++ b/src/test/compile-fail/tstate-break-uninit.rs @@ -6,10 +6,10 @@ fn foo() -> int { loop { break; - check is_even(x); //! WARNING unreachable statement + check is_even(x); //~ WARNING unreachable statement } - even(x); //! ERROR unsatisfied precondition + even(x); //~ ERROR unsatisfied precondition ret 17; } diff --git a/src/test/compile-fail/tstate-ctor-unsat.rs b/src/test/compile-fail/tstate-ctor-unsat.rs index d249865cd49..e72e57f901b 100644 --- a/src/test/compile-fail/tstate-ctor-unsat.rs +++ b/src/test/compile-fail/tstate-ctor-unsat.rs @@ -15,7 +15,7 @@ class cat { new(in_x : uint, in_y : int) { let foo = 3; self.meows = in_x + (in_y as uint); - self.how_hungry = even(foo); //! ERROR unsatisfied precondition + self.how_hungry = even(foo); //~ ERROR unsatisfied precondition } } diff --git a/src/test/compile-fail/tstate-fru.rs b/src/test/compile-fail/tstate-fru.rs index 70c39d434ff..c5335ce1f85 100644 --- a/src/test/compile-fail/tstate-fru.rs +++ b/src/test/compile-fail/tstate-fru.rs @@ -9,6 +9,6 @@ fn main() { let origin: point; origin = {x: 0, y: 0}; let right: point = {x: 10 with tested(origin)}; - //!^ ERROR precondition + //~^ ERROR precondition copy right; } diff --git a/src/test/compile-fail/tstate-if-no-else.rs b/src/test/compile-fail/tstate-if-no-else.rs index fbc02bf591a..e9873110a44 100644 --- a/src/test/compile-fail/tstate-if-no-else.rs +++ b/src/test/compile-fail/tstate-if-no-else.rs @@ -6,5 +6,5 @@ fn foo(x: int) { log(debug, x); } fn main() { let x: int = 10; if 1 > 2 { check is_even(x); } - even(x); //! ERROR unsatisfied precondition + even(x); //~ ERROR unsatisfied precondition } diff --git a/src/test/compile-fail/tstate-if-with-else.rs b/src/test/compile-fail/tstate-if-with-else.rs index 74edb4b8d8b..c813d84d465 100644 --- a/src/test/compile-fail/tstate-if-with-else.rs +++ b/src/test/compile-fail/tstate-if-with-else.rs @@ -10,5 +10,5 @@ fn main() { } else { check is_even(x); } - even(x); //! ERROR unsatisfied precondition + even(x); //~ ERROR unsatisfied precondition } diff --git a/src/test/compile-fail/tstate-loop-constraints.rs b/src/test/compile-fail/tstate-loop-constraints.rs index 34ff0753d86..731a7d0b6d8 100644 --- a/src/test/compile-fail/tstate-loop-constraints.rs +++ b/src/test/compile-fail/tstate-loop-constraints.rs @@ -10,7 +10,7 @@ fn main() { check is_even(x); even(x); // OK loop { - even(x); //! ERROR unsatisfied precondition + even(x); //~ ERROR unsatisfied precondition x = 11; } } diff --git a/src/test/compile-fail/tstate-or-init.rs b/src/test/compile-fail/tstate-or-init.rs index c26925929a6..f24dd9d888e 100644 --- a/src/test/compile-fail/tstate-or-init.rs +++ b/src/test/compile-fail/tstate-or-init.rs @@ -3,5 +3,5 @@ fn even(i: int) : is_even(i) -> int { i } fn main() { let i: int = 4; log(debug, false || { check is_even(i); true }); - even(i); //! ERROR unsatisfied precondition + even(i); //~ ERROR unsatisfied precondition } diff --git a/src/test/compile-fail/tstate-return.rs b/src/test/compile-fail/tstate-return.rs index 6d786bacd7b..0ac68559f8b 100644 --- a/src/test/compile-fail/tstate-return.rs +++ b/src/test/compile-fail/tstate-return.rs @@ -3,7 +3,7 @@ fn even(i: int) : is_even(i) -> int { i } fn f() -> int { let x: int = 4; - ret even(x); //! ERROR unsatisfied precondition + ret even(x); //~ ERROR unsatisfied precondition } fn main() { f(); } diff --git a/src/test/compile-fail/tstate-unsat-after-item.rs b/src/test/compile-fail/tstate-unsat-after-item.rs index 03fc1d326f6..6722736dea0 100644 --- a/src/test/compile-fail/tstate-unsat-after-item.rs +++ b/src/test/compile-fail/tstate-unsat-after-item.rs @@ -4,6 +4,6 @@ fn even(i: int) : is_even(i) -> int { i } fn main() { let x = 4; fn baz(_x: int) { } - baz(even(x)); //! ERROR unsatisfied precondition + baz(even(x)); //~ ERROR unsatisfied precondition } diff --git a/src/test/compile-fail/tstate-unsat-in-called-fn-expr.rs b/src/test/compile-fail/tstate-unsat-in-called-fn-expr.rs index 24cfa527e95..a02598a305a 100644 --- a/src/test/compile-fail/tstate-unsat-in-called-fn-expr.rs +++ b/src/test/compile-fail/tstate-unsat-in-called-fn-expr.rs @@ -3,7 +3,7 @@ fn foo(v: [int]) : vec::is_empty(v) { #debug("%d", v[0]); } fn main() { let f = fn@() { let v = [1]/~; - foo(v); //! ERROR unsatisfied precondition constraint + foo(v); //~ ERROR unsatisfied precondition constraint }(); log(error, f); } diff --git a/src/test/compile-fail/tstate-unsat-in-fn-expr.rs b/src/test/compile-fail/tstate-unsat-in-fn-expr.rs index 753655d354c..18189629d86 100644 --- a/src/test/compile-fail/tstate-unsat-in-fn-expr.rs +++ b/src/test/compile-fail/tstate-unsat-in-fn-expr.rs @@ -3,7 +3,7 @@ fn foo(v: [int]) : vec::is_empty(v) { #debug("%d", v[0]); } fn main() { let f = fn@() { let v = [1]/~; - foo(v); //! ERROR unsatisfied precondition constraint + foo(v); //~ ERROR unsatisfied precondition constraint }; log(error, f()); } diff --git a/src/test/compile-fail/tstate-unsat.rs b/src/test/compile-fail/tstate-unsat.rs index 44a3e88fdee..210feb28b92 100644 --- a/src/test/compile-fail/tstate-unsat.rs +++ b/src/test/compile-fail/tstate-unsat.rs @@ -3,5 +3,5 @@ fn even(i: int) : is_even(i) -> int { i } fn main() { let x: int = 4; - even(x); //! ERROR unsatisfied precondition + even(x); //~ ERROR unsatisfied precondition } diff --git a/src/test/compile-fail/tstate-while-break.rs b/src/test/compile-fail/tstate-while-break.rs index 6a25929a85b..49905d50348 100644 --- a/src/test/compile-fail/tstate-while-break.rs +++ b/src/test/compile-fail/tstate-while-break.rs @@ -7,7 +7,7 @@ fn test(cond: bool) { check is_even(v); break; } - even(v); //! ERROR unsatisfied precondition + even(v); //~ ERROR unsatisfied precondition } fn main() { diff --git a/src/test/compile-fail/tstate-while-cond.rs b/src/test/compile-fail/tstate-while-cond.rs index ae5436aa4e8..afc77fa42c6 100644 --- a/src/test/compile-fail/tstate-while-cond.rs +++ b/src/test/compile-fail/tstate-while-cond.rs @@ -3,5 +3,5 @@ fn even(i: int) : is_even(i) -> int { i } fn main() { let x: int = 4; - while even(x) != 0 { } //! ERROR unsatisfied precondition + while even(x) != 0 { } //~ ERROR unsatisfied precondition } diff --git a/src/test/compile-fail/tstate-while.rs b/src/test/compile-fail/tstate-while.rs index 6091a0237a2..f99c966aaf4 100644 --- a/src/test/compile-fail/tstate-while.rs +++ b/src/test/compile-fail/tstate-while.rs @@ -4,7 +4,7 @@ fn even(i: int) : is_even(i) -> int { i } fn f() { let mut x: int = 10; while 1 == 1 { x = 10; } - even(x); //! ERROR unsatisfied precondition + even(x); //~ ERROR unsatisfied precondition } fn main() { f(); } diff --git a/src/test/compile-fail/tutorial-suffix-inference-test.rs b/src/test/compile-fail/tutorial-suffix-inference-test.rs index fa07be952c1..41fe5864ec3 100644 --- a/src/test/compile-fail/tutorial-suffix-inference-test.rs +++ b/src/test/compile-fail/tutorial-suffix-inference-test.rs @@ -7,9 +7,9 @@ fn main() { identity_u8(x); // after this, `x` is assumed to have type `u8` identity_u16(x); - //!^ ERROR mismatched types: expected `u16` but found `u8` + //~^ ERROR mismatched types: expected `u16` but found `u8` identity_u16(y); - //!^ ERROR mismatched types: expected `u16` but found `i32` + //~^ ERROR mismatched types: expected `u16` but found `i32` let a = 3i; @@ -17,6 +17,6 @@ fn main() { identity_i(a); // ok identity_u16(a); - //!^ ERROR mismatched types: expected `u16` but found `int` + //~^ ERROR mismatched types: expected `u16` but found `int` } \ No newline at end of file diff --git a/src/test/compile-fail/type-mismatch.rs b/src/test/compile-fail/type-mismatch.rs index 08deb8a2d7c..d9c2654ff2b 100644 --- a/src/test/compile-fail/type-mismatch.rs +++ b/src/test/compile-fail/type-mismatch.rs @@ -4,5 +4,5 @@ fn main() { let x = true; let y = 1; let z = x + y; - //!^ ERROR binary operation + cannot be applied to type `bool` + //~^ ERROR binary operation + cannot be applied to type `bool` } diff --git a/src/test/compile-fail/unique-unique-kind.rs b/src/test/compile-fail/unique-unique-kind.rs index 9373ae70230..afa8134e083 100644 --- a/src/test/compile-fail/unique-unique-kind.rs +++ b/src/test/compile-fail/unique-unique-kind.rs @@ -3,5 +3,5 @@ fn f<T: send>(_i: T) { fn main() { let i = ~@100; - f(i); //! ERROR missing `send` + f(i); //~ ERROR missing `send` } diff --git a/src/test/compile-fail/unsafe-fn-assign-deref-ptr.rs b/src/test/compile-fail/unsafe-fn-assign-deref-ptr.rs index 089c4a74505..03af39ab7fc 100644 --- a/src/test/compile-fail/unsafe-fn-assign-deref-ptr.rs +++ b/src/test/compile-fail/unsafe-fn-assign-deref-ptr.rs @@ -1,7 +1,7 @@ // -*- rust -*- fn f(p: *u8) { - *p = 0u8; //! ERROR dereference of unsafe pointer requires unsafe function or block + *p = 0u8; //~ ERROR dereference of unsafe pointer requires unsafe function or block ret; } diff --git a/src/test/compile-fail/unsafe-fn-autoderef.rs b/src/test/compile-fail/unsafe-fn-autoderef.rs index cc6faa07557..b4ab76dc0c9 100644 --- a/src/test/compile-fail/unsafe-fn-autoderef.rs +++ b/src/test/compile-fail/unsafe-fn-autoderef.rs @@ -15,7 +15,7 @@ fn f(p: *rec) -> int { // are prohibited by various checks, such as that the enum is // instantiable and so forth). - ret p.f; //! ERROR attempted access of field `f` on type `*rec` + ret p.f; //~ ERROR attempted access of field `f` on type `*rec` } fn main() { diff --git a/src/test/compile-fail/unsafe-fn-called-from-safe.rs b/src/test/compile-fail/unsafe-fn-called-from-safe.rs index 2353be31c2b..d7681a2ec60 100644 --- a/src/test/compile-fail/unsafe-fn-called-from-safe.rs +++ b/src/test/compile-fail/unsafe-fn-called-from-safe.rs @@ -3,5 +3,5 @@ unsafe fn f() { ret; } fn main() { - f(); //! ERROR access to unsafe function requires unsafe function or block + f(); //~ ERROR access to unsafe function requires unsafe function or block } diff --git a/src/test/compile-fail/unsafe-fn-deref-ptr.rs b/src/test/compile-fail/unsafe-fn-deref-ptr.rs index dd6a9c7a405..e66bf5eb687 100644 --- a/src/test/compile-fail/unsafe-fn-deref-ptr.rs +++ b/src/test/compile-fail/unsafe-fn-deref-ptr.rs @@ -1,7 +1,7 @@ // -*- rust -*- fn f(p: *u8) -> u8 { - ret *p; //! ERROR dereference of unsafe pointer requires unsafe function or block + ret *p; //~ ERROR dereference of unsafe pointer requires unsafe function or block } fn main() { diff --git a/src/test/compile-fail/unsafe-fn-used-as-value.rs b/src/test/compile-fail/unsafe-fn-used-as-value.rs index dfcc2c85fcf..7dc0ce4a12b 100644 --- a/src/test/compile-fail/unsafe-fn-used-as-value.rs +++ b/src/test/compile-fail/unsafe-fn-used-as-value.rs @@ -3,6 +3,6 @@ unsafe fn f() { ret; } fn main() { - let x = f; //! ERROR access to unsafe function requires unsafe function or block + let x = f; //~ ERROR access to unsafe function requires unsafe function or block x(); } diff --git a/src/test/compile-fail/unsendable-class.rs b/src/test/compile-fail/unsendable-class.rs index 689253ddeef..de5715321e8 100644 --- a/src/test/compile-fail/unsendable-class.rs +++ b/src/test/compile-fail/unsendable-class.rs @@ -9,7 +9,7 @@ class foo { fn main() { let cat = "kitty"; - let po = comm::port(); //! ERROR missing `send` - let ch = comm::chan(po); //! ERROR missing `send` - comm::send(ch, foo(42, @cat)); //! ERROR missing `send` + let po = comm::port(); //~ ERROR missing `send` + let ch = comm::chan(po); //~ ERROR missing `send` + comm::send(ch, foo(42, @cat)); //~ ERROR missing `send` } \ No newline at end of file diff --git a/src/test/compile-fail/vec-add.rs b/src/test/compile-fail/vec-add.rs index 583ffb9c197..6224fed7434 100644 --- a/src/test/compile-fail/vec-add.rs +++ b/src/test/compile-fail/vec-add.rs @@ -30,74 +30,74 @@ fn add(i: [int]/~, m: [mut int]/~, c: [const int]/~) { m + c, c); - add(m + [3]/~, //! ERROR mismatched types + add(m + [3]/~, //~ ERROR mismatched types m + [3]/~, m + [3]/~); add(i + [3]/~, - i + [3]/~, //! ERROR mismatched types + i + [3]/~, //~ ERROR mismatched types i + [3]/~); - add(c + [3]/~, //! ERROR mismatched types - //!^ ERROR binary operation + cannot be applied - c + [3]/~, //! ERROR binary operation + cannot be applied - //!^ mismatched types + add(c + [3]/~, //~ ERROR mismatched types + //~^ ERROR binary operation + cannot be applied + c + [3]/~, //~ ERROR binary operation + cannot be applied + //~^ mismatched types [3]/~); - add(m + [mut 3]/~, //! ERROR mismatched types + add(m + [mut 3]/~, //~ ERROR mismatched types m + [mut 3]/~, m + [mut 3]/~); add(i + [mut 3]/~, - i + [mut 3]/~, //! ERROR mismatched types + i + [mut 3]/~, //~ ERROR mismatched types i + [mut 3]/~); - add(c + [mut 3]/~, //! ERROR binary operation + cannot be applied - //!^ mismatched types - c + [mut 3]/~, //! ERROR binary operation + cannot be applied - //!^ mismatched types + add(c + [mut 3]/~, //~ ERROR binary operation + cannot be applied + //~^ mismatched types + c + [mut 3]/~, //~ ERROR binary operation + cannot be applied + //~^ mismatched types [mut 3]/~); - add(m + i, //! ERROR mismatched types + add(m + i, //~ ERROR mismatched types m + i, m + i); add(i + i, - i + i, //! ERROR mismatched types + i + i, //~ ERROR mismatched types i + i); - add(c + i, //! ERROR binary operation + cannot be applied - //!^ ERROR mismatched types - c + i, //! ERROR binary operation + cannot be applied - //!^ ERROR mismatched types + add(c + i, //~ ERROR binary operation + cannot be applied + //~^ ERROR mismatched types + c + i, //~ ERROR binary operation + cannot be applied + //~^ ERROR mismatched types i); - add(m + m, //! ERROR mismatched types + add(m + m, //~ ERROR mismatched types m + m, m + m); add(i + m, - i + m, //! ERROR mismatched types + i + m, //~ ERROR mismatched types i + m); - add(c + m, //! ERROR binary operation + cannot be applied - //!^ ERROR mismatched types - c + m, //! ERROR binary operation + cannot be applied - //!^ ERROR mismatched types + add(c + m, //~ ERROR binary operation + cannot be applied + //~^ ERROR mismatched types + c + m, //~ ERROR binary operation + cannot be applied + //~^ ERROR mismatched types m); - add(m + c, //! ERROR mismatched types + add(m + c, //~ ERROR mismatched types m + c, m + c); add(i + c, - i + c, //! ERROR mismatched types + i + c, //~ ERROR mismatched types i + c); - add(c + c, //! ERROR binary operation + cannot be applied - //!^ ERROR mismatched types - c + c, //! ERROR binary operation + cannot be applied - //!^ ERROR mismatched types + add(c + c, //~ ERROR binary operation + cannot be applied + //~^ ERROR mismatched types + c + c, //~ ERROR binary operation + cannot be applied + //~^ ERROR mismatched types c); } diff --git a/src/test/compile-fail/vec-concat-bug.rs b/src/test/compile-fail/vec-concat-bug.rs index 40e6e2b0358..6545a56806e 100644 --- a/src/test/compile-fail/vec-concat-bug.rs +++ b/src/test/compile-fail/vec-concat-bug.rs @@ -3,7 +3,7 @@ fn concat<T: copy>(v: [const [const T]/~]/~) -> [T]/~ { // Earlier versions of our type checker accepted this: vec::iter(v) {|&&inner: [T]/~| - //!^ ERROR values differ in mutability + //~^ ERROR values differ in mutability r += inner; } diff --git a/src/test/compile-fail/vector-no-ann.rs b/src/test/compile-fail/vector-no-ann.rs index c68995a6854..a8365b66870 100644 --- a/src/test/compile-fail/vector-no-ann.rs +++ b/src/test/compile-fail/vector-no-ann.rs @@ -1,3 +1,3 @@ fn main() { - let _foo = []/~; //! ERROR unconstrained type + let _foo = []/~; //~ ERROR unconstrained type } diff --git a/src/test/compile-fail/warn-path-statement.rs b/src/test/compile-fail/warn-path-statement.rs index ba8c241689d..d5645c4358f 100644 --- a/src/test/compile-fail/warn-path-statement.rs +++ b/src/test/compile-fail/warn-path-statement.rs @@ -2,5 +2,5 @@ fn main() { let x = 10; - x; //! ERROR path statement with no effect + x; //~ ERROR path statement with no effect } \ No newline at end of file diff --git a/src/test/run-pass/liveness-assign-imm-local-after-ret.rs b/src/test/run-pass/liveness-assign-imm-local-after-ret.rs index 4b1cc591713..028bf10201b 100644 --- a/src/test/run-pass/liveness-assign-imm-local-after-ret.rs +++ b/src/test/run-pass/liveness-assign-imm-local-after-ret.rs @@ -2,7 +2,7 @@ fn test() { let _v: int; _v = 1; ret; - _v = 2; //! WARNING: unreachable statement + _v = 2; //~ WARNING: unreachable statement } fn main() { diff --git a/src/test/run-pass/pred-not-bool.rs b/src/test/run-pass/pred-not-bool.rs index 58281b40b5e..67b5a877c05 100644 --- a/src/test/run-pass/pred-not-bool.rs +++ b/src/test/run-pass/pred-not-bool.rs @@ -1,6 +1,6 @@ // this checks that a pred with a non-bool return // type is rejected, even if the pred is never used -pure fn bad(a: int) -> int { ret 37; } //! ERROR Non-boolean return type +pure fn bad(a: int) -> int { ret 37; } //~ ERROR Non-boolean return type fn main() { } diff --git a/src/test/run-pass/unreachable-code-1.rs b/src/test/run-pass/unreachable-code-1.rs index 38b97b47e4b..fba080ac7f5 100644 --- a/src/test/run-pass/unreachable-code-1.rs +++ b/src/test/run-pass/unreachable-code-1.rs @@ -4,7 +4,7 @@ fn id(x: bool) -> bool { x } fn call_id() { let c <- fail; - id(c); //! WARNING unreachable statement + id(c); //~ WARNING unreachable statement } fn call_id_3() { id(ret) && id(ret); } |
