Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
3fa28cb2
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,发现更多精彩内容 >>
提交
3fa28cb2
编写于
2月 02, 2017
作者:
C
Cengiz Can
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add a new ui test and update existing ones
上级
7aff6add
变更
24
隐藏空白更改
内联
并排
Showing
24 changed file
with
70 addition
and
45 deletion
+70
-45
src/test/compile-fail/issue-12187-1.rs
src/test/compile-fail/issue-12187-1.rs
+2
-3
src/test/compile-fail/issue-12187-2.rs
src/test/compile-fail/issue-12187-2.rs
+2
-3
src/test/compile-fail/issue-16966.rs
src/test/compile-fail/issue-16966.rs
+1
-1
src/test/compile-fail/issue-17551.rs
src/test/compile-fail/issue-17551.rs
+1
-1
src/test/compile-fail/issue-18159.rs
src/test/compile-fail/issue-18159.rs
+1
-1
src/test/compile-fail/issue-23041.rs
src/test/compile-fail/issue-23041.rs
+1
-2
src/test/compile-fail/issue-23046.rs
src/test/compile-fail/issue-23046.rs
+1
-1
src/test/compile-fail/issue-24013.rs
src/test/compile-fail/issue-24013.rs
+1
-1
src/test/compile-fail/issue-5062.rs
src/test/compile-fail/issue-5062.rs
+1
-1
src/test/compile-fail/issue-6458-2.rs
src/test/compile-fail/issue-6458-2.rs
+1
-1
src/test/compile-fail/issue-6458-3.rs
src/test/compile-fail/issue-6458-3.rs
+2
-3
src/test/compile-fail/issue-6458.rs
src/test/compile-fail/issue-6458.rs
+2
-3
src/test/compile-fail/issue-7813.rs
src/test/compile-fail/issue-7813.rs
+3
-4
src/test/compile-fail/method-ambig-one-trait-unknown-int-type.rs
...t/compile-fail/method-ambig-one-trait-unknown-int-type.rs
+1
-1
src/test/compile-fail/traits-multidispatch-convert-ambig-dest.rs
...t/compile-fail/traits-multidispatch-convert-ambig-dest.rs
+2
-3
src/test/compile-fail/unconstrained-none.rs
src/test/compile-fail/unconstrained-none.rs
+2
-3
src/test/compile-fail/unconstrained-ref.rs
src/test/compile-fail/unconstrained-ref.rs
+2
-3
src/test/compile-fail/vector-no-ann.rs
src/test/compile-fail/vector-no-ann.rs
+3
-4
src/test/ui/codemap_tests/issue-38812-2.rs
src/test/ui/codemap_tests/issue-38812-2.rs
+13
-0
src/test/ui/codemap_tests/issue-38812-2.stderr
src/test/ui/codemap_tests/issue-38812-2.stderr
+12
-0
src/test/ui/codemap_tests/issue-38812.rs
src/test/ui/codemap_tests/issue-38812.rs
+1
-1
src/test/ui/codemap_tests/issue-38812.stderr
src/test/ui/codemap_tests/issue-38812.stderr
+12
-0
src/test/ui/missing-items/missing-type-parameter.rs
src/test/ui/missing-items/missing-type-parameter.rs
+1
-1
src/test/ui/missing-items/missing-type-parameter.stderr
src/test/ui/missing-items/missing-type-parameter.stderr
+2
-4
未找到文件。
src/test/compile-fail/issue-12187-1.rs
浏览文件 @
3fa28cb2
...
...
@@ -14,7 +14,6 @@ fn new<T>() -> &'static T {
fn
main
()
{
let
&
v
=
new
();
//~^ ERROR unable to fully infer type(s) [E0282]
//~| NOTE cannot infer type
//~| NOTE type annotations or generic parameter binding
//~^ ERROR type annotations needed [E0282]
//~| NOTE cannot infer type for `_`
}
src/test/compile-fail/issue-12187-2.rs
浏览文件 @
3fa28cb2
...
...
@@ -14,7 +14,6 @@ fn new<'r, T>() -> &'r T {
fn
main
()
{
let
&
v
=
new
();
//~^ ERROR unable to fully infer type(s) [E0282]
//~| NOTE cannot infer type
//~| NOTE type annotations or generic parameter binding
//~^ ERROR type annotations needed [E0282]
//~| NOTE cannot infer type for `_`
}
src/test/compile-fail/issue-16966.rs
浏览文件 @
3fa28cb2
...
...
@@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// error-pattern:type annotations
or generic parameter binding requir
ed
// error-pattern:type annotations
need
ed
fn
main
()
{
panic!
(
std
::
default
::
Default
::
default
()
...
...
src/test/compile-fail/issue-17551.rs
浏览文件 @
3fa28cb2
...
...
@@ -13,6 +13,6 @@
struct
B
<
T
>
(
marker
::
PhantomData
<
T
>
);
fn
main
()
{
let
foo
=
B
(
marker
::
PhantomData
);
//~ ERROR
unable to fully infer type(s)
let
foo
=
B
(
marker
::
PhantomData
);
//~ ERROR
type annotations needed
let
closure
=
||
foo
;
}
src/test/compile-fail/issue-18159.rs
浏览文件 @
3fa28cb2
...
...
@@ -9,5 +9,5 @@
// except according to those terms.
fn
main
()
{
let
x
;
//~ ERROR
unable to fully infer type(s)
let
x
;
//~ ERROR
type annotations needed
}
src/test/compile-fail/issue-23041.rs
浏览文件 @
3fa28cb2
...
...
@@ -14,6 +14,5 @@ fn main()
fn
bar
(
x
:
i32
)
->
i32
{
3
*
x
};
let
b
:
Box
<
Any
>
=
Box
::
new
(
bar
as
fn
(
_
)
->
_
);
b
.downcast_ref
::
<
fn
(
_
)
->
_
>
();
//~ ERROR E0282
//~| NOTE cannot infer type
//~| NOTE type annotations or generic parameter binding required
//~| NOTE cannot infer type for `_`
}
src/test/compile-fail/issue-23046.rs
浏览文件 @
3fa28cb2
...
...
@@ -25,6 +25,6 @@ pub fn let_<'var, VAR, F: for<'v: 'var> Fn(Expr<'v, VAR>) -> Expr<'v, VAR>>
fn
main
()
{
let
ex
=
|
x
|
{
let_
(
add
(
x
,
x
),
|
y
|
{
//~ ERROR
unable to fully infer type(s)
let_
(
add
(
x
,
x
),
|
y
|
{
//~ ERROR
type annotations needed
let_
(
add
(
x
,
x
),
|
x
|
x
)})};
}
src/test/compile-fail/issue-24013.rs
浏览文件 @
3fa28cb2
...
...
@@ -13,5 +13,5 @@ fn main() {
let
a
=
1
;
let
b
=
2
;
unsafe
{
swap
::
<&
mut
_
>
(
transmute
(
&
a
),
transmute
(
&
b
))};
//~^ ERROR
unable to fully infer type(s)
//~^ ERROR
type annotations needed
}
src/test/compile-fail/issue-5062.rs
浏览文件 @
3fa28cb2
...
...
@@ -9,4 +9,4 @@
// except according to those terms.
fn
main
()
{
format!
(
"{:?}"
,
None
);
}
//~^ ERROR
unable to fully infer type(s)
[E0282]
//~^ ERROR
type annotations needed
[E0282]
src/test/compile-fail/issue-6458-2.rs
浏览文件 @
3fa28cb2
...
...
@@ -11,5 +11,5 @@
fn
main
()
{
// Unconstrained type:
format!
(
"{:?}"
,
None
);
//~^ ERROR
unable to fully infer type(s)
[E0282]
//~^ ERROR
type annotations needed
[E0282]
}
src/test/compile-fail/issue-6458-3.rs
浏览文件 @
3fa28cb2
...
...
@@ -12,7 +12,6 @@
fn
main
()
{
mem
::
transmute
(
0
);
//~^ ERROR unable to fully infer type(s) [E0282]
//~| NOTE cannot infer type
//~| NOTE type annotations or generic parameter binding
//~^ ERROR type annotations needed [E0282]
//~| NOTE cannot infer type for `U`
}
src/test/compile-fail/issue-6458.rs
浏览文件 @
3fa28cb2
...
...
@@ -17,9 +17,8 @@ pub fn foo<State>(_: TypeWithState<State>) {}
pub
fn
bar
()
{
foo
(
TypeWithState
(
marker
::
PhantomData
));
//~^ ERROR unable to fully infer type(s) [E0282]
//~| NOTE cannot infer type
//~| NOTE type annotations or generic parameter binding
//~^ ERROR type annotations needed [E0282]
//~| NOTE cannot infer type for `State`
}
fn
main
()
{
...
...
src/test/compile-fail/issue-7813.rs
浏览文件 @
3fa28cb2
...
...
@@ -10,8 +10,7 @@
fn
main
()
{
let
v
=
&
[];
let
it
=
v
.iter
();
//~ ERROR unable to fully infer type(s) [E0282]
//~| NOTE cannot infer type
//~| NOTE annotating the type for the variable `it` would help
//~| NOTE type annotations or generic parameter binding
let
it
=
v
.iter
();
//~ ERROR type annotations needed [E0282]
//~| NOTE cannot infer type for `T`
//~| NOTE consider giving `it` a type
}
src/test/compile-fail/method-ambig-one-trait-unknown-int-type.rs
浏览文件 @
3fa28cb2
...
...
@@ -32,7 +32,7 @@ fn foo(&self) -> isize {2}
fn
m1
()
{
// we couldn't infer the type of the vector just based on calling foo()...
let
mut
x
=
Vec
::
new
();
//~^ ERROR
unable to fully infer type(s)
[E0282]
//~^ ERROR
type annotations needed
[E0282]
x
.foo
();
}
...
...
src/test/compile-fail/traits-multidispatch-convert-ambig-dest.rs
浏览文件 @
3fa28cb2
...
...
@@ -34,9 +34,8 @@ fn test<T,U>(_: T, _: U)
fn
a
()
{
test
(
22
,
std
::
default
::
Default
::
default
());
//~^ ERROR unable to fully infer type(s) [E0282]
//~| NOTE cannot infer type
//~| NOTE type annotations or generic parameter binding
//~^ ERROR type annotations needed [E0282]
//~| NOTE cannot infer type for `U`
}
fn
main
()
{}
src/test/compile-fail/unconstrained-none.rs
浏览文件 @
3fa28cb2
...
...
@@ -11,7 +11,6 @@
// Issue #5062
fn
main
()
{
None
;
//~ ERROR unable to fully infer type(s) [E0282]
//~| NOTE cannot infer type
//~| NOTE type annotations or generic parameter binding
None
;
//~ ERROR type annotations needed [E0282]
//~| NOTE cannot infer type for `T`
}
src/test/compile-fail/unconstrained-ref.rs
浏览文件 @
3fa28cb2
...
...
@@ -13,7 +13,6 @@ struct S<'a, T:'a> {
}
fn
main
()
{
S
{
o
:
&
None
};
//~ ERROR unable to fully infer type(s) [E0282]
//~| NOTE cannot infer type
//~| NOTE type annotations or generic parameter binding
S
{
o
:
&
None
};
//~ ERROR type annotations needed [E0282]
//~| NOTE cannot infer type for `T`
}
src/test/compile-fail/vector-no-ann.rs
浏览文件 @
3fa28cb2
...
...
@@ -11,8 +11,7 @@
fn
main
()
{
let
_
foo
=
Vec
::
new
();
//~^ ERROR unable to fully infer type(s) [E0282]
//~| NOTE cannot infer type
//~| NOTE annotating the type for the variable `_foo` would help
//~| NOTE type annotations or generic parameter binding
//~^ ERROR type annotations needed [E0282]
//~| NOTE cannot infer type for `T`
//~| NOTE consider giving `_foo` a type
}
src/test/ui/codemap_tests/issue-38812-2.rs
0 → 100644
浏览文件 @
3fa28cb2
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
fn
main
()
{
let
(
x
,)
=
(
vec!
[],);
}
src/test/ui/codemap_tests/issue-38812-2.stderr
0 → 100644
浏览文件 @
3fa28cb2
error[E0282]: type annotations needed
--> $DIR/issue-38812-2.rs:12:17
|
12 | let (x,) = (vec![],);
| ---- ^^^^^^ cannot infer type for `T`
| |
| consider giving a type to pattern
|
= note: this error originates in a macro outside of the current crate
error: aborting due to previous error
src/test/ui/codemap_tests/
repair_span_std_macros
.rs
→
src/test/ui/codemap_tests/
issue-38812
.rs
浏览文件 @
3fa28cb2
// Copyright 201
6
The Rust Project Developers. See the COPYRIGHT
// Copyright 201
7
The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
...
...
src/test/ui/codemap_tests/
repair_span_std_macros
.stderr
→
src/test/ui/codemap_tests/
issue-38812
.stderr
浏览文件 @
3fa28cb2
error[E0282]:
unable to fully infer type(s)
--> $DIR/
repair_span_std_macros
.rs:12:13
error[E0282]:
type annotations needed
--> $DIR/
issue-38812
.rs:12:13
|
12 | let x = vec![];
| - ^^^^^^ cannot infer type
| - ^^^^^^ cannot infer type
for `T`
| |
|
annotating the type for the variable `x` would help
|
consider giving `x` a type
|
= note: type annotations or generic parameter binding required
= note: this error originates in a macro outside of the current crate
error: aborting due to previous error
...
...
src/test/ui/missing-items/missing-type-parameter.rs
浏览文件 @
3fa28cb2
// Copyright 201
4
The Rust Project Developers. See the COPYRIGHT
// Copyright 201
7
The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
...
...
src/test/ui/missing-items/missing-type-parameter.stderr
浏览文件 @
3fa28cb2
error[E0282]:
unable to fully infer type(s)
error[E0282]:
type annotations needed
--> $DIR/missing-type-parameter.rs:14:5
|
14 | foo();
| ^^^ cannot infer type
|
= note: type annotations or generic parameter binding required
| ^^^ cannot infer type for `X`
error: aborting due to previous error
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录