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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions tests/ui/annotate-snippet/missing-type.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//@ compile-flags: --error-format human-annotate-rs -Z unstable-options
//@ edition: 2015

pub fn main() {
let x: Iter;
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/annotate-snippet/missing-type.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0412]: cannot find type `Iter` in this scope
--> $DIR/missing-type.rs:4:12
--> $DIR/missing-type.rs:5:12
|
LL | let x: Iter;
| ^^^^ not found in this scope
Expand Down
1 change: 1 addition & 0 deletions tests/ui/argument-suggestions/extra_arguments.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ edition:2015..2021
fn empty() {}
fn one_arg<T>(_a: T) {}
fn two_arg_same(_a: i32, _b: i32) {}
Expand Down
88 changes: 44 additions & 44 deletions tests/ui/argument-suggestions/extra_arguments.stderr
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error[E0061]: this function takes 0 arguments but 1 argument was supplied
--> $DIR/extra_arguments.rs:19:3
--> $DIR/extra_arguments.rs:20:3
|
LL | empty("");
| ^^^^^ -- unexpected argument of type `&'static str`
|
note: function defined here
--> $DIR/extra_arguments.rs:1:4
--> $DIR/extra_arguments.rs:2:4
|
LL | fn empty() {}
| ^^^^^
Expand All @@ -16,15 +16,15 @@ LL + empty();
|

error[E0061]: this function takes 0 arguments but 2 arguments were supplied
--> $DIR/extra_arguments.rs:20:3
--> $DIR/extra_arguments.rs:21:3
|
LL | empty(1, 1);
| ^^^^^ - - unexpected argument #2 of type `{integer}`
| |
| unexpected argument #1 of type `{integer}`
|
note: function defined here
--> $DIR/extra_arguments.rs:1:4
--> $DIR/extra_arguments.rs:2:4
|
LL | fn empty() {}
| ^^^^^
Expand All @@ -35,13 +35,13 @@ LL + empty();
|

error[E0061]: this function takes 1 argument but 2 arguments were supplied
--> $DIR/extra_arguments.rs:22:3
--> $DIR/extra_arguments.rs:23:3
|
LL | one_arg(1, 1);
| ^^^^^^^ - unexpected argument #2 of type `{integer}`
|
note: function defined here
--> $DIR/extra_arguments.rs:2:4
--> $DIR/extra_arguments.rs:3:4
|
LL | fn one_arg<T>(_a: T) {}
| ^^^^^^^
Expand All @@ -52,13 +52,13 @@ LL + one_arg(1);
|

error[E0061]: this function takes 1 argument but 2 arguments were supplied
--> $DIR/extra_arguments.rs:23:3
--> $DIR/extra_arguments.rs:24:3
|
LL | one_arg(1, "");
| ^^^^^^^ -- unexpected argument #2 of type `&'static str`
|
note: function defined here
--> $DIR/extra_arguments.rs:2:4
--> $DIR/extra_arguments.rs:3:4
|
LL | fn one_arg<T>(_a: T) {}
| ^^^^^^^
Expand All @@ -69,15 +69,15 @@ LL + one_arg(1);
|

error[E0061]: this function takes 1 argument but 3 arguments were supplied
--> $DIR/extra_arguments.rs:24:3
--> $DIR/extra_arguments.rs:25:3
|
LL | one_arg(1, "", 1.0);
| ^^^^^^^ -- --- unexpected argument #3 of type `{float}`
| |
| unexpected argument #2 of type `&'static str`
|
note: function defined here
--> $DIR/extra_arguments.rs:2:4
--> $DIR/extra_arguments.rs:3:4
|
LL | fn one_arg<T>(_a: T) {}
| ^^^^^^^
Expand All @@ -88,13 +88,13 @@ LL + one_arg(1);
|

error[E0061]: this function takes 2 arguments but 3 arguments were supplied
--> $DIR/extra_arguments.rs:26:3
--> $DIR/extra_arguments.rs:27:3
|
LL | two_arg_same(1, 1, 1);
| ^^^^^^^^^^^^ - unexpected argument #3 of type `{integer}`
|
note: function defined here
--> $DIR/extra_arguments.rs:3:4
--> $DIR/extra_arguments.rs:4:4
|
LL | fn two_arg_same(_a: i32, _b: i32) {}
| ^^^^^^^^^^^^
Expand All @@ -105,13 +105,13 @@ LL + two_arg_same(1, 1);
|

error[E0061]: this function takes 2 arguments but 3 arguments were supplied
--> $DIR/extra_arguments.rs:27:3
--> $DIR/extra_arguments.rs:28:3
|
LL | two_arg_same(1, 1, 1.0);
| ^^^^^^^^^^^^ --- unexpected argument #3 of type `{float}`
|
note: function defined here
--> $DIR/extra_arguments.rs:3:4
--> $DIR/extra_arguments.rs:4:4
|
LL | fn two_arg_same(_a: i32, _b: i32) {}
| ^^^^^^^^^^^^
Expand All @@ -122,13 +122,13 @@ LL + two_arg_same(1, 1);
|

