Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
06af25e4
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,发现更多精彩内容 >>
提交
06af25e4
编写于
4月 09, 2022
作者:
C
Camille GILLOT
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Bless tests.
上级
871993f7
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
189 addition
and
92 deletion
+189
-92
src/test/ui/closures/issue-87461.stderr
src/test/ui/closures/issue-87461.stderr
+18
-0
src/test/ui/const-generics/const-argument-cross-crate-mismatch.stderr
...const-generics/const-argument-cross-crate-mismatch.stderr
+12
-0
src/test/ui/mismatched_types/issue-35030.stderr
src/test/ui/mismatched_types/issue-35030.stderr
+5
-0
src/test/ui/pattern/pat-tuple-field-count-cross.stderr
src/test/ui/pattern/pat-tuple-field-count-cross.stderr
+84
-92
src/test/ui/span/missing-unit-argument.stderr
src/test/ui/span/missing-unit-argument.stderr
+5
-0
src/test/ui/suggestions/args-instead-of-tuple-errors.stderr
src/test/ui/suggestions/args-instead-of-tuple-errors.stderr
+20
-0
src/test/ui/suggestions/args-instead-of-tuple.stderr
src/test/ui/suggestions/args-instead-of-tuple.stderr
+25
-0
src/test/ui/typeck/issue-46112.stderr
src/test/ui/typeck/issue-46112.stderr
+5
-0
src/test/ui/typeck/struct-enum-wrong-args.stderr
src/test/ui/typeck/struct-enum-wrong-args.stderr
+15
-0
未找到文件。
src/test/ui/closures/issue-87461.stderr
浏览文件 @
06af25e4
...
...
@@ -5,6 +5,12 @@ LL | Ok(())
| -- ^^ expected `u16`, found `()`
| |
| arguments to this enum variant are incorrect
|
note: tuple variant defined here
--> $SRC_DIR/core/src/result.rs:LL:COL
|
LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
| ^^
error[E0308]: mismatched types
--> $DIR/issue-87461.rs:17:8
...
...
@@ -13,6 +19,12 @@ LL | Ok(())
| -- ^^ expected `u16`, found `()`
| |
| arguments to this enum variant are incorrect
|
note: tuple variant defined here
--> $SRC_DIR/core/src/result.rs:LL:COL
|
LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
| ^^
error[E0308]: mismatched types
--> $DIR/issue-87461.rs:26:12
...
...
@@ -21,6 +33,12 @@ LL | Ok(())
| -- ^^ expected `u16`, found `()`
| |
| arguments to this enum variant are incorrect
|
note: tuple variant defined here
--> $SRC_DIR/core/src/result.rs:LL:COL
|
LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
| ^^
error: aborting due to 3 previous errors
...
...
src/test/ui/const-generics/const-argument-cross-crate-mismatch.stderr
浏览文件 @
06af25e4
...
...
@@ -5,6 +5,12 @@ LL | let _ = const_generic_lib::function(const_generic_lib::Struct([0u8, 1u8
| ------------------------- ^^^^^^^^^^ expected an array with a fixed size of 3 elements, found one with 2 elements
| |
| arguments to this struct are incorrect
|
note: tuple struct defined here
--> $DIR/auxiliary/const_generic_lib.rs:1:12
|
LL | pub struct Struct<const N: usize>(pub [u8; N]);
| ^^^^^^
error[E0308]: mismatched types
--> $DIR/const-argument-cross-crate-mismatch.rs:8:65
...
...
@@ -13,6 +19,12 @@ LL | let _: const_generic_lib::Alias = const_generic_lib::Struct([0u8, 1u8,
| ------------------------- ^^^^^^^^^^^^^^^ expected an array with a fixed size of 2 elements, found one with 3 elements
| |
| arguments to this struct are incorrect
|
note: tuple struct defined here
--> $DIR/auxiliary/const_generic_lib.rs:1:12
|
LL | pub struct Struct<const N: usize>(pub [u8; N]);
| ^^^^^^
error: aborting due to 2 previous errors
...
...
src/test/ui/mismatched_types/issue-35030.stderr
浏览文件 @
06af25e4
...
...
@@ -11,6 +11,11 @@ LL | Some(true)
|
= note: expected type parameter `bool` (type parameter `bool`)
found type `bool` (`bool`)
note: tuple variant defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
|
LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
| ^^^^
error: aborting due to previous error
...
...
src/test/ui/pattern/pat-tuple-field-count-cross.stderr
浏览文件 @
06af25e4
...
...
@@ -198,20 +198,19 @@ LL | pub struct S(pub u8, pub u8, pub u8);
error[E0023]: this pattern has 0 fields, but the corresponding tuple struct has 3 fields
--> $DIR/pat-tuple-field-count-cross.rs:24:9
|
LL |
M() => {}
|
^^^ expected 3 fields, found 0
LL | M() => {}
| ^^^ expected 3 fields, found 0
|
::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:5:1
::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:5:1
2
|
LL | / pub struct M(
LL | | pub u8,
| | ------
LL | | pub u8,
| | ------
LL | | pub u8,
| | ------ tuple struct has 3 fields
LL | | );
| |__- tuple struct defined here
LL | pub struct M(
| - tuple struct defined here
LL | pub u8,
| ------
LL | pub u8,
| ------
LL | pub u8,
| ------ tuple struct has 3 fields
|
help: use `_` to explicitly ignore each field
|
...
...
@@ -225,20 +224,19 @@ LL | M(..) => {}
error[E0023]: this pattern has 1 field, but the corresponding tuple struct has 3 fields
--> $DIR/pat-tuple-field-count-cross.rs:25:11
|
LL |
M(1) => {}
|
^ expected 3 fields, found 1
LL | M(1) => {}
| ^ expected 3 fields, found 1
|
::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:5:1
::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:5:1
2
|
LL | / pub struct M(
LL | | pub u8,
| | ------
LL | | pub u8,
| | ------
LL | | pub u8,
| | ------ tuple struct has 3 fields
LL | | );
| |__- tuple struct defined here
LL | pub struct M(
| - tuple struct defined here
LL | pub u8,
| ------
LL | pub u8,
| ------
LL | pub u8,
| ------ tuple struct has 3 fields
|
help: use `_` to explicitly ignore each field
|
...
...
@@ -252,20 +250,19 @@ LL | M(1, ..) => {}
error[E0023]: this pattern has 2 fields, but the corresponding tuple struct has 3 fields
--> $DIR/pat-tuple-field-count-cross.rs:26:11
|
LL |
M(xyz, abc) => {}
|
^^^ ^^^ expected 3 fields, found 2
LL | M(xyz, abc) => {}
| ^^^ ^^^ expected 3 fields, found 2
|
::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:5:1
::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:5:1
2
|
LL | / pub struct M(
LL | | pub u8,
| | ------
LL | | pub u8,
| | ------
LL | | pub u8,
| | ------ tuple struct has 3 fields
LL | | );
| |__- tuple struct defined here
LL | pub struct M(
| - tuple struct defined here
LL | pub u8,
| ------
LL | pub u8,
| ------
LL | pub u8,
| ------ tuple struct has 3 fields
|
help: use `_` to explicitly ignore each field
|
...
...
@@ -275,20 +272,19 @@ LL | M(xyz, abc, _) => {}
error[E0023]: this pattern has 4 fields, but the corresponding tuple struct has 3 fields
--> $DIR/pat-tuple-field-count-cross.rs:27:11
|
LL |
M(1, 2, 3, 4) => {}
|
^ ^ ^ ^ expected 3 fields, found 4
LL | M(1, 2, 3, 4) => {}
| ^ ^ ^ ^ expected 3 fields, found 4
|
::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:5:1
::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:5:1
2
|
LL | / pub struct M(
LL | | pub u8,
| | ------
LL | | pub u8,
| | ------
LL | | pub u8,
| | ------ tuple struct has 3 fields
LL | | );
| |__- tuple struct defined here
LL | pub struct M(
| - tuple struct defined here
LL | pub u8,
| ------
LL | pub u8,
| ------
LL | pub u8,
| ------ tuple struct has 3 fields
error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 0 fields
--> $DIR/pat-tuple-field-count-cross.rs:36:16
...
...
@@ -438,20 +434,19 @@ LL | S(u8, u8, u8),
error[E0023]: this pattern has 0 fields, but the corresponding tuple variant has 3 fields
--> $DIR/pat-tuple-field-count-cross.rs:52:9
|
LL |
E2::M() => {}
|
^^^^^^^ expected 3 fields, found 0
LL | E2::M() => {}
| ^^^^^^^ expected 3 fields, found 0
|
::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:15:5
|
LL | / M(
LL | | u8,
| | --
LL | | u8,
| | --
LL | | u8,
| | -- tuple variant has 3 fields
LL | | ),
| |_____- tuple variant defined here
LL | M(
| - tuple variant defined here
LL | u8,
| --
LL | u8,
| --
LL | u8,
| -- tuple variant has 3 fields
|
help: use `_` to explicitly ignore each field
|
...
...
@@ -465,20 +460,19 @@ LL | E2::M(..) => {}
error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 3 fields
--> $DIR/pat-tuple-field-count-cross.rs:53:15
|
LL |
E2::M(1) => {}
|
^ expected 3 fields, found 1
LL | E2::M(1) => {}
| ^ expected 3 fields, found 1
|
::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:15:5
|
LL | / M(
LL | | u8,
| | --
LL | | u8,
| | --
LL | | u8,
| | -- tuple variant has 3 fields
LL | | ),
| |_____- tuple variant defined here
LL | M(
| - tuple variant defined here
LL | u8,
| --
LL | u8,
| --
LL | u8,
| -- tuple variant has 3 fields
|
help: use `_` to explicitly ignore each field
|
...
...
@@ -492,20 +486,19 @@ LL | E2::M(1, ..) => {}
error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 3 fields
--> $DIR/pat-tuple-field-count-cross.rs:54:15
|
LL |
E2::M(xyz, abc) => {}
|
^^^ ^^^ expected 3 fields, found 2
LL | E2::M(xyz, abc) => {}
| ^^^ ^^^ expected 3 fields, found 2
|
::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:15:5
|
LL | / M(
LL | | u8,
| | --
LL | | u8,
| | --
LL | | u8,
| | -- tuple variant has 3 fields
LL | | ),
| |_____- tuple variant defined here
LL | M(
| - tuple variant defined here
LL | u8,
| --
LL | u8,
| --
LL | u8,
| -- tuple variant has 3 fields
|
help: use `_` to explicitly ignore each field
|
...
...
@@ -515,20 +508,19 @@ LL | E2::M(xyz, abc, _) => {}
error[E0023]: this pattern has 4 fields, but the corresponding tuple variant has 3 fields
--> $DIR/pat-tuple-field-count-cross.rs:55:15
|
LL |
E2::M(1, 2, 3, 4) => {}
|
^ ^ ^ ^ expected 3 fields, found 4
LL | E2::M(1, 2, 3, 4) => {}
| ^ ^ ^ ^ expected 3 fields, found 4
|
::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:15:5
|
LL | / M(
LL | | u8,
| | --
LL | | u8,
| | --
LL | | u8,
| | -- tuple variant has 3 fields
LL | | ),
| |_____- tuple variant defined here
LL | M(
| - tuple variant defined here
LL | u8,
| --
LL | u8,
| --
LL | u8,
| -- tuple variant has 3 fields
error: aborting due to 28 previous errors
...
...
src/test/ui/span/missing-unit-argument.stderr
浏览文件 @
06af25e4
...
...
@@ -4,6 +4,11 @@ error[E0061]: this enum variant takes 1 argument but 0 arguments were supplied
LL | let _: Result<(), String> = Ok();
| ^^-- an argument of type `()` is missing
|
note: tuple variant defined here
--> $SRC_DIR/core/src/result.rs:LL:COL
|
LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
| ^^
help: provide the argument
|
LL | let _: Result<(), String> = Ok(());
...
...
src/test/ui/suggestions/args-instead-of-tuple-errors.stderr
浏览文件 @
06af25e4
...
...
@@ -8,6 +8,11 @@ LL | let _: Option<(i32, bool)> = Some(1, 2);
|
= note: expected tuple `(i32, bool)`
found type `{integer}`
note: tuple variant defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
|
LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
| ^^^^
help: remove the extra argument
|
LL | let _: Option<(i32, bool)> = Some({(i32, bool)});
...
...
@@ -39,6 +44,11 @@ error[E0061]: this enum variant takes 1 argument but 0 arguments were supplied
LL | let _: Option<(i8,)> = Some();
| ^^^^-- an argument of type `(i8,)` is missing
|
note: tuple variant defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
|
LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
| ^^^^
help: provide the argument
|
LL | let _: Option<(i8,)> = Some({(i8,)});
...
...
@@ -54,6 +64,11 @@ LL | let _: Option<(i32,)> = Some(5_usize);
|
= note: expected tuple `(i32,)`
found type `usize`
note: tuple variant defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
|
LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
| ^^^^
error[E0308]: mismatched types
--> $DIR/args-instead-of-tuple-errors.rs:17:34
...
...
@@ -65,6 +80,11 @@ LL | let _: Option<(i32,)> = Some((5_usize));
|
= note: expected tuple `(i32,)`
found type `usize`
note: tuple variant defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
|
LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
| ^^^^
error: aborting due to 5 previous errors
...
...
src/test/ui/suggestions/args-instead-of-tuple.stderr
浏览文件 @
06af25e4
...
...
@@ -4,6 +4,11 @@ error[E0061]: this enum variant takes 1 argument but 2 arguments were supplied
LL | let _: Result<(i32, i8), ()> = Ok(1, 2);
| ^^
|
note: tuple variant defined here
--> $SRC_DIR/core/src/result.rs:LL:COL
|
LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
| ^^
help: use parentheses to construct a tuple
|
LL | let _: Result<(i32, i8), ()> = Ok((1, 2));
...
...
@@ -15,6 +20,11 @@ error[E0061]: this enum variant takes 1 argument but 3 arguments were supplied
LL | let _: Option<(i32, i8, &'static str)> = Some(1, 2, "hi");
| ^^^^
|
note: tuple variant defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
|
LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
| ^^^^
help: use parentheses to construct a tuple
|
LL | let _: Option<(i32, i8, &'static str)> = Some((1, 2, "hi"));
...
...
@@ -26,6 +36,11 @@ error[E0061]: this enum variant takes 1 argument but 0 arguments were supplied
LL | let _: Option<()> = Some();
| ^^^^-- an argument of type `()` is missing
|
note: tuple variant defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
|
LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
| ^^^^
help: provide the argument
|
LL | let _: Option<()> = Some(());
...
...
@@ -41,6 +56,11 @@ LL | let _: Option<(i32,)> = Some(3);
|
= note: expected tuple `(i32,)`
found type `{integer}`
note: tuple variant defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
|
LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
| ^^^^
help: use a trailing comma to create a tuple with one element
|
LL | let _: Option<(i32,)> = Some((3,));
...
...
@@ -56,6 +76,11 @@ LL | let _: Option<(i32,)> = Some((3));
|
= note: expected tuple `(i32,)`
found type `{integer}`
note: tuple variant defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
|
LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
| ^^^^
help: use a trailing comma to create a tuple with one element
|
LL | let _: Option<(i32,)> = Some((3,));
...
...
src/test/ui/typeck/issue-46112.stderr
浏览文件 @
06af25e4
...
...
@@ -8,6 +8,11 @@ LL | fn main() { test(Ok(())); }
|
= note: expected enum `Option<()>`
found unit type `()`
note: tuple variant defined here
--> $SRC_DIR/core/src/result.rs:LL:COL
|
LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
| ^^
help: try wrapping the expression in `Some`
|
LL | fn main() { test(Ok(Some(()))); }
...
...
src/test/ui/typeck/struct-enum-wrong-args.stderr
浏览文件 @
06af25e4
...
...
@@ -4,6 +4,11 @@ error[E0061]: this enum variant takes 1 argument but 2 arguments were supplied
LL | let _ = Some(3, 2);
| ^^^^ - argument unexpected
|
note: tuple variant defined here
--> $SRC_DIR/core/src/option.rs:LL:COL
|
LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
| ^^^^
help: remove the extra argument
|
LL | let _ = Some(3);
...
...
@@ -17,6 +22,11 @@ LL | let _ = Ok(3, 6, 2);
| |
| argument unexpected
|
note: tuple variant defined here
--> $SRC_DIR/core/src/result.rs:LL:COL
|
LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
| ^^
help: remove the extra arguments
|
LL | let _ = Ok(3);
...
...
@@ -28,6 +38,11 @@ error[E0061]: this enum variant takes 1 argument but 0 arguments were supplied
LL | let _ = Ok();
| ^^-- an argument is missing
|
note: tuple variant defined here
--> $SRC_DIR/core/src/result.rs:LL:COL
|
LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
| ^^
help: provide the argument
|
LL | let _ = Ok({_});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录