diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-02-03 22:25:16 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-03 22:25:16 +0100 |
| commit | 7d516c57dff93af2f3f457e01ef2d8b6233c0c0b (patch) | |
| tree | 5eb10c9e94e6ebe72ac139b36c8af5828af77ccb /tests/ui/parser | |
| parent | 69920786ba7f5ab8e7536fbe93325fef7e6e7c3b (diff) | |
| parent | d31905c904ce1cdecd4f3d32a29a0b224e8f0c58 (diff) | |
Rollup merge of #120531 - oli-obk:track_errors7, r=estebank
Remove a bunch of `has_errors` checks that have no meaningful or the wrong effect r? `@nnethercote`
Diffstat (limited to 'tests/ui/parser')
| -rw-r--r-- | tests/ui/parser/issues/issue-89574.rs | 2 | ||||
| -rw-r--r-- | tests/ui/parser/issues/issue-89574.stderr | 17 | ||||
| -rw-r--r-- | tests/ui/parser/missing-closing-angle-bracket-eq-constraint.stderr | 4 |
3 files changed, 20 insertions, 3 deletions
diff --git a/tests/ui/parser/issues/issue-89574.rs b/tests/ui/parser/issues/issue-89574.rs index 0a477f1aa5f..bafb0ce5e66 100644 --- a/tests/ui/parser/issues/issue-89574.rs +++ b/tests/ui/parser/issues/issue-89574.rs @@ -1,4 +1,6 @@ fn main() { const EMPTY_ARRAY = []; //~^ missing type for `const` item + //~| ERROR type annotations needed + //~| ERROR type annotations needed } diff --git a/tests/ui/parser/issues/issue-89574.stderr b/tests/ui/parser/issues/issue-89574.stderr index 5f8f6f93969..a0586d41e2e 100644 --- a/tests/ui/parser/issues/issue-89574.stderr +++ b/tests/ui/parser/issues/issue-89574.stderr @@ -1,8 +1,23 @@ +error[E0282]: type annotations needed + --> $DIR/issue-89574.rs:2:25 + | +LL | const EMPTY_ARRAY = []; + | ^^ cannot infer type + error: missing type for `const` item --> $DIR/issue-89574.rs:2:22 | LL | const EMPTY_ARRAY = []; | ^ help: provide a type for the item: `: <type>` -error: aborting due to 1 previous error +error[E0282]: type annotations needed + --> $DIR/issue-89574.rs:2:25 + | +LL | const EMPTY_ARRAY = []; + | ^^ cannot infer type + | + = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` + +error: aborting due to 3 previous errors +For more information about this error, try `rustc --explain E0282`. diff --git a/tests/ui/parser/missing-closing-angle-bracket-eq-constraint.stderr b/tests/ui/parser/missing-closing-angle-bracket-eq-constraint.stderr index e40d9858262..b21e788aa73 100644 --- a/tests/ui/parser/missing-closing-angle-bracket-eq-constraint.stderr +++ b/tests/ui/parser/missing-closing-angle-bracket-eq-constraint.stderr @@ -41,7 +41,7 @@ error[E0282]: type annotations needed for `Vec<_>` --> $DIR/missing-closing-angle-bracket-eq-constraint.rs:7:7 | LL | let v : Vec<(u32,_) = vec![]; - | ^ + | ^ ------ type must be known at this point | help: consider giving `v` an explicit type, where the placeholders `_` are specified | @@ -52,7 +52,7 @@ error[E0282]: type annotations needed for `Vec<_>` --> $DIR/missing-closing-angle-bracket-eq-constraint.rs:18:7 | LL | let v : Vec<'a = vec![]; - | ^ + | ^ ------ type must be known at this point | help: consider giving `v` an explicit type, where the placeholders `_` are specified | |
