about summary refs log tree commit diff
diff options
context:
space:
mode:
authorThePuzzlemaker <tpzker@thepuzzlemaker.info>2020-11-15 15:34:51 -0600
committerThePuzzlemaker <tpzker@thepuzzlemaker.info>2020-11-17 07:57:58 -0600
commitb8ed466b240887c871909f5e30ea3662a356d19a (patch)
tree9317fada4735f8eb07f825794d46f7d9bca5eb8d
parent92aa0e6295c39db945966d080236931396e59939 (diff)
downloadrust-b8ed466b240887c871909f5e30ea3662a356d19a.tar.gz
rust-b8ed466b240887c871909f5e30ea3662a356d19a.zip
Fix ui tests for `fn`s with qualifiers in `extern` blocks
-rw-r--r--src/test/ui/parser/fn-header-semantic-fail.stderr45
-rw-r--r--src/test/ui/parser/no-const-fn-in-extern-block.stderr18
2 files changed, 42 insertions, 21 deletions
diff --git a/src/test/ui/parser/fn-header-semantic-fail.stderr b/src/test/ui/parser/fn-header-semantic-fail.stderr
index 4193b3ee695..2f11f95bf4a 100644
--- a/src/test/ui/parser/fn-header-semantic-fail.stderr
+++ b/src/test/ui/parser/fn-header-semantic-fail.stderr
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
diff --git a/src/test/ui/parser/no-const-fn-in-extern-block.stderr b/src/test/ui/parser/no-const-fn-in-extern-block.stderr
index de653987e40..af92f2d94f2 100644
--- a/src/test/ui/parser/no-const-fn-in-extern-block.stderr
+++ b/src/test/ui/parser/no-const-fn-in-extern-block.stderr
@@ -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
@@ -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