Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
18f7db3d
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,发现更多精彩内容 >>
提交
18f7db3d
编写于
10月 19, 2018
作者:
S
Scott McMurray
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
`impl<'_> IceCube<'_> {}` is now only one error in both editions
上级
74df5ec3
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
12 addition
and
68 deletion
+12
-68
src/test/ui/underscore-lifetime/in-binder.Rust2015.stderr
src/test/ui/underscore-lifetime/in-binder.Rust2015.stderr
+0
-46
src/test/ui/underscore-lifetime/in-binder.rs
src/test/ui/underscore-lifetime/in-binder.rs
+6
-16
src/test/ui/underscore-lifetime/in-binder.stderr
src/test/ui/underscore-lifetime/in-binder.stderr
+6
-6
未找到文件。
src/test/ui/underscore-lifetime/in-binder.Rust2015.stderr
已删除
100644 → 0
浏览文件 @
74df5ec3
error[E0637]: `'_` cannot be used here
--> $DIR/in-binder.rs:12:6
|
LL | impl<'_> IceCube<'_> {}
| ^^ `'_` is a reserved lifetime name
error[E0637]: `'_` cannot be used here
--> $DIR/in-binder.rs:17:15
|
LL | struct Struct<'_> {
| ^^ `'_` is a reserved lifetime name
error[E0637]: `'_` cannot be used here
--> $DIR/in-binder.rs:23:11
|
LL | enum Enum<'_> {
| ^^ `'_` is a reserved lifetime name
error[E0637]: `'_` cannot be used here
--> $DIR/in-binder.rs:29:13
|
LL | union Union<'_> {
| ^^ `'_` is a reserved lifetime name
error[E0637]: `'_` cannot be used here
--> $DIR/in-binder.rs:35:13
|
LL | trait Trait<'_> {
| ^^ `'_` is a reserved lifetime name
error[E0637]: `'_` cannot be used here
--> $DIR/in-binder.rs:40:8
|
LL | fn foo<'_>() {
| ^^ `'_` is a reserved lifetime name
error[E0106]: missing lifetime specifier
--> $DIR/in-binder.rs:12:18
|
LL | impl<'_> IceCube<'_> {}
| ^^ expected lifetime parameter
error: aborting due to 7 previous errors
Some errors occurred: E0106, E0637.
For more information about an error, try `rustc --explain E0106`.
src/test/ui/underscore-lifetime/in-binder.rs
浏览文件 @
18f7db3d
...
...
@@ -2,44 +2,34 @@
//
// Regression test for #52098.
// revisions: Rust2015 Rust2018
//[Rust2018] edition:2018
struct
IceCube
<
'a
>
{
v
:
Vec
<&
'a
char
>
}
impl
<
'_
>
IceCube
<
'_
>
{}
//[Rust2015]~^ ERROR `'_` cannot be used here
//[Rust2015]~| ERROR missing lifetime specifier
//[Rust2018]~^^^ ERROR `'_` cannot be used here
//~^ ERROR `'_` cannot be used here
struct
Struct
<
'_
>
{
//[Rust2015]~^ ERROR `'_` cannot be used here
//[Rust2018]~^^ ERROR `'_` cannot be used here
//~^ ERROR `'_` cannot be used here
v
:
Vec
<&
'static
char
>
}
enum
Enum
<
'_
>
{
//[Rust2015]~^ ERROR `'_` cannot be used here
//[Rust2018]~^^ ERROR `'_` cannot be used here
//~^ ERROR `'_` cannot be used here
Variant
}
union
Union
<
'_
>
{
//[Rust2015]~^ ERROR `'_` cannot be used here
//[Rust2018]~^^ ERROR `'_` cannot be used here
//~^ ERROR `'_` cannot be used here
a
:
u32
}
trait
Trait
<
'_
>
{
//[Rust2015]~^ ERROR `'_` cannot be used here
//[Rust2018]~^^ ERROR `'_` cannot be used here
//~^ ERROR `'_` cannot be used here
}
fn
foo
<
'_
>
()
{
//[Rust2015]~^ ERROR `'_` cannot be used here
//[Rust2018]~^^ ERROR `'_` cannot be used here
//~^ ERROR `'_` cannot be used here
}
fn
main
()
{}
src/test/ui/underscore-lifetime/in-binder.
Rust2018.
stderr
→
src/test/ui/underscore-lifetime/in-binder.stderr
浏览文件 @
18f7db3d
error[E0637]: `'_` cannot be used here
--> $DIR/in-binder.rs:
12
:6
--> $DIR/in-binder.rs:
9
:6
|
LL | impl<'_> IceCube<'_> {}
| ^^ `'_` is a reserved lifetime name
error[E0637]: `'_` cannot be used here
--> $DIR/in-binder.rs:1
7
:15
--> $DIR/in-binder.rs:1
2
:15
|
LL | struct Struct<'_> {
| ^^ `'_` is a reserved lifetime name
error[E0637]: `'_` cannot be used here
--> $DIR/in-binder.rs:
23
:11
--> $DIR/in-binder.rs:
17
:11
|
LL | enum Enum<'_> {
| ^^ `'_` is a reserved lifetime name
error[E0637]: `'_` cannot be used here
--> $DIR/in-binder.rs:2
9
:13
--> $DIR/in-binder.rs:2
2
:13
|
LL | union Union<'_> {
| ^^ `'_` is a reserved lifetime name
error[E0637]: `'_` cannot be used here
--> $DIR/in-binder.rs:
35
:13
--> $DIR/in-binder.rs:
27
:13
|
LL | trait Trait<'_> {
| ^^ `'_` is a reserved lifetime name
error[E0637]: `'_` cannot be used here
--> $DIR/in-binder.rs:
40
:8
--> $DIR/in-binder.rs:
31
:8
|
LL | fn foo<'_>() {
| ^^ `'_` is a reserved lifetime name
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录