Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
3aefb964
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,发现更多精彩内容 >>
提交
3aefb964
编写于
8月 11, 2013
作者:
N
Niko Matsakis
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
librustc: Convert from `
@object
` to `@mut Object` as needed
上级
96254b40
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
19 addition
and
16 deletion
+19
-16
src/librustc/driver/driver.rs
src/librustc/driver/driver.rs
+1
-1
src/librustc/driver/session.rs
src/librustc/driver/session.rs
+2
-2
src/librustc/metadata/creader.rs
src/librustc/metadata/creader.rs
+3
-3
src/librustc/metadata/encoder.rs
src/librustc/metadata/encoder.rs
+2
-2
src/librustc/metadata/loader.rs
src/librustc/metadata/loader.rs
+2
-2
src/librustc/metadata/tyencode.rs
src/librustc/metadata/tyencode.rs
+1
-1
src/librustc/middle/lint.rs
src/librustc/middle/lint.rs
+3
-3
src/librustc/middle/ty.rs
src/librustc/middle/ty.rs
+5
-2
未找到文件。
src/librustc/driver/driver.rs
浏览文件 @
3aefb964
...
...
@@ -785,7 +785,7 @@ pub fn build_session(sopts: @session::options,
pub
fn
build_session_
(
sopts
:
@
session
::
options
,
cm
:
@
codemap
::
CodeMap
,
demitter
:
diagnostic
::
Emitter
,
span_diagnostic_handler
:
@
diagnostic
::
span_handler
)
span_diagnostic_handler
:
@
mut
diagnostic
::
span_handler
)
->
Session
{
let
target_cfg
=
build_target_config
(
sopts
,
demitter
);
let
p_s
=
parse
::
new_parse_sess_special_handler
(
span_diagnostic_handler
,
...
...
src/librustc/driver/session.rs
浏览文件 @
3aefb964
...
...
@@ -192,7 +192,7 @@ pub struct Session_ {
// For a library crate, this is always none
entry_fn
:
@
mut
Option
<
(
NodeId
,
codemap
::
span
)
>
,
entry_type
:
@
mut
Option
<
EntryFnType
>
,
span_diagnostic
:
@
diagnostic
::
span_handler
,
span_diagnostic
:
@
mut
diagnostic
::
span_handler
,
filesearch
:
@
filesearch
::
FileSearch
,
building_library
:
@
mut
bool
,
working_dir
:
Path
,
...
...
@@ -261,7 +261,7 @@ pub fn add_lint(@self,
pub
fn
next_node_id
(
@
self
)
->
ast
::
NodeId
{
return
syntax
::
parse
::
next_node_id
(
self
.parse_sess
);
}
pub
fn
diagnostic
(
@
self
)
->
@
diagnostic
::
span_handler
{
pub
fn
diagnostic
(
@
self
)
->
@
mut
diagnostic
::
span_handler
{
self
.span_diagnostic
}
pub
fn
debugging_opt
(
@
self
,
opt
:
uint
)
->
bool
{
...
...
src/librustc/metadata/creader.rs
浏览文件 @
3aefb964
...
...
@@ -29,7 +29,7 @@
// Traverses an AST, reading all the information about use'd crates and extern
// libraries necessary for later resolving, typechecking, linking, etc.
pub
fn
read_crates
(
diag
:
@
span_handler
,
pub
fn
read_crates
(
diag
:
@
mut
span_handler
,
crate
:
&
ast
::
Crate
,
cstore
:
@
mut
cstore
::
CStore
,
filesearch
:
@
FileSearch
,
...
...
@@ -74,7 +74,7 @@ fn dump_crates(crate_cache: &[cache_entry]) {
}
fn
warn_if_multiple_versions
(
e
:
@
mut
Env
,
diag
:
@
span_handler
,
diag
:
@
mut
span_handler
,
crate_cache
:
&
[
cache_entry
])
{
use
std
::
either
::
*
;
...
...
@@ -113,7 +113,7 @@ fn warn_if_multiple_versions(e: @mut Env,
}
struct
Env
{
diag
:
@
span_handler
,
diag
:
@
mut
span_handler
,
filesearch
:
@
FileSearch
,
cstore
:
@
mut
cstore
::
CStore
,
os
:
loader
::
os
,
...
...
src/librustc/metadata/encoder.rs
浏览文件 @
3aefb964
...
...
@@ -55,7 +55,7 @@
ii
:
ast
::
inlined_item
);
pub
struct
EncodeParams
<
'self
>
{
diag
:
@
span_handler
,
diag
:
@
mut
span_handler
,
tcx
:
ty
::
ctxt
,
reexports2
:
middle
::
resolve
::
ExportMap2
,
item_symbols
:
&
'self
HashMap
<
ast
::
NodeId
,
~
str
>
,
...
...
@@ -82,7 +82,7 @@ struct Stats {
}
pub
struct
EncodeContext
<
'self
>
{
diag
:
@
span_handler
,
diag
:
@
mut
span_handler
,
tcx
:
ty
::
ctxt
,
stats
:
@
mut
Stats
,
reexports2
:
middle
::
resolve
::
ExportMap2
,
...
...
src/librustc/metadata/loader.rs
浏览文件 @
3aefb964
...
...
@@ -43,7 +43,7 @@ pub enum os {
}
pub
struct
Context
{
diag
:
@
span_handler
,
diag
:
@
mut
span_handler
,
filesearch
:
@
FileSearch
,
span
:
span
,
ident
:
@
str
,
...
...
@@ -163,7 +163,7 @@ pub fn package_id_from_metas(metas: &[@ast::MetaItem]) -> Option<@str> {
}
pub
fn
note_linkage_attrs
(
intr
:
@
ident_interner
,
diag
:
@
span_handler
,
diag
:
@
mut
span_handler
,
attrs
:
~
[
ast
::
Attribute
])
{
let
r
=
attr
::
find_linkage_metas
(
attrs
);
for
mi
in
r
.iter
()
{
...
...
src/librustc/metadata/tyencode.rs
浏览文件 @
3aefb964
...
...
@@ -25,7 +25,7 @@
use
syntax
::
print
::
pprust
::
*
;
pub
struct
ctxt
{
diag
:
@
span_handler
,
diag
:
@
mut
span_handler
,
// Def -> str Callback:
ds
:
@
fn
(
def_id
)
->
~
str
,
// The type context.
...
...
src/librustc/middle/lint.rs
浏览文件 @
3aefb964
...
...
@@ -301,7 +301,7 @@ enum AnyVisitor {
// recursive call can use the original visitor's method, although the
// recursing visitor supplied to the method is the item stopping visitor.
OldVisitor
(
oldvisit
::
vt
<@
mut
Context
>
,
oldvisit
::
vt
<@
mut
Context
>
),
NewVisitor
(
@
visit
::
Visitor
<
()
>
),
NewVisitor
(
@
mut
visit
::
Visitor
<
()
>
),
}
struct
Context
{
...
...
@@ -465,7 +465,7 @@ fn add_oldvisit_lint(&mut self, v: oldvisit::vt<@mut Context>) {
self
.visitors
.push
(
OldVisitor
(
v
,
item_stopping_visitor
(
v
)));
}
fn
add_lint
(
&
mut
self
,
v
:
@
visit
::
Visitor
<
()
>
)
{
fn
add_lint
(
&
mut
self
,
v
:
@
mut
visit
::
Visitor
<
()
>
)
{
self
.visitors
.push
(
NewVisitor
(
v
));
}
...
...
@@ -989,7 +989,7 @@ fn visit_fn_decl(cx: &Context, fd: &ast::fn_decl) {
})
}
fn
lint_session
(
cx
:
@
mut
Context
)
->
@
visit
::
Visitor
<
()
>
{
fn
lint_session
(
cx
:
@
mut
Context
)
->
@
mut
visit
::
Visitor
<
()
>
{
ast_util
::
id_visitor
(|
id
|
{
match
cx
.tcx.sess.lints
.pop
(
&
id
)
{
None
=>
{},
...
...
src/librustc/middle/ty.rs
浏览文件 @
3aefb964
...
...
@@ -226,13 +226,16 @@ pub enum AutoRef {
AutoBorrowFn
(
Region
),
/// Convert from T to *T
AutoUnsafe
(
ast
::
mutability
)
AutoUnsafe
(
ast
::
mutability
),
/// Convert from @Trait/~Trait/&Trait to &Trait
AutoBorrowObj
(
Region
,
ast
::
mutability
),
}
pub
type
ctxt
=
@
ctxt_
;
struct
ctxt_
{
diag
:
@
syntax
::
diagnostic
::
span_handler
,
diag
:
@
mut
syntax
::
diagnostic
::
span_handler
,
interner
:
@
mut
HashMap
<
intern_key
,
~
t_box_
>
,
next_id
:
@
mut
uint
,
cstore
:
@
mut
metadata
::
cstore
::
CStore
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录