Tweak main type arguments and where clause spans
Tweak the spans for error when finding type arguments or where clauses in main and start functions.
This commit is contained in:
parent
71e87be381
commit
b2562fbcba
8 changed files with 55 additions and 37 deletions
|
|
@ -1,8 +1,8 @@
|
|||
error[E0131]: main function is not allowed to have type parameters
|
||||
error[E0131]: `main` function is not allowed to have type parameters
|
||||
--> $DIR/E0131.rs:11:8
|
||||
|
|
||||
LL | fn main<T>() {
|
||||
| ^^^ main cannot have type parameters
|
||||
| ^^^ `main` cannot have type parameters
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
error[E0646]: main function is not allowed to have a where clause
|
||||
--> $DIR/E0646.rs:11:1
|
||||
error[E0646]: `main` function is not allowed to have a `where` clause
|
||||
--> $DIR/E0646.rs:11:17
|
||||
|
|
||||
LL | fn main() where (): Copy {} //~ ERROR [E0646]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^ `main` cannot have a `where` clause
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
error[E0647]: start function is not allowed to have a where clause
|
||||
--> $DIR/E0647.rs:17:1
|
||||
error[E0647]: start function is not allowed to have a `where` clause
|
||||
--> $DIR/E0647.rs:17:56
|
||||
|
|
||||
LL | / fn start(_: isize, _: *const *const u8) -> isize where (): Copy { //~ ERROR [E0647]
|
||||
LL | | 0
|
||||
LL | | }
|
||||
| |_^
|
||||
LL | fn start(_: isize, _: *const *const u8) -> isize where (): Copy { //~ ERROR [E0647]
|
||||
| ^^^^^^^^ start function cannot have a `where` clause
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
error[E0647]: start function is not allowed to have a where clause
|
||||
--> $DIR/issue-50714-1.rs:19:1
|
||||
error[E0647]: start function is not allowed to have a `where` clause
|
||||
--> $DIR/issue-50714-1.rs:19:56
|
||||
|
|
||||
LL | / fn start(_: isize, _: *const *const u8) -> isize where fn(&()): Eq { //~ ERROR [E0647]
|
||||
LL | | 0
|
||||
LL | | }
|
||||
| |_^
|
||||
LL | fn start(_: isize, _: *const *const u8) -> isize where fn(&()): Eq { //~ ERROR [E0647]
|
||||
| ^^^^^^^^^^^ start function cannot have a `where` clause
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
error[E0646]: main function is not allowed to have a where clause
|
||||
--> $DIR/issue-50714.rs:13:1
|
||||
error[E0646]: `main` function is not allowed to have a `where` clause
|
||||
--> $DIR/issue-50714.rs:13:17
|
||||
|
|
||||
LL | fn main() where fn(&()): Eq {} //~ ERROR [E0646]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^^^ `main` cannot have a `where` clause
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue