-
Notifications
You must be signed in to change notification settings - Fork 13k
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 #69154 - JohnTitor:fix-macro-ices, r=petrochenkov
Avoid calling `fn_sig` on closures Fixes #68060 r? @petrochenkov
- Loading branch information
Showing
3 changed files
with
42 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// build-fail | ||
|
||
#![feature(track_caller)] | ||
|
||
fn main() { | ||
(0..) | ||
.map( | ||
#[target_feature(enable = "")] | ||
//~^ ERROR: the feature named `` is not valid for this target | ||
//~| ERROR: `#[target_feature(..)]` can only be applied to `unsafe` functions | ||
#[track_caller] | ||
//~^ ERROR: `#[track_caller]` requires Rust ABI | ||
|_| (), | ||
) | ||
.next(); | ||
} |
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,24 @@ | ||
error: `#[target_feature(..)]` can only be applied to `unsafe` functions | ||
--> $DIR/issue-68060.rs:8:13 | ||
| | ||
LL | #[target_feature(enable = "")] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can only be applied to `unsafe` functions | ||
... | ||
LL | |_| (), | ||
| ------ not an `unsafe` function | ||
|
||
error: the feature named `` is not valid for this target | ||
--> $DIR/issue-68060.rs:8:30 | ||
| | ||
LL | #[target_feature(enable = "")] | ||
| ^^^^^^^^^^^ `` is not valid for this target | ||
|
||
error[E0737]: `#[track_caller]` requires Rust ABI | ||
--> $DIR/issue-68060.rs:11:13 | ||
| | ||
LL | #[track_caller] | ||
| ^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 3 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0737`. |