Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
0cd8e0d0
R
Rust
项目概览
int
/
Rust
大约 1 年 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rust
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0cd8e0d0
编写于
9月 11, 2018
作者:
N
Niko Matsakis
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
we now successfully warn about `async` in macro invocations
上级
5adbdf82
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
26 addition
and
13 deletion
+26
-13
src/test/ui/rust-2018/async-ident.fixed
src/test/ui/rust-2018/async-ident.fixed
+3
-1
src/test/ui/rust-2018/async-ident.rs
src/test/ui/rust-2018/async-ident.rs
+2
-0
src/test/ui/rust-2018/async-ident.stderr
src/test/ui/rust-2018/async-ident.stderr
+21
-12
未找到文件。
src/test/ui/rust-2018/async-ident.fixed
浏览文件 @
0cd8e0d0
...
...
@@ -26,7 +26,9 @@ macro_rules! foo {
//~| WARN hard error in the 2018 edition
}
foo!(async);
foo!(r#async);
//~^ ERROR async
//~| WARN hard error in the 2018 edition
mod dont_lint_raw {
fn r#async() {}
...
...
src/test/ui/rust-2018/async-ident.rs
浏览文件 @
0cd8e0d0
...
...
@@ -27,6 +27,8 @@ fn async() {} //~ ERROR async
}
foo!
(
async
);
//~^ ERROR async
//~| WARN hard error in the 2018 edition
mod
dont_lint_raw
{
fn
r
#
async
()
{}
...
...
src/test/ui/rust-2018/async-ident.stderr
浏览文件 @
0cd8e0d0
...
...
@@ -31,7 +31,16 @@ LL | ($async:expr, async) => {};
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
error: `async` is a keyword in the 2018 edition
--> $DIR/async-ident.rs:36:11
--> $DIR/async-ident.rs:29:6
|
LL | foo!(async);
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#async`
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
error: `async` is a keyword in the 2018 edition
--> $DIR/async-ident.rs:38:11
|
LL | trait async {}
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#async`
...
...
@@ -40,7 +49,7 @@ LL | trait async {}
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
error: `async` is a keyword in the 2018 edition
--> $DIR/async-ident.rs:4
0
:10
--> $DIR/async-ident.rs:4
2
:10
|
LL | impl async for MyStruct {}
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#async`
...
...
@@ -49,7 +58,7 @@ LL | impl async for MyStruct {}
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
error: `async` is a keyword in the 2018 edition
--> $DIR/async-ident.rs:4
6
:12
--> $DIR/async-ident.rs:4
8
:12
|
LL | static async: u32 = 0;
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#async`
...
...
@@ -58,7 +67,7 @@ LL | static async: u32 = 0;
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
error: `async` is a keyword in the 2018 edition
--> $DIR/async-ident.rs:5
2
:11
--> $DIR/async-ident.rs:5
4
:11
|
LL | const async: u32 = 0;
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#async`
...
...
@@ -67,7 +76,7 @@ LL | const async: u32 = 0;
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
error: `async` is a keyword in the 2018 edition
--> $DIR/async-ident.rs:
58
:15
--> $DIR/async-ident.rs:
60
:15
|
LL | impl Foo { fn async() {} }
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#async`
...
...
@@ -76,7 +85,7 @@ LL | impl Foo { fn async() {} }
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
error: `async` is a keyword in the 2018 edition
--> $DIR/async-ident.rs:6
3
:12
--> $DIR/async-ident.rs:6
5
:12
|
LL | struct async {}
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#async`
...
...
@@ -85,7 +94,7 @@ LL | struct async {}
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
error: `async` is a keyword in the 2018 edition
--> $DIR/async-ident.rs:6
6
:9
--> $DIR/async-ident.rs:6
8
:9
|
LL | let async: async = async {};
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#async`
...
...
@@ -94,7 +103,7 @@ LL | let async: async = async {};
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
error: `async` is a keyword in the 2018 edition
--> $DIR/async-ident.rs:6
6
:16
--> $DIR/async-ident.rs:6
8
:16
|
LL | let async: async = async {};
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#async`
...
...
@@ -103,7 +112,7 @@ LL | let async: async = async {};
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
error: `async` is a keyword in the 2018 edition
--> $DIR/async-ident.rs:6
6
:24
--> $DIR/async-ident.rs:6
8
:24
|
LL | let async: async = async {};
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#async`
...
...
@@ -112,7 +121,7 @@ LL | let async: async = async {};
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
error: `async` is a keyword in the 2018 edition
--> $DIR/async-ident.rs:7
7
:19
--> $DIR/async-ident.rs:7
9
:19
|
LL | () => (pub fn async() {})
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#async`
...
...
@@ -121,7 +130,7 @@ LL | () => (pub fn async() {})
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
error: `async` is a keyword in the 2018 edition
--> $DIR/async-ident.rs:8
4
:6
--> $DIR/async-ident.rs:8
6
:6
|
LL | (async) => (1)
| ^^^^^ help: you can use a raw identifier to stay compatible: `r#async`
...
...
@@ -129,5 +138,5 @@ LL | (async) => (1)
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
= note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
error: aborting due to 1
4
previous errors
error: aborting due to 1
5
previous errors
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录