forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
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 rust-lang#58762 - petrochenkov:unwind, r=Mark-Simulacrum
Mention `unwind(aborts)` in diagnostics for `#[unwind]` Simplify input validation for `#[unwind]`, add tests cc rust-lang#58760 r? @Mark-Simulacrum
- Loading branch information
Showing
7 changed files
with
74 additions
and
34 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#![feature(unwind_attributes)] | ||
|
||
#[unwind] | ||
//~^ ERROR attribute must be of the form | ||
extern "C" fn f1() {} | ||
|
||
#[unwind = ""] | ||
//~^ ERROR attribute must be of the form | ||
extern "C" fn f2() {} | ||
|
||
fn main() {} |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
error: attribute must be of the form `#[unwind(allowed|aborts)]` | ||
--> $DIR/malformed-unwind-1.rs:3:1 | ||
| | ||
LL | #[unwind] | ||
| ^^^^^^^^^ | ||
|
||
error: attribute must be of the form `#[unwind(allowed|aborts)]` | ||
--> $DIR/malformed-unwind-1.rs:7:1 | ||
| | ||
LL | #[unwind = ""] | ||
| ^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#![feature(unwind_attributes)] | ||
|
||
#[unwind(allowed, aborts)] | ||
//~^ ERROR malformed `#[unwind]` attribute | ||
extern "C" fn f1() {} | ||
|
||
#[unwind(unsupported)] | ||
//~^ ERROR malformed `#[unwind]` attribute | ||
extern "C" fn f2() {} | ||
|
||
fn main() {} |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
error[E0633]: malformed `#[unwind]` attribute | ||
--> $DIR/malformed-unwind-2.rs:3:1 | ||
| | ||
LL | #[unwind(allowed, aborts)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error[E0633]: malformed `#[unwind]` attribute | ||
--> $DIR/malformed-unwind-2.rs:7:1 | ||
| | ||
LL | #[unwind(unsupported)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0633`. |