Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Consistently call editions "Rust 20xx" in messages.
- Loading branch information
Showing
8 changed files
with
31 additions
and
31 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 |
---|---|---|
@@ -1,38 +1,38 @@ | ||
// edition:2015 | ||
|
||
async fn foo() {} //~ ERROR `async fn` is not permitted in the 2015 edition | ||
async fn foo() {} //~ ERROR `async fn` is not permitted in Rust 2015 | ||
|
||
fn baz() { async fn foo() {} } //~ ERROR `async fn` is not permitted in the 2015 edition | ||
fn baz() { async fn foo() {} } //~ ERROR `async fn` is not permitted in Rust 2015 | ||
|
||
async fn async_baz() { //~ ERROR `async fn` is not permitted in the 2015 edition | ||
async fn bar() {} //~ ERROR `async fn` is not permitted in the 2015 edition | ||
async fn async_baz() { //~ ERROR `async fn` is not permitted in Rust 2015 | ||
async fn bar() {} //~ ERROR `async fn` is not permitted in Rust 2015 | ||
} | ||
|
||
struct Foo {} | ||
|
||
impl Foo { | ||
async fn foo() {} //~ ERROR `async fn` is not permitted in the 2015 edition | ||
async fn foo() {} //~ ERROR `async fn` is not permitted in Rust 2015 | ||
} | ||
|
||
trait Bar { | ||
async fn foo() {} //~ ERROR `async fn` is not permitted in the 2015 edition | ||
async fn foo() {} //~ ERROR `async fn` is not permitted in Rust 2015 | ||
//~^ ERROR functions in traits cannot be declared `async` | ||
} | ||
|
||
fn main() { | ||
macro_rules! accept_item { ($x:item) => {} } | ||
|
||
accept_item! { | ||
async fn foo() {} //~ ERROR `async fn` is not permitted in the 2015 edition | ||
async fn foo() {} //~ ERROR `async fn` is not permitted in Rust 2015 | ||
} | ||
|
||
accept_item! { | ||
impl Foo { | ||
async fn bar() {} //~ ERROR `async fn` is not permitted in the 2015 edition | ||
async fn bar() {} //~ ERROR `async fn` is not permitted in Rust 2015 | ||
} | ||
} | ||
|
||
let inside_closure = || { | ||
async fn bar() {} //~ ERROR `async fn` is not permitted in the 2015 edition | ||
async fn bar() {} //~ ERROR `async fn` is not permitted in Rust 2015 | ||
}; | ||
} |
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