diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2017-12-10 23:29:24 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2017-12-14 23:26:39 +0300 |
| commit | 1f5b201affc48dcf0b637caa9596c11d83e1db94 (patch) | |
| tree | eb7044df493bdd2882ee0051003e796202e6f5b0 /src/test/ui/union | |
| parent | d4e51a8fb286444a8c276a05a1c3ba6ba8ca6576 (diff) | |
| download | rust-1f5b201affc48dcf0b637caa9596c11d83e1db94.tar.gz rust-1f5b201affc48dcf0b637caa9596c11d83e1db94.zip | |
Remove NOTE/HELP annotations from UI tests
Diffstat (limited to 'src/test/ui/union')
| -rw-r--r-- | src/test/ui/union/union-const-eval.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/union/union-fields-2.rs | 3 | ||||
| -rw-r--r-- | src/test/ui/union/union-fields-2.stderr | 36 | ||||
| -rw-r--r-- | src/test/ui/union/union-suggest-field.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/union/union-suggest-field.stderr | 8 |
5 files changed, 22 insertions, 29 deletions
diff --git a/src/test/ui/union/union-const-eval.rs b/src/test/ui/union/union-const-eval.rs index 73b7743fc45..a4c969ba20c 100644 --- a/src/test/ui/union/union-const-eval.rs +++ b/src/test/ui/union/union-const-eval.rs @@ -19,8 +19,6 @@ fn main() { unsafe { let a: [u8; C.a]; // OK let b: [u8; C.b]; //~ ERROR constant evaluation error - //~^ NOTE nonexistent struct field //~| WARNING constant evaluation error - //~| NOTE on by default } } diff --git a/src/test/ui/union/union-fields-2.rs b/src/test/ui/union/union-fields-2.rs index 124b16f99b1..7b9ff866a43 100644 --- a/src/test/ui/union/union-fields-2.rs +++ b/src/test/ui/union/union-fields-2.rs @@ -19,8 +19,6 @@ fn main() { let u = U { a: 0, b: 1 }; //~ ERROR union expressions should have exactly one field let u = U { a: 0, b: 1, c: 2 }; //~ ERROR union expressions should have exactly one field //~^ ERROR union `U` has no field named `c` - //~| NOTE `U` does not have this field - //~| NOTE available fields are: `a`, `b` let u = U { ..u }; //~ ERROR union expressions should have exactly one field //~^ ERROR functional record update syntax requires a struct @@ -29,7 +27,6 @@ fn main() { let U { a, b } = u; //~ ERROR union patterns should have exactly one field let U { a, b, c } = u; //~ ERROR union patterns should have exactly one field //~^ ERROR union `U` does not have a field named `c` - //~| NOTE union `U` does not have field `c` let U { .. } = u; //~ ERROR union patterns should have exactly one field //~^ ERROR `..` cannot be used in union patterns let U { a, .. } = u; //~ ERROR `..` cannot be used in union patterns diff --git a/src/test/ui/union/union-fields-2.stderr b/src/test/ui/union/union-fields-2.stderr index 19c0552fdaa..f6c64dcabd7 100644 --- a/src/test/ui/union/union-fields-2.stderr +++ b/src/test/ui/union/union-fields-2.stderr @@ -25,57 +25,57 @@ error: union expressions should have exactly one field | ^ error: union expressions should have exactly one field - --> $DIR/union-fields-2.rs:24:13 + --> $DIR/union-fields-2.rs:22:13 | -24 | let u = U { ..u }; //~ ERROR union expressions should have exactly one field +22 | let u = U { ..u }; //~ ERROR union expressions should have exactly one field | ^ error[E0436]: functional record update syntax requires a struct - --> $DIR/union-fields-2.rs:24:19 + --> $DIR/union-fields-2.rs:22:19 | -24 | let u = U { ..u }; //~ ERROR union expressions should have exactly one field +22 | let u = U { ..u }; //~ ERROR union expressions should have exactly one field | ^ error: union patterns should have exactly one field - --> $DIR/union-fields-2.rs:27:9 + --> $DIR/union-fields-2.rs:25:9 | -27 | let U {} = u; //~ ERROR union patterns should have exactly one field +25 | let U {} = u; //~ ERROR union patterns should have exactly one field | ^^^^ error: union patterns should have exactly one field - --> $DIR/union-fields-2.rs:29:9 + --> $DIR/union-fields-2.rs:27:9 | -29 | let U { a, b } = u; //~ ERROR union patterns should have exactly one field +27 | let U { a, b } = u; //~ ERROR union patterns should have exactly one field | ^^^^^^^^^^ error[E0026]: union `U` does not have a field named `c` - --> $DIR/union-fields-2.rs:30:19 + --> $DIR/union-fields-2.rs:28:19 | -30 | let U { a, b, c } = u; //~ ERROR union patterns should have exactly one field +28 | let U { a, b, c } = u; //~ ERROR union patterns should have exactly one field | ^ union `U` does not have field `c` error: union patterns should have exactly one field - --> $DIR/union-fields-2.rs:30:9 + --> $DIR/union-fields-2.rs:28:9 | -30 | let U { a, b, c } = u; //~ ERROR union patterns should have exactly one field +28 | let U { a, b, c } = u; //~ ERROR union patterns should have exactly one field | ^^^^^^^^^^^^^ error: union patterns should have exactly one field - --> $DIR/union-fields-2.rs:33:9 + --> $DIR/union-fields-2.rs:30:9 | -33 | let U { .. } = u; //~ ERROR union patterns should have exactly one field +30 | let U { .. } = u; //~ ERROR union patterns should have exactly one field | ^^^^^^^^ error: `..` cannot be used in union patterns - --> $DIR/union-fields-2.rs:33:9 + --> $DIR/union-fields-2.rs:30:9 | -33 | let U { .. } = u; //~ ERROR union patterns should have exactly one field +30 | let U { .. } = u; //~ ERROR union patterns should have exactly one field | ^^^^^^^^ error: `..` cannot be used in union patterns - --> $DIR/union-fields-2.rs:35:9 + --> $DIR/union-fields-2.rs:32:9 | -35 | let U { a, .. } = u; //~ ERROR `..` cannot be used in union patterns +32 | let U { a, .. } = u; //~ ERROR `..` cannot be used in union patterns | ^^^^^^^^^^^ error: aborting due to 13 previous errors diff --git a/src/test/ui/union/union-suggest-field.rs b/src/test/ui/union/union-suggest-field.rs index 65c7c980b8a..96fca78ef22 100644 --- a/src/test/ui/union/union-suggest-field.rs +++ b/src/test/ui/union/union-suggest-field.rs @@ -19,10 +19,8 @@ impl U { fn main() { let u = U { principle: 0 }; //~^ ERROR union `U` has no field named `principle` - //~| NOTE field does not exist - did you mean `principal`? let w = u.principial; //~ ERROR no field `principial` on type `U` //~^ did you mean `principal`? let y = u.calculate; //~ ERROR attempted to take value of method `calculate` on type `U` - //~^ HELP maybe a `()` to call it is missing? } diff --git a/src/test/ui/union/union-suggest-field.stderr b/src/test/ui/union/union-suggest-field.stderr index d76a92cf56e..d2ea09553bc 100644 --- a/src/test/ui/union/union-suggest-field.stderr +++ b/src/test/ui/union/union-suggest-field.stderr @@ -5,15 +5,15 @@ error[E0560]: union `U` has no field named `principle` | ^^^^^^^^^^ field does not exist - did you mean `principal`? error[E0609]: no field `principial` on type `U` - --> $DIR/union-suggest-field.rs:23:15 + --> $DIR/union-suggest-field.rs:22:15 | -23 | let w = u.principial; //~ ERROR no field `principial` on type `U` +22 | let w = u.principial; //~ ERROR no field `principial` on type `U` | ^^^^^^^^^^ did you mean `principal`? error[E0615]: attempted to take value of method `calculate` on type `U` - --> $DIR/union-suggest-field.rs:26:15 + --> $DIR/union-suggest-field.rs:25:15 | -26 | let y = u.calculate; //~ ERROR attempted to take value of method `calculate` on type `U` +25 | let y = u.calculate; //~ ERROR attempted to take value of method `calculate` on type `U` | ^^^^^^^^^ | = help: maybe a `()` to call it is missing? |
