-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deny async fn
in 2015 edition
#58678
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @varkor (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Overall, this looks good! Just a couple of minor comments. Also, merge commits are avoided, so if you could rebase your changes instead, that would be great! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last stylistic comment, then everything looks good!
If you could squash your changes into a single commit to keep the history cleaner, I'll approve as soon as Travis is happy!
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
I've added the extra tests, so this definitely also solves the cases specifically mentioned in #51933. |
Fix style issues and update diagnostic messages Update src/librustc_passes/diagnostics.rs Co-Authored-By: doctorn <me@nathancorbyn.com> Deny nested `async fn` in Rust 2015 edition Deny nested `async fn` in Rust 2015 edition Deny nested `async fn` in Rust 2015 edition
Thanks, this looks great! @bors r+ |
📌 Commit 8300f51 has been approved by |
…n, r=varkor Deny `async fn` in 2015 edition This commit prevents code using `async fn` from being compiled in Rust 2015 edition. Compiling code of the form: ```rust async fn foo() {} ``` Will now result in the error: ``` error[E0670]: `async fn` is not permitted in the 2015 edition --> async.rs:1:1 | 1 | async fn foo() {} | ^^^^^ error: aborting due to error For more information about an error, try `rustc --explain E0670`. ``` This resolves rust-lang#58652 and also resolves rust-lang#53714. r? @varkor
…n, r=varkor Deny `async fn` in 2015 edition This commit prevents code using `async fn` from being compiled in Rust 2015 edition. Compiling code of the form: ```rust async fn foo() {} ``` Will now result in the error: ``` error[E0670]: `async fn` is not permitted in the 2015 edition --> async.rs:1:1 | 1 | async fn foo() {} | ^^^^^ error: aborting due to error For more information about an error, try `rustc --explain E0670`. ``` This resolves rust-lang#58652 and also resolves rust-lang#53714. r? @varkor
…n, r=varkor Deny `async fn` in 2015 edition This commit prevents code using `async fn` from being compiled in Rust 2015 edition. Compiling code of the form: ```rust async fn foo() {} ``` Will now result in the error: ``` error[E0670]: `async fn` is not permitted in the 2015 edition --> async.rs:1:1 | 1 | async fn foo() {} | ^^^^^ error: aborting due to error For more information about an error, try `rustc --explain E0670`. ``` This resolves rust-lang#58652 and also resolves rust-lang#53714. r? @varkor
…n, r=varkor Deny `async fn` in 2015 edition This commit prevents code using `async fn` from being compiled in Rust 2015 edition. Compiling code of the form: ```rust async fn foo() {} ``` Will now result in the error: ``` error[E0670]: `async fn` is not permitted in the 2015 edition --> async.rs:1:1 | 1 | async fn foo() {} | ^^^^^ error: aborting due to error For more information about an error, try `rustc --explain E0670`. ``` This resolves rust-lang#58652 and also resolves rust-lang#53714. r? @varkor
…n, r=varkor Deny `async fn` in 2015 edition This commit prevents code using `async fn` from being compiled in Rust 2015 edition. Compiling code of the form: ```rust async fn foo() {} ``` Will now result in the error: ``` error[E0670]: `async fn` is not permitted in the 2015 edition --> async.rs:1:1 | 1 | async fn foo() {} | ^^^^^ error: aborting due to error For more information about an error, try `rustc --explain E0670`. ``` This resolves rust-lang#58652 and also resolves rust-lang#53714. r? @varkor
Rollup of 14 pull requests Successful merges: - #58075 (Fix for issue #58050) - #58627 (rustdoc: move collapse and unindent docs passes earlier) - #58630 (Make `visit_clobber` panic-safe.) - #58678 (Deny `async fn` in 2015 edition) - #58680 (Fix an indexing error when using `x.py help`) - #58703 (Fix copy-pasted typo for read_string return value) - #58744 (Update dlmalloc to 0.1.3) - #58746 (std: docs: Disable running several Stdio doctests) - #58748 (update scoped_tls to 1.0) - #58749 (Reduce Repetitions of (n << amt) >> amt) - #58752 (Update string_cache_codegen to 0.4.2) - #58755 (Clarify `rotate_{left,right}` docs) - #58757 (Normalize the type Self resolves to in an impl) - #58761 (Add tracking issue for the unwind attribute) Failed merges: r? @ghost
This commit prevents code using
async fn
from being compiled in Rust 2015 edition.Compiling code of the form:
Will now result in the error:
This resolves #58652 and also resolves #53714.
r? @varkor