Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
8637b4b0
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,发现更多精彩内容 >>
提交
8637b4b0
编写于
6月 17, 2016
作者:
G
Guillaume Gomez
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove unused functions calls and unused E0406
上级
646015ca
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
1 addition
and
33 deletion
+1
-33
src/librustc_resolve/diagnostics.rs
src/librustc_resolve/diagnostics.rs
+1
-1
src/librustc_resolve/lib.rs
src/librustc_resolve/lib.rs
+0
-32
未找到文件。
src/librustc_resolve/diagnostics.rs
浏览文件 @
8637b4b0
...
...
@@ -1105,7 +1105,7 @@ impl Foo for i32 {}
// E0257,
// E0258,
E0402
,
// cannot use an outer type parameter in this context
E0406
,
// undeclared associated type
// E0406, merged into 420
// E0410, merged into 408
// E0413, merged into 530
// E0414, merged into 530
...
...
src/librustc_resolve/lib.rs
浏览文件 @
8637b4b0
...
...
@@ -104,8 +104,6 @@ enum ResolutionError<'a> {
IsNotATrait
(
&
'a
str
),
/// error E0405: use of undeclared trait name
UndeclaredTraitName
(
&
'a
str
,
SuggestedCandidates
),
/// error E0406: undeclared associated type
UndeclaredAssociatedType
,
/// error E0407: method is not a member of trait
MethodNotMemberOfTrait
(
Name
,
&
'a
str
),
/// error E0437: type is not a member of trait
...
...
@@ -229,9 +227,6 @@ fn resolve_struct_error<'b, 'a: 'b, 'c>(resolver: &'b Resolver<'a>,
err
.span_label
(
span
,
&
format!
(
"`{}` is not in scope"
,
name
));
err
}
ResolutionError
::
UndeclaredAssociatedType
=>
{
struct_span_err!
(
resolver
.session
,
span
,
E0406
,
"undeclared associated type"
)
}
ResolutionError
::
MethodNotMemberOfTrait
(
method
,
trait_
)
=>
{
struct_span_err!
(
resolver
.session
,
span
,
...
...
@@ -519,9 +514,6 @@ fn visit_local(&mut self, local: &Local) {
fn
visit_ty
(
&
mut
self
,
ty
:
&
Ty
)
{
self
.resolve_type
(
ty
);
}
fn
visit_generics
(
&
mut
self
,
generics
:
&
Generics
)
{
self
.resolve_generics
(
generics
);
}
fn
visit_poly_trait_ref
(
&
mut
self
,
tref
:
&
ast
::
PolyTraitRef
,
m
:
&
ast
::
TraitBoundModifier
)
{
match
self
.resolve_trait_reference
(
tref
.trait_ref.ref_id
,
&
tref
.trait_ref.path
,
0
)
{
Ok
(
def
)
=>
self
.record_def
(
tref
.trait_ref.ref_id
,
def
),
...
...
@@ -1850,30 +1842,6 @@ fn resolve_trait_reference(&mut self,
})
}
fn
resolve_generics
(
&
mut
self
,
generics
:
&
Generics
)
{
for
predicate
in
&
generics
.where_clause.predicates
{
match
predicate
{
&
ast
::
WherePredicate
::
BoundPredicate
(
_
)
|
&
ast
::
WherePredicate
::
RegionPredicate
(
_
)
=>
{}
&
ast
::
WherePredicate
::
EqPredicate
(
ref
eq_pred
)
=>
{
self
.resolve_path
(
eq_pred
.id
,
&
eq_pred
.path
,
0
,
TypeNS
)
.and_then
(|
path_res
|
{
if
let
PathResolution
{
base_def
:
Def
::
TyParam
(
..
),
..
}
=
path_res
{
Ok
(
self
.record_def
(
eq_pred
.id
,
path_res
))
}
else
{
Err
(
false
)
}
})
.map_err
(|
error_reported
|
{
self
.record_def
(
eq_pred
.id
,
err_path_resolution
());
if
error_reported
{
return
}
let
error_variant
=
ResolutionError
::
UndeclaredAssociatedType
;
resolve_error
(
self
,
eq_pred
.span
,
error_variant
);
})
.unwrap_or
(());
}
}
}
visit
::
walk_generics
(
self
,
generics
);
}
fn
with_current_self_type
<
T
,
F
>
(
&
mut
self
,
self_type
:
&
Ty
,
f
:
F
)
->
T
where
F
:
FnOnce
(
&
mut
Resolver
)
->
T
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录