-
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.
Auto merge of #117978 - petrochenkov:deleggate, r=TaKO8Ki,joshtriplett
Add an experimental feature gate for function delegation In accordance with the [process](https://github.com/rust-lang/lang-team/blob/master/src/how_to/experiment.md). Detailed description of the feature can be found in the RFC repo - rust-lang/rfcs#3530. TODO: find a lang team liaison - https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/fn.20delegation.20liaison/near/402506959.
- Loading branch information
Showing
4 changed files
with
19 additions
and
0 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 |
---|---|---|
|
@@ -787,6 +787,7 @@ symbols! { | |
fmt, | ||
fmul_fast, | ||
fn_align, | ||
fn_delegation, | ||
fn_must_use, | ||
fn_mut, | ||
fn_once, | ||
|
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,3 @@ | ||
todo!(); //~ ERROR | ||
|
||
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,13 @@ | ||
error: expected one of `!` or `::`, found `(` | ||
--> $DIR/feature-gate-fn_delegation.rs:1:1 | ||
| | ||
LL | todo!(); | ||
| ^^^^^^^ | ||
| | | ||
| expected one of `!` or `::` | ||
| in this macro invocation | ||
| | ||
= note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error: aborting due to previous error | ||
|