Skip to content

Commit

Permalink
Fix ui tests for fns with qualifiers in extern blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
ThePuzzlemaker committed Nov 17, 2020
1 parent 92aa0e6 commit b8ed466
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 21 deletions.
45 changes: 30 additions & 15 deletions src/test/ui/parser/fn-header-semantic-fail.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,12 @@ error: functions in `extern` blocks cannot have qualifiers
LL | extern {
| ------ in this `extern` block
LL | async fn fe1();
| ---------^^^
| |
| help: remove the qualifiers: `fn`
| ^^^
|
help: remove the qualifiers
|
LL | fn fe1();
| ^^

error: functions in `extern` blocks cannot have qualifiers
--> $DIR/fn-header-semantic-fail.rs:52:19
Expand All @@ -119,9 +122,12 @@ LL | extern {
| ------ in this `extern` block
LL | async fn fe1();
LL | unsafe fn fe2();
| ----------^^^
| |
| help: remove the qualifiers: `fn`
| ^^^
|
help: remove the qualifiers
|
LL | fn fe2();
| ^^

error: functions in `extern` blocks cannot have qualifiers
--> $DIR/fn-header-semantic-fail.rs:53:18
Expand All @@ -130,9 +136,12 @@ LL | extern {
| ------ in this `extern` block
...
LL | const fn fe3();
| ---------^^^
| |
| help: remove the qualifiers: `fn`
| ^^^
|
help: remove the qualifiers
|
LL | fn fe3();
| ^^

error: functions in `extern` blocks cannot have qualifiers
--> $DIR/fn-header-semantic-fail.rs:54:23
Expand All @@ -141,9 +150,12 @@ LL | extern {
| ------ in this `extern` block
...
LL | extern "C" fn fe4();
| --------------^^^
| |
| help: remove the qualifiers: `fn`
| ^^^
|
help: remove the qualifiers
|
LL | fn fe4();
| ^^

error: functions in `extern` blocks cannot have qualifiers
--> $DIR/fn-header-semantic-fail.rs:55:42
Expand All @@ -152,9 +164,12 @@ LL | extern {
| ------ in this `extern` block
...
LL | const async unsafe extern "C" fn fe5();
| ---------------------------------^^^
| |
| help: remove the qualifiers: `fn`
| ^^^
|
help: remove the qualifiers
|
LL | fn fe5();
| ^^

error: functions cannot be both `const` and `async`
--> $DIR/fn-header-semantic-fail.rs:55:9
Expand Down
18 changes: 12 additions & 6 deletions src/test/ui/parser/no-const-fn-in-extern-block.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ error: functions in `extern` blocks cannot have qualifiers
LL | extern {
| ------ in this `extern` block
LL | const fn foo();
| ---------^^^
| |
| help: remove the qualifiers: `fn`
| ^^^
|
help: remove the qualifiers
|
LL | fn foo();
| ^^

error: functions in `extern` blocks cannot have qualifiers
--> $DIR/no-const-fn-in-extern-block.rs:4:21
Expand All @@ -15,9 +18,12 @@ LL | extern {
| ------ in this `extern` block
...
LL | const unsafe fn bar();
| ----------------^^^
| |
| help: remove the qualifiers: `fn`
| ^^^
|
help: remove the qualifiers
|
LL | fn bar();
| ^^

error: aborting due to 2 previous errors

0 comments on commit b8ed466

Please sign in to comment.