forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
weak lang items are not allowed to be #[track_caller]
- Loading branch information
Showing
7 changed files
with
70 additions
and
7 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
4 changes: 2 additions & 2 deletions
4
tests/ui/panic-handler/panic-handler-with-target-feature.stderr
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,11 +1,11 @@ | ||
error: `panic_impl` language item function is not allowed to have `#[target_feature]` | ||
error: `#[panic_handler]` function is not allowed to have `#[target_feature]` | ||
--> $DIR/panic-handler-with-target-feature.rs:11:1 | ||
| | ||
LL | #[target_feature(enable = "avx2")] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
LL | | ||
LL | fn panic(info: &PanicInfo) -> ! { | ||
| ------------------------------- `panic_impl` language item function is not allowed to have `#[target_feature]` | ||
| ------------------------------- `#[panic_handler]` function is not allowed to have `#[target_feature]` | ||
|
||
error: aborting due to 1 previous error | ||
|
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 @@ | ||
//@ compile-flags:-C panic=abort | ||
//@ only-x86_64 | ||
|
||
#![no_std] | ||
#![no_main] | ||
|
||
use core::panic::PanicInfo; | ||
|
||
#[panic_handler] | ||
#[track_caller] | ||
//~^ ERROR `#[panic_handler]` function is not allowed to have `#[track_caller]` | ||
fn panic(info: &PanicInfo) -> ! { | ||
unimplemented!(); | ||
} |
11 changes: 11 additions & 0 deletions
11
tests/ui/panic-handler/panic-handler-with-track-caller.stderr
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 @@ | ||
error: `#[panic_handler]` function is not allowed to have `#[track_caller]` | ||
--> $DIR/panic-handler-with-track-caller.rs:10:1 | ||
| | ||
LL | #[track_caller] | ||
| ^^^^^^^^^^^^^^^ | ||
LL | | ||
LL | fn panic(info: &PanicInfo) -> ! { | ||
| ------------------------------- `#[panic_handler]` function is not allowed to have `#[target_feature]` | ||
|
||
error: aborting due to 1 previous error | ||
|