error[E0061]: this function takes 2 arguments but 3 arguments were supplied
--> $DIR/extra_arguments.rs:29:3
--> $DIR/extra_arguments.rs:30:3
|
LL | two_arg_diff(1, 1, "");
| ^^^^^^^^^^^^ - unexpected argument #2 of type `{integer}`
|
note: function defined here
--> $DIR/extra_arguments.rs:4:4
--> $DIR/extra_arguments.rs:5:4
|
LL | fn two_arg_diff(_a: i32, _b: &str) {}
| ^^^^^^^^^^^^
Expand All @@ -139,13 +139,13 @@ LL + two_arg_diff(1, "");
|

error[E0061]: this function takes 2 arguments but 3 arguments were supplied
--> $DIR/extra_arguments.rs:30:3
--> $DIR/extra_arguments.rs:31:3
|
LL | two_arg_diff(1, "", "");
| ^^^^^^^^^^^^ -- unexpected argument #3 of type `&'static str`
|
note: function defined here
--> $DIR/extra_arguments.rs:4:4
--> $DIR/extra_arguments.rs:5:4
|
LL | fn two_arg_diff(_a: i32, _b: &str) {}
| ^^^^^^^^^^^^
Expand All @@ -156,15 +156,15 @@ LL + two_arg_diff(1, "");
|

error[E0061]: this function takes 2 arguments but 4 arguments were supplied
--> $DIR/extra_arguments.rs:31:3
--> $DIR/extra_arguments.rs:32:3
|
LL | two_arg_diff(1, 1, "", "");
| ^^^^^^^^^^^^ - -- unexpected argument #4 of type `&'static str`
| |
| unexpected argument #2 of type `{integer}`
|
note: function defined here
--> $DIR/extra_arguments.rs:4:4
--> $DIR/extra_arguments.rs:5:4
|
LL | fn two_arg_diff(_a: i32, _b: &str) {}
| ^^^^^^^^^^^^
Expand All @@ -175,15 +175,15 @@ LL + two_arg_diff(1, "");
|

error[E0061]: this function takes 2 arguments but 4 arguments were supplied
--> $DIR/extra_arguments.rs:32:3
--> $DIR/extra_arguments.rs:33:3
|
LL | two_arg_diff(1, "", 1, "");
| ^^^^^^^^^^^^ - -- unexpected argument #4 of type `&'static str`
| |
| unexpected argument #3 of type `{integer}`
|
note: function defined here
--> $DIR/extra_arguments.rs:4:4
--> $DIR/extra_arguments.rs:5:4
|
LL | fn two_arg_diff(_a: i32, _b: &str) {}
| ^^^^^^^^^^^^
Expand All @@ -194,13 +194,13 @@ LL + two_arg_diff(1, "");
|

error[E0061]: this function takes 2 arguments but 3 arguments were supplied
--> $DIR/extra_arguments.rs:35:3
--> $DIR/extra_arguments.rs:36:3
|
LL | two_arg_same(1, 1, "");
| ^^^^^^^^^^^^ -- unexpected argument #3 of type `&'static str`
|
note: function defined here
--> $DIR/extra_arguments.rs:3:4
--> $DIR/extra_arguments.rs:4:4
|
LL | fn two_arg_same(_a: i32, _b: i32) {}
| ^^^^^^^^^^^^
Expand All @@ -211,13 +211,13 @@ LL + two_arg_same(1, 1);
|

error[E0061]: this function takes 2 arguments but 3 arguments were supplied
--> $DIR/extra_arguments.rs:36:3
--> $DIR/extra_arguments.rs:37:3
|
LL | two_arg_diff(1, 1, "");
| ^^^^^^^^^^^^ - unexpected argument #2 of type `{integer}`
|
note: function defined here
--> $DIR/extra_arguments.rs:4:4
--> $DIR/extra_arguments.rs:5:4
|
LL | fn two_arg_diff(_a: i32, _b: &str) {}
| ^^^^^^^^^^^^
Expand All @@ -228,7 +228,7 @@ LL + two_arg_diff(1, "");
|

