Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
249 changes: 95 additions & 154 deletions tests/integrations/basic-fail/Cargo.stdout

Large diffs are not rendered by default.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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);
};
}
Original file line number Diff line number Diff line change
@@ -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`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
pub fn add(left: usize, right: usize) -> usize {
left + right
}

fn main() {
add("42", 3);
//~^ E0308

add("42", 3);
}
Original file line number Diff line number Diff line change
@@ -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`.