-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #123397 - krtab:foreign_fn_qualif_diag, r=petrochenkov
Fix diagnostic for qualifier in extern block Closes: #123306
- Loading branch information
Showing
10 changed files
with
91 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,28 @@ | ||
error: functions in `extern` blocks cannot have qualifiers | ||
--> $DIR/no-const-fn-in-extern-block.rs:2:14 | ||
--> $DIR/no-const-fn-in-extern-block.rs:2:5 | ||
| | ||
LL | extern "C" { | ||
| ---------- in this `extern` block | ||
LL | const fn foo(); | ||
| ^^^ | ||
| | ||
help: remove the qualifiers | ||
| | ||
LL | fn foo(); | ||
| ~~ | ||
| ^^^^^ help: remove this qualifier | ||
|
||
error: functions in `extern` blocks cannot have qualifiers | ||
--> $DIR/no-const-fn-in-extern-block.rs:4:21 | ||
--> $DIR/no-const-fn-in-extern-block.rs:4:11 | ||
| | ||
LL | extern "C" { | ||
| ---------- in this `extern` block | ||
... | ||
LL | const unsafe fn bar(); | ||
| ^^^ | ||
| | ||
help: remove the qualifiers | ||
| ^^^^^^ help: remove this qualifier | ||
|
||
error: functions in `extern` blocks cannot have qualifiers | ||
--> $DIR/no-const-fn-in-extern-block.rs:4:5 | ||
| | ||
LL | fn bar(); | ||
| ~~ | ||
LL | extern "C" { | ||
| ---------- in this `extern` block | ||
... | ||
LL | const unsafe fn bar(); | ||
| ^^^^^ help: remove this qualifier | ||
|
||
error: aborting due to 2 previous errors | ||
error: aborting due to 3 previous errors | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters