diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2018-05-22 19:27:41 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2018-05-22 21:09:57 -0700 |
| commit | b2562fbcbaaafdb06ed343c7473db769a20afd89 (patch) | |
| tree | 09cac305caa20d637c962056f60e682d6ec917db /src/test | |
| parent | 71e87be381bd6020645d925c579fa7367167d3d8 (diff) | |
| download | rust-b2562fbcbaaafdb06ed343c7473db769a20afd89.tar.gz rust-b2562fbcbaaafdb06ed343c7473db769a20afd89.zip | |
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.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/compile-fail/issue-1900.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0131.stderr | 4 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0646.stderr | 6 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0647.stderr | 10 | ||||
| -rw-r--r-- | src/test/ui/issue-50714-1.stderr | 10 | ||||
| -rw-r--r-- | src/test/ui/issue-50714.stderr | 6 |
6 files changed, 17 insertions, 21 deletions
diff --git a/src/test/compile-fail/issue-1900.rs b/src/test/compile-fail/issue-1900.rs index ae46ab8116f..c7564a9355b 100644 --- a/src/test/compile-fail/issue-1900.rs +++ b/src/test/compile-fail/issue-1900.rs @@ -8,5 +8,5 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// error-pattern: main function is not allowed to have type parameters +// error-pattern: `main` function is not allowed to have type parameters fn main<T>() { } diff --git a/src/test/ui/error-codes/E0131.stderr b/src/test/ui/error-codes/E0131.stderr index 3774e21c214..ba9355763f6 100644 --- a/src/test/ui/error-codes/E0131.stderr +++ b/src/test/ui/error-codes/E0131.stderr @@ -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 diff --git a/src/test/ui/error-codes/E0646.stderr b/src/test/ui/error-codes/E0646.stderr index 96da22a643c..7b2de775a10 100644 --- a/src/test/ui/error-codes/E0646.stderr +++ b/src/test/ui/error-codes/E0646.stderr @@ -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 diff --git a/src/test/ui/error-codes/E0647.stderr b/src/test/ui/error-codes/E0647.stderr index f02407dcea6..afd37a7edf4 100644 --- a/src/test/ui/error-codes/E0647.stderr +++ b/src/test/ui/error-codes/E0647.stderr @@ -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 diff --git a/src/test/ui/issue-50714-1.stderr b/src/test/ui/issue-50714-1.stderr index b93183d2f24..5c92516cbc5 100644 --- a/src/test/ui/issue-50714-1.stderr +++ b/src/test/ui/issue-50714-1.stderr @@ -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 diff --git a/src/test/ui/issue-50714.stderr b/src/test/ui/issue-50714.stderr index 8cdcfe4abe2..e2c99980e1b 100644 --- a/src/test/ui/issue-50714.stderr +++ b/src/test/ui/issue-50714.stderr @@ -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 |
