diff --git a/tests/integrations/basic-fail/Cargo.stdout b/tests/integrations/basic-fail/Cargo.stdout index 6c600128..a048034c 100644 --- a/tests/integrations/basic-fail/Cargo.stdout +++ b/tests/integrations/basic-fail/Cargo.stdout @@ -5,7 +5,8 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; fini { "type": "suite", "event": "started" } { "type": "test", "event": "started", "name": "tests/actual_tests/bad_pattern.rs () - tests/actual_tests/bad_pattern.rs" } -{ "type": "test", "event": "started", "name": "tests/actual_tests/bad_pattern_multiple.rs () - tests/actual_tests/bad_pattern_multiple.rs" } +{ "type": "test", "event": "started", "name": "tests/actual_tests/diag_not_found_multiple.rs () - tests/actual_tests/diag_not_found_multiple.rs" } +{ "type": "test", "event": "started", "name": "tests/actual_tests/diag_not_found_one.rs () - tests/actual_tests/diag_not_found_one.rs" } { "type": "test", "event": "started", "name": "tests/actual_tests/executable.rs () - tests/actual_tests/executable.rs" } { "type": "test", "event": "started", "name": "tests/actual_tests/executable_compile_err.rs () - tests/actual_tests/executable_compile_err.rs" } { "type": "test", "event": "started", "name": "tests/actual_tests/exit_code_fail.rs () - tests/actual_tests/exit_code_fail.rs" } @@ -23,7 +24,8 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; fini { "type": "test", "event": "started", "name": "tests/actual_tests/touching_above_below_chain.rs () - tests/actual_tests/touching_above_below_chain.rs" } { "type": "test", "event": "ok", "name": "tests/actual_tests/bad_pattern.rs (Building dependencies) - tests/actual_tests/bad_pattern.rs" } { "type": "test", "event": "failed", "name": "tests/actual_tests/bad_pattern.rs () - tests/actual_tests/bad_pattern.rs", "stdout": "command: <\"rustc\" \"--error-format=json\" \"--out-dir\" \"$DIR/tests/integrations/basic-fail/../../../target/$TMP/0/tests/actual_tests\" \"tests/actual_tests/bad_pattern.rs\" \"--extern\" \"basic_fail=$DIR/tests/integrations/basic-fail/../../../target/$TMP/$TRIPLE/debug/libbasic_fail.rlib\" \"--extern\" \"basic_fail=$DIR/tests/integrations/basic-fail/../../../target/$TMP/$TRIPLE/debug/libbasic_fail-$HASH.rmeta\" \"-L\" \"$DIR/tests/integrations/basic-fail/../../../target/$TMP/$TRIPLE/debug\" \"-L\" \"$DIR/tests/integrations/basic-fail/../../../target/$TMP/$TRIPLE/debug\" \"--edition\" \"2021\"> stdout: tests/actual_tests/bad_pattern.rs:4:9\n |\n4 | add(\"42\", 3);\n | --- ^^^^ expected `usize`, found `&str`\n | |\n | arguments to this function are incorrect\n |\nnote: function defined here\n --> $DIR/tests/integrations/basic-fail/src/lib.rs:LL:CC\n |\n1 | pub fn add(left: usize, right: usize) -> usize {\n | ^^^\n\nerror: aborting due to 1 previous error\n\nFor more information about this error, try `rustc --explain E0308`.\n> stderr: <>" } -{ "type": "test", "event": "failed", "name": "tests/actual_tests/bad_pattern_multiple.rs () - tests/actual_tests/bad_pattern_multiple.rs", "stdout": "command: <\"rustc\" \"--error-format=json\" \"--out-dir\" \"$DIR/tests/integrations/basic-fail/../../../target/$TMP/0/tests/actual_tests\" \"tests/actual_tests/bad_pattern_multiple.rs\" \"--extern\" \"basic_fail=$DIR/tests/integrations/basic-fail/../../../target/$TMP/$TRIPLE/debug/libbasic_fail.rlib\" \"--extern\" \"basic_fail=$DIR/tests/integrations/basic-fail/../../../target/$TMP/$TRIPLE/debug/libbasic_fail-$HASH.rmeta\" \"-L\" \"$DIR/tests/integrations/basic-fail/../../../target/$TMP/$TRIPLE/debug\" \"-L\" \"$DIR/tests/integrations/basic-fail/../../../target/$TMP/$TRIPLE/debug\" \"--edition\" \"2021\"> stdout: tests/actual_tests/bad_pattern_multiple.rs:4:9\n |\n4 | add(\"42\", 3);\n | --- ^^^^ expected `usize`, found `&str`\n | |\n | arguments to this function are incorrect\n |\nnote: function defined here\n --> $DIR/tests/integrations/basic-fail/src/lib.rs:LL:CC\n |\n1 | pub fn add(left: usize, right: usize) -> usize {\n | ^^^\n\nerror[E0308]: mismatched types\n --> tests/actual_tests/bad_pattern_multiple.rs:6:9\n |\n6 | add(\"42\", 3);\n | --- ^^^^ expected `usize`, found `&str`\n | |\n | arguments to this function are incorrect\n |\nnote: function defined here\n --> $DIR/tests/integrations/basic-fail/src/lib.rs:LL:CC\n |\n1 | pub fn add(left: usize, right: usize) -> usize {\n | ^^^\n\nerror: aborting due to 2 previous errors\n\nFor more information about this error, try `rustc --explain E0308`.\n> stderr: <>" } +{ "type": "test", "event": "failed", "name": "tests/actual_tests/diag_not_found_multiple.rs () - tests/actual_tests/diag_not_found_multiple.rs", "stdout": "command: <\"rustc\" \"--error-format=json\" \"--out-dir\" \"$DIR/tests/integrations/basic-fail/../../../target/$TMP/0/tests/actual_tests\" \"tests/actual_tests/diag_not_found_multiple.rs\" \"--extern\" \"basic_fail=$DIR/tests/integrations/basic-fail/../../../target/$TMP/$TRIPLE/debug/libbasic_fail.rlib\" \"--extern\" \"basic_fail=$DIR/tests/integrations/basic-fail/../../../target/$TMP/$TRIPLE/debug/libbasic_fail-$HASH.rmeta\" \"-L\" \"$DIR/tests/integrations/basic-fail/../../../target/$TMP/$TRIPLE/debug\" \"-L\" \"$DIR/tests/integrations/basic-fail/../../../target/$TMP/$TRIPLE/debug\" \"--edition\" \"2021\"> stdout: tests/actual_tests/diag_not_found_multiple.rs:8:9\n |\n8 | add(\"42\", 3);\n | --- ^^^^ expected `usize`, found `&str`\n | |\n | arguments to this function are incorrect\n |\nnote: function defined here\n --> tests/actual_tests/diag_not_found_multiple.rs:1:8\n |\n1 | pub fn add(left: usize, right: usize) -> usize {\n | ^^^ -----------\n\nerror[E0308]: mismatched types\n --> tests/actual_tests/diag_not_found_multiple.rs:16:13\n |\n16 | add(\"42\", 3); add(\"42\", 3);\n | --- ^^^^ expected `usize`, found `&str`\n | |\n | arguments to this function are incorrect\n |\nnote: function defined here\n --> tests/actual_tests/diag_not_found_multiple.rs:1:8\n |\n1 | pub fn add(left: usize, right: usize) -> usize {\n | ^^^ -----------\n\nerror[E0308]: mismatched types\n --> tests/actual_tests/diag_not_found_multiple.rs:16:27\n |\n16 | add(\"42\", 3); add(\"42\", 3);\n | --- ^^^^ expected `usize`, found `&str`\n | |\n | arguments to this function are incorrect\n |\nnote: function defined here\n --> tests/actual_tests/diag_not_found_multiple.rs:1:8\n |\n1 | pub fn add(left: usize, right: usize) -> usize {\n | ^^^ -----------\n\nerror: aborting due to 3 previous errors\n\nFor more information about this error, try `rustc --explain E0308`.\n> stderr: <>" } +{ "type": "test", "event": "failed", "name": "tests/actual_tests/diag_not_found_one.rs () - tests/actual_tests/diag_not_found_one.rs", "stdout": "command: <\"rustc\" \"--error-format=json\" \"--out-dir\" \"$DIR/tests/integrations/basic-fail/../../../target/$TMP/0/tests/actual_tests\" \"tests/actual_tests/diag_not_found_one.rs\" \"--extern\" \"basic_fail=$DIR/tests/integrations/basic-fail/../../../target/$TMP/$TRIPLE/debug/libbasic_fail.rlib\" \"--extern\" \"basic_fail=$DIR/tests/integrations/basic-fail/../../../target/$TMP/$TRIPLE/debug/libbasic_fail-$HASH.rmeta\" \"-L\" \"$DIR/tests/integrations/basic-fail/../../../target/$TMP/$TRIPLE/debug\" \"-L\" \"$DIR/tests/integrations/basic-fail/../../../target/$TMP/$TRIPLE/debug\" \"--edition\" \"2021\"> stdout: tests/actual_tests/diag_not_found_one.rs:6:9\n |\n6 | add(\"42\", 3);\n | --- ^^^^ expected `usize`, found `&str`\n | |\n | arguments to this function are incorrect\n |\nnote: function defined here\n --> tests/actual_tests/diag_not_found_one.rs:1:8\n |\n1 | pub fn add(left: usize, right: usize) -> usize {\n | ^^^ -----------\n\nerror[E0308]: mismatched types\n --> tests/actual_tests/diag_not_found_one.rs:9:9\n |\n9 | add(\"42\", 3);\n | --- ^^^^ expected `usize`, found `&str`\n | |\n | arguments to this function are incorrect\n |\nnote: function defined here\n --> tests/actual_tests/diag_not_found_one.rs:1:8\n |\n1 | pub fn add(left: usize, right: usize) -> usize {\n | ^^^ -----------\n\nerror: aborting due to 2 previous errors\n\nFor more information about this error, try `rustc --explain E0308`.\n> stderr: <>" } { "type": "test", "event": "ok", "name": "tests/actual_tests/executable.rs () - tests/actual_tests/executable.rs" } { "type": "test", "event": "failed", "name": "tests/actual_tests/executable.rs (run) - tests/actual_tests/executable.rs", "stdout": "command: <\"$DIR/tests/integrations/basic-fail/../../../target/$TMP/0/tests/actual_tests/executable\"> stdout: <> stderr: <42\n>" } { "type": "test", "event": "failed", "name": "tests/actual_tests/executable_compile_err.rs () - tests/actual_tests/executable_compile_err.rs", "stdout": "command: <\"rustc\" \"--error-format=json\" \"--out-dir\" \"$DIR/tests/integrations/basic-fail/../../../target/$TMP/0/tests/actual_tests\" \"tests/actual_tests/executable_compile_err.rs\" \"--extern\" \"basic_fail=$DIR/tests/integrations/basic-fail/../../../target/$TMP/$TRIPLE/debug/libbasic_fail.rlib\" \"--extern\" \"basic_fail=$DIR/tests/integrations/basic-fail/../../../target/$TMP/$TRIPLE/debug/libbasic_fail-$HASH.rmeta\" \"-L\" \"$DIR/tests/integrations/basic-fail/../../../target/$TMP/$TRIPLE/debug\" \"-L\" \"$DIR/tests/integrations/basic-fail/../../../target/$TMP/$TRIPLE/debug\" \"--edition\" \"2021\"> stdout: tests/actual_tests/executable_compile_err.rs:4:2\n |\n3 | fn main() {\n | - unclosed delimiter\n4 |\n | ^\n\nerror: aborting due to 1 previous error\n\n> stderr: <>" } @@ -40,10 +42,11 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; fini { "type": "test", "event": "failed", "name": "tests/actual_tests/rustc_ice.rs () - tests/actual_tests/rustc_ice.rs", "stdout": "command: <\"rustc\" \"--error-format=json\" \"--out-dir\" \"$DIR/tests/integrations/basic-fail/../../../target/$TMP/0/tests/actual_tests\" \"tests/actual_tests/rustc_ice.rs\" \"-Ztreat-err-as-bug\" \"--extern\" \"basic_fail=$DIR/tests/integrations/basic-fail/../../../target/$TMP/$TRIPLE/debug/libbasic_fail.rlib\" \"--extern\" \"basic_fail=$DIR/tests/integrations/basic-fail/../../../target/$TMP/$TRIPLE/debug/libbasic_fail-$HASH.rmeta\" \"-L\" \"$DIR/tests/integrations/basic-fail/../../../target/$TMP/$TRIPLE/debug\" \"-L\" \"$DIR/tests/integrations/basic-fail/../../../target/$TMP/$TRIPLE/debug\" \"--edition\" \"2021\"> stdout: tests/actual_tests/rustc_ice.rs:8:9\n |\n8 | add(\"42\", 3);\n | --- ^^^^ expected `usize`, found `&str`\n | |\n | arguments to this function are incorrect\n |\nnote: function defined here\n --> $DIR/tests/integrations/basic-fail/src/lib.rs:LL:CC\n |\n1 | pub fn add(left: usize, right: usize) -> usize {\n | ^^^\n\nthread 'rustc' panicked at compiler/rustc_errors/src/lib.rs:\naborting due to `-Z treat-err-as-bug=1`\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n\nerror: the compiler unexpectedly panicked. this is a bug.\n\nnote: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md\n\nnote: please make sure that you have updated to the latest nightly\n\n { "type": "test", "event": "failed", "name": "tests/actual_tests/touching_above_below.rs () - tests/actual_tests/touching_above_below.rs", "stdout": "command: stdout: <> stderr: <>" } { "type": "test", "event": "failed", "name": "tests/actual_tests/touching_above_below_chain.rs () - tests/actual_tests/touching_above_below_chain.rs", "stdout": "command: stdout: <> stderr: <>" } -{ "type": "suite", "event": "failed", "passed": 1, "failed": 17, "ignored": 0, "measured": 0, "filtered_out": 0 } +{ "type": "suite", "event": "failed", "passed": 1, "failed": 18, "ignored": 0, "measured": 0, "filtered_out": 0 } Building dependencies ... ok tests/actual_tests/bad_pattern.rs ... FAILED -tests/actual_tests/bad_pattern_multiple.rs ... FAILED +tests/actual_tests/diag_not_found_multiple.rs ... FAILED +tests/actual_tests/diag_not_found_one.rs ... FAILED tests/actual_tests/executable.rs ... ok tests/actual_tests/executable.rs (revision `run`) ... FAILED tests/actual_tests/executable_compile_err.rs ... FAILED @@ -135,126 +138,106 @@ full stdout: -FAILED TEST: tests/actual_tests/bad_pattern_multiple.rs -command: "rustc" "--error-format=json" "--out-dir" "$TMP "tests/actual_tests/bad_pattern_multiple.rs" "--extern" "basic_fail=$DIR/tests/integrations/basic-fail/../../../target/$TMP/$TRIPLE/debug/libbasic_fail.rlib" "--extern" "basic_fail=$DIR/tests/integrations/basic-fail/../../../target/$TMP/$TRIPLE/debug/libbasic_fail-$HASH.rmeta" "-L" "$DIR/tests/integrations/basic-fail/../../../target/$TMP/$TRIPLE/debug" "-L" "$DIR/tests/integrations/basic-fail/../../../target/$TMP/$TRIPLE/debug" "--edition" "2021" +FAILED TEST: tests/actual_tests/diag_not_found_multiple.rs +command: "rustc" "--error-format=json" "--out-dir" "$TMP "tests/actual_tests/diag_not_found_multiple.rs" "--extern" "basic_fail=$DIR/tests/integrations/basic-fail/../../../target/$TMP/$TRIPLE/debug/libbasic_fail.rlib" "--extern" "basic_fail=$DIR/tests/integrations/basic-fail/../../../target/$TMP/$TRIPLE/debug/libbasic_fail-$HASH.rmeta" "-L" "$DIR/tests/integrations/basic-fail/../../../target/$TMP/$TRIPLE/debug" "-L" "$DIR/tests/integrations/basic-fail/../../../target/$TMP/$TRIPLE/debug" "--edition" "2021" -error: actual output differed from expected -Execute `DO NOT BLESS. These are meant to fail` to update `tests/actual_tests/bad_pattern_multiple.stderr` to the actual output ---- tests/actual_tests/bad_pattern_multiple.stderr -+++ - error[E0308]: mismatched types - --> tests/actual_tests/bad_pattern_multiple.rs:4:9 -... 11 lines skipped ... - - error[E0308]: mismatched types -- --> tests/actual_tests/bad_pattern_multiple.rs:6:9 -+ --> tests/actual_tests/bad_pattern_multiple.rs:6:9 - | - 6 | add("42", 3); -... 3 lines skipped ... +error: there were 2 unmatched diagnostics + --> tests/actual_tests/diag_not_found_multiple.rs:16:13 | - note: function defined here -- --> $DIR/tests/integrations/basic-fail/src/lib.rs:LL:CC -+ --> $DIR/tests/integrations/basic-fail/src/lib.rs:LL:CC +16 | add("42", 3); add("42", 3); + | ^^^^ Error[E0308]: mismatched types + | ^^^^ Error[E0308]: mismatched types | - 1 | pub fn add(left: usize, right: usize) -> usize { - | ^^^ - -- error: aborting due to 2 previous errors -+error: aborting due to 2 previous errors - - For more information about this error, try `rustc --explain E0308`. -Full unnormalized output: +full stderr: error[E0308]: mismatched types - --> tests/actual_tests/bad_pattern_multiple.rs:4:9 + --> tests/actual_tests/diag_not_found_multiple.rs:8:9 | -4 | add("42", 3); +8 | add("42", 3); | --- ^^^^ expected `usize`, found `&str` | | | arguments to this function are incorrect | note: function defined here - --> $DIR/tests/integrations/basic-fail/src/lib.rs:LL:CC + --> tests/actual_tests/diag_not_found_multiple.rs:1:8 | 1 | pub fn add(left: usize, right: usize) -> usize { - | ^^^ + | ^^^ ----------- error[E0308]: mismatched types - --> tests/actual_tests/bad_pattern_multiple.rs:6:9 - | -6 | add("42", 3); - | --- ^^^^ expected `usize`, found `&str` - | | - | arguments to this function are incorrect - | + --> tests/actual_tests/diag_not_found_multiple.rs:16:13 + | +16 | add("42", 3); add("42", 3); + | --- ^^^^ expected `usize`, found `&str` + | | + | arguments to this function are incorrect + | note: function defined here - --> $DIR/tests/integrations/basic-fail/src/lib.rs:LL:CC - | -1 | pub fn add(left: usize, right: usize) -> usize { - | ^^^ + --> tests/actual_tests/diag_not_found_multiple.rs:1:8 + | +1 | pub fn add(left: usize, right: usize) -> usize { + | ^^^ ----------- -error: aborting due to 2 previous errors +error[E0308]: mismatched types + --> tests/actual_tests/diag_not_found_multiple.rs:16:27 + | +16 | add("42", 3); add("42", 3); + | --- ^^^^ expected `usize`, found `&str` + | | + | arguments to this function are incorrect + | +note: function defined here + --> tests/actual_tests/diag_not_found_multiple.rs:1:8 + | +1 | pub fn add(left: usize, right: usize) -> usize { + | ^^^ ----------- + +error: aborting due to 3 previous errors For more information about this error, try `rustc --explain E0308`. +full stdout: -error: `miesmätsched types` not found in diagnostics on line 4 - --> tests/actual_tests/bad_pattern_multiple.rs:5:17 - | -5 | //~^ ERROR: miesmätsched types - | ^^^^^^^^^^^^^^^^^^ expected because of this pattern - | -error: `miesmätsched types` not found in diagnostics on line 6 - --> tests/actual_tests/bad_pattern_multiple.rs:7:17 - | -7 | //~^ ERROR: miesmätsched types - | ^^^^^^^^^^^^^^^^^^ expected because of this pattern - | -error: there was 1 unmatched diagnostic - --> tests/actual_tests/bad_pattern_multiple.rs:4:9 - | -4 | add("42", 3); - | ^^^^ Error[E0308]: mismatched types - | +FAILED TEST: tests/actual_tests/diag_not_found_one.rs +command: "rustc" "--error-format=json" "--out-dir" "$TMP "tests/actual_tests/diag_not_found_one.rs" "--extern" "basic_fail=$DIR/tests/integrations/basic-fail/../../../target/$TMP/$TRIPLE/debug/libbasic_fail.rlib" "--extern" "basic_fail=$DIR/tests/integrations/basic-fail/../../../target/$TMP/$TRIPLE/debug/libbasic_fail-$HASH.rmeta" "-L" "$DIR/tests/integrations/basic-fail/../../../target/$TMP/$TRIPLE/debug" "-L" "$DIR/tests/integrations/basic-fail/../../../target/$TMP/$TRIPLE/debug" "--edition" "2021" error: there was 1 unmatched diagnostic - --> tests/actual_tests/bad_pattern_multiple.rs:6:9 + --> tests/actual_tests/diag_not_found_one.rs:9:9 | -6 | add("42", 3); +9 | add("42", 3); | ^^^^ Error[E0308]: mismatched types | full stderr: error[E0308]: mismatched types - --> tests/actual_tests/bad_pattern_multiple.rs:4:9 + --> tests/actual_tests/diag_not_found_one.rs:6:9 | -4 | add("42", 3); +6 | add("42", 3); | --- ^^^^ expected `usize`, found `&str` | | | arguments to this function are incorrect | note: function defined here - --> $DIR/tests/integrations/basic-fail/src/lib.rs:LL:CC + --> tests/actual_tests/diag_not_found_one.rs:1:8 | 1 | pub fn add(left: usize, right: usize) -> usize { - | ^^^ + | ^^^ ----------- error[E0308]: mismatched types - --> tests/actual_tests/bad_pattern_multiple.rs:6:9 + --> tests/actual_tests/diag_not_found_one.rs:9:9 | -6 | add("42", 3); +9 | add("42", 3); | --- ^^^^ expected `usize`, found `&str` | | | arguments to this function are incorrect | note: function defined here - --> $DIR/tests/integrations/basic-fail/src/lib.rs:LL:CC + --> tests/actual_tests/diag_not_found_one.rs:1:8 | 1 | pub fn add(left: usize, right: usize) -> usize { - | ^^^ + | ^^^ ----------- error: aborting due to 2 previous errors @@ -746,7 +729,8 @@ full stdout: FAILURES: tests/actual_tests/bad_pattern.rs - tests/actual_tests/bad_pattern_multiple.rs + tests/actual_tests/diag_not_found_multiple.rs + tests/actual_tests/diag_not_found_one.rs tests/actual_tests/executable.rs (revision run) tests/actual_tests/executable_compile_err.rs tests/actual_tests/exit_code_fail.rs @@ -763,7 +747,7 @@ FAILURES: tests/actual_tests/touching_above_below.rs tests/actual_tests/touching_above_below_chain.rs -test result: FAIL. 17 failed; 1 passed +test result: FAIL. 18 failed; 1 passed Building dependencies ... ok tests/actual_tests_bless/abort.rs ... ok @@ -1455,7 +1439,8 @@ FAILURES: test result: FAIL. 1 failed; 7 passed tests/actual_tests/bad_pattern.rs ... FAILED -tests/actual_tests/bad_pattern_multiple.rs ... FAILED +tests/actual_tests/diag_not_found_multiple.rs ... FAILED +tests/actual_tests/diag_not_found_one.rs ... FAILED tests/actual_tests/executable.rs ... FAILED tests/actual_tests/executable_compile_err.rs ... FAILED tests/actual_tests/exit_code_fail.rs ... FAILED @@ -1530,82 +1515,26 @@ error: there was 1 unmatched diagnostic | -FAILED TEST: tests/actual_tests/bad_pattern_multiple.rs -command: "rustc" "--error-format=json" "--out-dir" "$TMP "tests/actual_tests/bad_pattern_multiple.rs" "--edition" "2021" +FAILED TEST: tests/actual_tests/diag_not_found_multiple.rs +command: "rustc" "--error-format=json" "--out-dir" "$TMP "tests/actual_tests/diag_not_found_multiple.rs" "--edition" "2021" -error: actual output differed from expected -Execute `DO NOT BLESS. These are meant to fail` to update `tests/actual_tests/bad_pattern_multiple.stderr` to the actual output ---- tests/actual_tests/bad_pattern_multiple.stderr -+++ --error[E0308]: mismatched types -+error[E0432]: unresolved import `basic_fail` -- --> tests/actual_tests/bad_pattern_multiple.rs:4:9 -+ --> tests/actual_tests/bad_pattern_multiple.rs:1:5 +error: there were 2 unmatched diagnostics + --> tests/actual_tests/diag_not_found_multiple.rs:16:13 + | +16 | add("42", 3); add("42", 3); + | ^^^^ Error[E0308]: mismatched types + | ^^^^ Error[E0308]: mismatched types | --4 | add("42", 3); -- | --- ^^^^ expected `usize`, found `&str` -- | | -- | arguments to this function are incorrect -- | --note: function defined here -- --> $DIR/tests/integrations/basic-fail/src/lib.rs:LL:CC -- | --1 | pub fn add(left: usize, right: usize) -> usize { -- | ^^^ -+1 | use basic_fail::add; -+ | ^^^^^^^^^^ use of undeclared crate or module `basic_fail` - --error[E0308]: mismatched types -- --> tests/actual_tests/bad_pattern_multiple.rs:6:9 -- | --6 | add("42", 3); -- | --- ^^^^ expected `usize`, found `&str` -- | | -- | arguments to this function are incorrect -- | --note: function defined here -- --> $DIR/tests/integrations/basic-fail/src/lib.rs:LL:CC -- | --1 | pub fn add(left: usize, right: usize) -> usize { -- | ^^^ -+error: aborting due to 1 previous error - -- error: aborting due to 2 previous errors -- --For more information about this error, try `rustc --explain E0308`. -+For more information about this error, try `rustc --explain E0432`. - -Full unnormalized output: -error[E0432]: unresolved import `basic_fail` - --> tests/actual_tests/bad_pattern_multiple.rs:1:5 - | -1 | use basic_fail::add; - | ^^^^^^^^^^ use of undeclared crate or module `basic_fail` - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0432`. - -error: `miesmätsched types` not found in diagnostics on line 4 - --> tests/actual_tests/bad_pattern_multiple.rs:5:17 - | -5 | //~^ ERROR: miesmätsched types - | ^^^^^^^^^^^^^^^^^^ expected because of this pattern - | -error: `miesmätsched types` not found in diagnostics on line 6 - --> tests/actual_tests/bad_pattern_multiple.rs:7:17 - | -7 | //~^ ERROR: miesmätsched types - | ^^^^^^^^^^^^^^^^^^ expected because of this pattern - | +FAILED TEST: tests/actual_tests/diag_not_found_one.rs +command: "rustc" "--error-format=json" "--out-dir" "$TMP "tests/actual_tests/diag_not_found_one.rs" "--edition" "2021" error: there was 1 unmatched diagnostic - --> tests/actual_tests/bad_pattern_multiple.rs:1:5 + --> tests/actual_tests/diag_not_found_one.rs:9:9 | -1 | use basic_fail::add; - | ^^^^^^^^^^ Error[E0432]: unresolved import `basic_fail` +9 | add("42", 3); + | ^^^^ Error[E0308]: mismatched types | @@ -1999,7 +1928,8 @@ error: `//~v` comment immediately following a `//~^` comment chain FAILURES: tests/actual_tests/bad_pattern.rs - tests/actual_tests/bad_pattern_multiple.rs + tests/actual_tests/diag_not_found_multiple.rs + tests/actual_tests/diag_not_found_one.rs tests/actual_tests/executable.rs tests/actual_tests/executable_compile_err.rs tests/actual_tests/exit_code_fail.rs @@ -2016,10 +1946,11 @@ FAILURES: tests/actual_tests/touching_above_below.rs tests/actual_tests/touching_above_below_chain.rs -test result: FAIL. 17 failed +test result: FAIL. 18 failed tests/actual_tests/bad_pattern.rs ... FAILED -tests/actual_tests/bad_pattern_multiple.rs ... FAILED +tests/actual_tests/diag_not_found_multiple.rs ... FAILED +tests/actual_tests/diag_not_found_one.rs ... FAILED tests/actual_tests/executable.rs ... FAILED tests/actual_tests/executable_compile_err.rs ... FAILED tests/actual_tests/exit_code_fail.rs ... FAILED @@ -2045,8 +1976,17 @@ full stdout: could not spawn `"invalid_foobarlaksdfalsdfj"` as a process -FAILED TEST: tests/actual_tests/bad_pattern_multiple.rs -command: "$CMD" "tests/actual_tests/bad_pattern_multiple.rs" "--edition" "2021" +FAILED TEST: tests/actual_tests/diag_not_found_multiple.rs +command: "$CMD" "tests/actual_tests/diag_not_found_multiple.rs" "--edition" "2021" + +full stderr: +No such file or directory +full stdout: +could not spawn `"invalid_foobarlaksdfalsdfj"` as a process + + +FAILED TEST: tests/actual_tests/diag_not_found_one.rs +command: "$CMD" "tests/actual_tests/diag_not_found_one.rs" "--edition" "2021" full stderr: No such file or directory @@ -2253,7 +2193,8 @@ full stdout: FAILURES: tests/actual_tests/bad_pattern.rs - tests/actual_tests/bad_pattern_multiple.rs + tests/actual_tests/diag_not_found_multiple.rs + tests/actual_tests/diag_not_found_one.rs tests/actual_tests/executable.rs tests/actual_tests/executable_compile_err.rs tests/actual_tests/exit_code_fail.rs @@ -2270,7 +2211,7 @@ FAILURES: tests/actual_tests/touching_above_below.rs tests/actual_tests/touching_above_below_chain.rs -test result: FAIL. 17 failed +test result: FAIL. 18 failed running 0 tests diff --git a/tests/integrations/basic-fail/tests/actual_tests/bad_pattern_multiple.rs b/tests/integrations/basic-fail/tests/actual_tests/bad_pattern_multiple.rs deleted file mode 100644 index c74528f5..00000000 --- a/tests/integrations/basic-fail/tests/actual_tests/bad_pattern_multiple.rs +++ /dev/null @@ -1,8 +0,0 @@ -use basic_fail::add; - -fn main() { - add("42", 3); - //~^ ERROR: miesmätsched types - add("42", 3); - //~^ ERROR: miesmätsched types -} diff --git a/tests/integrations/basic-fail/tests/actual_tests/diag_not_found_multiple.rs b/tests/integrations/basic-fail/tests/actual_tests/diag_not_found_multiple.rs new file mode 100644 index 00000000..75e76edb --- /dev/null +++ b/tests/integrations/basic-fail/tests/actual_tests/diag_not_found_multiple.rs @@ -0,0 +1,18 @@ +pub fn add(left: usize, right: usize) -> usize { + left + right +} + +fn main() { + // NOTE: add this so that we don't need `check-pass` (which seems to remove the note about + // missed diagnostics) but still get more than 1 missed diagnostics + add("42", 3); + //~^ E0308 + + // NOTE: apparently the "there were n missed diagnostics" message only fires when there are + // multiple missed diagnostics on the same line. We couldn't use `add("42", "3")` because that + // results in _one_ "arguments to this function are incorrect" diagnostic, not two separate ones. + #[rustfmt::skip] + { + add("42", 3); add("42", 3); + }; +} diff --git a/tests/integrations/basic-fail/tests/actual_tests/diag_not_found_multiple.stderr b/tests/integrations/basic-fail/tests/actual_tests/diag_not_found_multiple.stderr new file mode 100644 index 00000000..8d389c46 --- /dev/null +++ b/tests/integrations/basic-fail/tests/actual_tests/diag_not_found_multiple.stderr @@ -0,0 +1,45 @@ +error[E0308]: mismatched types + --> tests/actual_tests/diag_not_found_multiple.rs:8:9 + | +8 | add("42", 3); + | --- ^^^^ expected `usize`, found `&str` + | | + | arguments to this function are incorrect + | +note: function defined here + --> tests/actual_tests/diag_not_found_multiple.rs:1:8 + | +1 | pub fn add(left: usize, right: usize) -> usize { + | ^^^ ----------- + +error[E0308]: mismatched types + --> tests/actual_tests/diag_not_found_multiple.rs:16:13 + | +16 | add("42", 3); add("42", 3); + | --- ^^^^ expected `usize`, found `&str` + | | + | arguments to this function are incorrect + | +note: function defined here + --> tests/actual_tests/diag_not_found_multiple.rs:1:8 + | +1 | pub fn add(left: usize, right: usize) -> usize { + | ^^^ ----------- + +error[E0308]: mismatched types + --> tests/actual_tests/diag_not_found_multiple.rs:16:27 + | +16 | add("42", 3); add("42", 3); + | --- ^^^^ expected `usize`, found `&str` + | | + | arguments to this function are incorrect + | +note: function defined here + --> tests/actual_tests/diag_not_found_multiple.rs:1:8 + | +1 | pub fn add(left: usize, right: usize) -> usize { + | ^^^ ----------- + +error: aborting due to 3 previous errors + +For more information about this error, try `rustc --explain E0308`. diff --git a/tests/integrations/basic-fail/tests/actual_tests/diag_not_found_one.rs b/tests/integrations/basic-fail/tests/actual_tests/diag_not_found_one.rs new file mode 100644 index 00000000..a15fe924 --- /dev/null +++ b/tests/integrations/basic-fail/tests/actual_tests/diag_not_found_one.rs @@ -0,0 +1,10 @@ +pub fn add(left: usize, right: usize) -> usize { + left + right +} + +fn main() { + add("42", 3); + //~^ E0308 + + add("42", 3); +} diff --git a/tests/integrations/basic-fail/tests/actual_tests/bad_pattern_multiple.stderr b/tests/integrations/basic-fail/tests/actual_tests/diag_not_found_one.stderr similarity index 63% rename from tests/integrations/basic-fail/tests/actual_tests/bad_pattern_multiple.stderr rename to tests/integrations/basic-fail/tests/actual_tests/diag_not_found_one.stderr index 260eefb6..4a871390 100644 --- a/tests/integrations/basic-fail/tests/actual_tests/bad_pattern_multiple.stderr +++ b/tests/integrations/basic-fail/tests/actual_tests/diag_not_found_one.stderr @@ -1,31 +1,31 @@ error[E0308]: mismatched types - --> tests/actual_tests/bad_pattern_multiple.rs:4:9 + --> tests/actual_tests/diag_not_found_one.rs:6:9 | -4 | add("42", 3); +6 | add("42", 3); | --- ^^^^ expected `usize`, found `&str` | | | arguments to this function are incorrect | note: function defined here - --> $DIR/tests/integrations/basic-fail/src/lib.rs:1:8 + --> tests/actual_tests/diag_not_found_one.rs:1:8 | 1 | pub fn add(left: usize, right: usize) -> usize { - | ^^^ + | ^^^ ----------- error[E0308]: mismatched types - --> tests/actual_tests/bad_pattern_multiple.rs:6:9 + --> tests/actual_tests/diag_not_found_one.rs:9:9 | -6 | add("42", 3); +9 | add("42", 3); | --- ^^^^ expected `usize`, found `&str` | | | arguments to this function are incorrect | note: function defined here - --> $DIR/tests/integrations/basic-fail/src/lib.rs:LL:CC + --> tests/actual_tests/diag_not_found_one.rs:1:8 | 1 | pub fn add(left: usize, right: usize) -> usize { - | ^^^ + | ^^^ ----------- - error: aborting due to 2 previous errors +error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0308`.