error[E0061]: this function takes 2 arguments but 3 arguments were supplied
--> $DIR/extra_arguments.rs:37:3
--> $DIR/extra_arguments.rs:38:3
|
LL | two_arg_same(
| ^^^^^^^^^^^^
Expand All @@ -237,7 +237,7 @@ LL | ""
| -- unexpected argument #3 of type `&'static str`
|
note: function defined here
--> $DIR/extra_arguments.rs:3:4
--> $DIR/extra_arguments.rs:4:4
|
LL | fn two_arg_same(_a: i32, _b: i32) {}
| ^^^^^^^^^^^^
Expand All @@ -249,7 +249,7 @@ LL + 1
|

error[E0061]: this function takes 2 arguments but 3 arguments were supplied
--> $DIR/extra_arguments.rs:43:3
--> $DIR/extra_arguments.rs:44:3
|
LL | two_arg_diff(
| ^^^^^^^^^^^^
Expand All @@ -258,7 +258,7 @@ LL | 1,
| - unexpected argument #2 of type `{integer}`
|
note: function defined here
--> $DIR/extra_arguments.rs:4:4
--> $DIR/extra_arguments.rs:5:4
|
LL | fn two_arg_diff(_a: i32, _b: &str) {}
| ^^^^^^^^^^^^
Expand All @@ -268,7 +268,7 @@ LL - 1,
|

error[E0061]: this function takes 0 arguments but 2 arguments were supplied
--> $DIR/extra_arguments.rs:8:9
--> $DIR/extra_arguments.rs:9:9
|
LL | empty($x, 1);
| ^^^^^ - unexpected argument #2 of type `{integer}`
Expand All @@ -280,14 +280,14 @@ LL | foo!(1, ~);
| in this macro invocation
|
note: function defined here
--> $DIR/extra_arguments.rs:1:4
--> $DIR/extra_arguments.rs:2:4
|
LL | fn empty() {}
| ^^^^^
= note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0061]: this function takes 0 arguments but 2 arguments were supplied
--> $DIR/extra_arguments.rs:14:9
--> $DIR/extra_arguments.rs:15:9
|
LL | empty(1, $y);
| ^^^^^ - unexpected argument #1 of type `{integer}`
Expand All @@ -299,14 +299,14 @@ LL | foo!(~, 1);
| in this macro invocation
|
note: function defined here
--> $DIR/extra_arguments.rs:1:4
--> $DIR/extra_arguments.rs:2:4
|
LL | fn empty() {}
| ^^^^^
= note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0061]: this function takes 0 arguments but 2 arguments were supplied
--> $DIR/extra_arguments.rs:11:9
--> $DIR/extra_arguments.rs:12:9
|
LL | empty($x, $y);
| ^^^^^
Expand All @@ -319,20 +319,20 @@ LL | foo!(1, 1);
| in this macro invocation
|
note: function defined here
--> $DIR/extra_arguments.rs:1:4
--> $DIR/extra_arguments.rs:2:4
|
LL | fn empty() {}
| ^^^^^
= note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0061]: this function takes 1 argument but 2 arguments were supplied
--> $DIR/extra_arguments.rs:53:3
--> $DIR/extra_arguments.rs:54:3
|
LL | one_arg(1, panic!());
| ^^^^^^^ -------- unexpected argument #2
|
note: function defined here
--> $DIR/extra_arguments.rs:2:4
--> $DIR/extra_arguments.rs:3:4
|
LL | fn one_arg<T>(_a: T) {}
| ^^^^^^^
Expand All @@ -343,13 +343,13 @@ LL + one_arg(1);
|

error[E0061]: this function takes 1 argument but 2 arguments were supplied
--> $DIR/extra_arguments.rs:54:3
--> $DIR/extra_arguments.rs:55:3
|
LL | one_arg(panic!(), 1);
| ^^^^^^^ - unexpected argument #2 of type `{integer}`
|
note: function defined here
--> $DIR/extra_arguments.rs:2:4
--> $DIR/extra_arguments.rs:3:4
|
LL | fn one_arg<T>(_a: T) {}
| ^^^^^^^
Expand All @@ -360,13 +360,13 @@ LL + one_arg(panic!());
|

error[E0061]: this function takes 1 argument but 2 arguments were supplied
--> $DIR/extra_arguments.rs:55:3
--> $DIR/extra_arguments.rs:56:3
|
LL | one_arg(stringify!($e), 1);
| ^^^^^^^ - unexpected argument #2 of type `{integer}`
|
note: function defined here
--> $DIR/extra_arguments.rs:2:4
--> $DIR/extra_arguments.rs:3:4
|
LL | fn one_arg<T>(_a: T) {}
| ^^^^^^^
Expand All @@ -377,13 +377,13 @@ LL + one_arg(stringify!($e));
|

error[E0061]: this function takes 1 argument but 2 arguments were supplied
--> $DIR/extra_arguments.rs:60:3
--> $DIR/extra_arguments.rs:61:3
|
LL | one_arg(for _ in 1.. {}, 1);
| ^^^^^^^ - unexpected argument #2 of type `{integer}`
|
note: function defined here
--> $DIR/extra_arguments.rs:2:4
--> $DIR/extra_arguments.rs:3:4
|
LL | fn one_arg<T>(_a: T) {}
| ^^^^^^^
Expand Down
1 change: 1 addition & 0 deletions tests/ui/asm/naked-invalid-attr.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ edition:2015
// Checks that the #[unsafe(naked)] attribute can be placed on function definitions only.
//
//@ needs-asm-support
Expand Down
Loading
Loading