Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
4bf281a2
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,发现更多精彩内容 >>
提交
4bf281a2
编写于
10月 27, 2021
作者:
D
Devin Ragotzy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update non-exhaustive omitted_patterns ui output
上级
3344833a
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
46 addition
and
4 deletion
+46
-4
src/test/ui/rfc-2008-non-exhaustive/omitted-patterns.stderr
src/test/ui/rfc-2008-non-exhaustive/omitted-patterns.stderr
+31
-3
src/test/ui/rfc-2008-non-exhaustive/stable-omitted-patterns.stderr
...ui/rfc-2008-non-exhaustive/stable-omitted-patterns.stderr
+15
-1
未找到文件。
src/test/ui/rfc-2008-non-exhaustive/omitted-patterns.stderr
浏览文件 @
4bf281a2
...
...
@@ -49,6 +49,34 @@ LL | let NestedStruct { bar: NormalStruct { first_field, .. }, .. } = Nested
= help: ensure that all fields are mentioned explicitly by adding the suggested fields
= note: the pattern is of type `NestedStruct` and the `non_exhaustive_omitted_patterns` attribute was found
warning: some fields are not explicitly listed
--> $DIR/omitted-patterns.rs:173:9
|
LL | let OnlyUnstableStruct { unstable, .. } = OnlyUnstableStruct::new();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `unstable2` not listed
|
note: the lint level is defined here
--> $DIR/omitted-patterns.rs:172:12
|
LL | #[warn(non_exhaustive_omitted_patterns)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: ensure that all fields are mentioned explicitly by adding the suggested fields
= note: the pattern is of type `OnlyUnstableStruct` and the `non_exhaustive_omitted_patterns` attribute was found
warning: some fields are not explicitly listed
--> $DIR/omitted-patterns.rs:181:9
|
LL | let UnstableStruct { stable, stable2, .. } = UnstableStruct::default();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `unstable` not listed
|
note: the lint level is defined here
--> $DIR/omitted-patterns.rs:180:12
|
LL | #[warn(non_exhaustive_omitted_patterns)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: ensure that all fields are mentioned explicitly by adding the suggested fields
= note: the pattern is of type `UnstableStruct` and the `non_exhaustive_omitted_patterns` attribute was found
error: some variants are not matched explicitly
--> $DIR/omitted-patterns.rs:58:9
|
...
...
@@ -143,18 +171,18 @@ LL | #[deny(non_exhaustive_omitted_patterns)]
= note: the matched value is of type `UnstableEnum` and the `non_exhaustive_omitted_patterns` attribute was found
error: some variants are not matched explicitly
--> $DIR/omitted-patterns.rs:16
7
:9
--> $DIR/omitted-patterns.rs:16
8
:9
|
LL | _ => {}
| ^ pattern `Unstable2` not covered
|
note: the lint level is defined here
--> $DIR/omitted-patterns.rs:16
4
:12
--> $DIR/omitted-patterns.rs:16
5
:12
|
LL | #[deny(non_exhaustive_omitted_patterns)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: ensure that all variants are matched explicitly by adding the suggested match arms
= note: the matched value is of type `OnlyUnstableEnum` and the `non_exhaustive_omitted_patterns` attribute was found
error: aborting due to 8 previous errors;
4
warnings emitted
error: aborting due to 8 previous errors;
6
warnings emitted
src/test/ui/rfc-2008-non-exhaustive/stable-omitted-patterns.stderr
浏览文件 @
4bf281a2
warning: some fields are not explicitly listed
--> $DIR/stable-omitted-patterns.rs:39:9
|
LL | let UnstableStruct { stable, .. } = UnstableStruct::default();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `stable2` not listed
|
note: the lint level is defined here
--> $DIR/stable-omitted-patterns.rs:38:12
|
LL | #[warn(non_exhaustive_omitted_patterns)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: ensure that all fields are mentioned explicitly by adding the suggested fields
= note: the pattern is of type `UnstableStruct` and the `non_exhaustive_omitted_patterns` attribute was found
error: some variants are not matched explicitly
--> $DIR/stable-omitted-patterns.rs:23:9
|
...
...
@@ -12,5 +26,5 @@ LL | #[deny(non_exhaustive_omitted_patterns)]
= help: ensure that all variants are matched explicitly by adding the suggested match arms
= note: the matched value is of type `UnstableEnum` and the `non_exhaustive_omitted_patterns` attribute was found
error: aborting due to previous error
error: aborting due to previous error
; 1 warning emitted
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录