Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
c245d9e9
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,发现更多精彩内容 >>
提交
c245d9e9
编写于
3月 07, 2012
作者:
P
Patrick Walton
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "stdlib: Stop incurring vtable dispatch costs when hashmaps are used"
This reverts commit
f0250a23
.
上级
f0250a23
变更
49
显示空白变更内容
内联
并排
Showing
49 changed file
with
47 addition
and
95 deletion
+47
-95
src/cargo/cargo.rs
src/cargo/cargo.rs
+0
-1
src/libstd/json.rs
src/libstd/json.rs
+1
-2
src/libstd/map.rs
src/libstd/map.rs
+26
-28
src/libstd/uv.rs
src/libstd/uv.rs
+6
-7
src/rustc/back/link.rs
src/rustc/back/link.rs
+0
-1
src/rustc/back/rpath.rs
src/rustc/back/rpath.rs
+0
-1
src/rustc/front/attr.rs
src/rustc/front/attr.rs
+0
-1
src/rustc/lib/llvm.rs
src/rustc/lib/llvm.rs
+0
-1
src/rustc/metadata/astencode.rs
src/rustc/metadata/astencode.rs
+3
-3
src/rustc/metadata/csearch.rs
src/rustc/metadata/csearch.rs
+0
-1
src/rustc/metadata/cstore.rs
src/rustc/metadata/cstore.rs
+0
-1
src/rustc/metadata/decoder.rs
src/rustc/metadata/decoder.rs
+0
-1
src/rustc/metadata/encoder.rs
src/rustc/metadata/encoder.rs
+0
-1
src/rustc/metadata/reachable.rs
src/rustc/metadata/reachable.rs
+1
-2
src/rustc/metadata/tydecode.rs
src/rustc/metadata/tydecode.rs
+0
-1
src/rustc/middle/alias.rs
src/rustc/middle/alias.rs
+0
-1
src/rustc/middle/ast_map.rs
src/rustc/middle/ast_map.rs
+1
-2
src/rustc/middle/capture.rs
src/rustc/middle/capture.rs
+0
-1
src/rustc/middle/check_alt.rs
src/rustc/middle/check_alt.rs
+0
-1
src/rustc/middle/check_const.rs
src/rustc/middle/check_const.rs
+0
-1
src/rustc/middle/fn_usage.rs
src/rustc/middle/fn_usage.rs
+0
-1
src/rustc/middle/kind.rs
src/rustc/middle/kind.rs
+0
-1
src/rustc/middle/last_use.rs
src/rustc/middle/last_use.rs
+0
-1
src/rustc/middle/lint.rs
src/rustc/middle/lint.rs
+0
-1
src/rustc/middle/mutbl.rs
src/rustc/middle/mutbl.rs
+0
-1
src/rustc/middle/pat_util.rs
src/rustc/middle/pat_util.rs
+0
-1
src/rustc/middle/trans/alt.rs
src/rustc/middle/trans/alt.rs
+0
-1
src/rustc/middle/trans/closure.rs
src/rustc/middle/trans/closure.rs
+0
-1
src/rustc/middle/trans/impl.rs
src/rustc/middle/trans/impl.rs
+0
-1
src/rustc/middle/trans/native.rs
src/rustc/middle/trans/native.rs
+1
-2
src/rustc/middle/trans/type_of.rs
src/rustc/middle/trans/type_of.rs
+0
-1
src/rustc/middle/tstate/auxiliary.rs
src/rustc/middle/tstate/auxiliary.rs
+1
-1
src/rustc/middle/tstate/bitvectors.rs
src/rustc/middle/tstate/bitvectors.rs
+0
-1
src/rustc/middle/tstate/ck.rs
src/rustc/middle/tstate/ck.rs
+0
-1
src/rustc/middle/tstate/collect_locals.rs
src/rustc/middle/tstate/collect_locals.rs
+0
-1
src/rustc/middle/tstate/pre_post_conditions.rs
src/rustc/middle/tstate/pre_post_conditions.rs
+0
-1
src/rustc/middle/tstate/states.rs
src/rustc/middle/tstate/states.rs
+0
-1
src/rustdoc/astsrv.rs
src/rustdoc/astsrv.rs
+0
-1
src/rustdoc/attr_pass.rs
src/rustdoc/attr_pass.rs
+1
-2
src/rustdoc/prune_unexported_pass.rs
src/rustdoc/prune_unexported_pass.rs
+1
-2
src/rustdoc/reexport_pass.rs
src/rustdoc/reexport_pass.rs
+0
-1
src/rustdoc/tystr_pass.rs
src/rustdoc/tystr_pass.rs
+0
-1
src/serializer/serializer.rs
src/serializer/serializer.rs
+2
-2
src/test/bench/shootout-mandelbrot.rs
src/test/bench/shootout-mandelbrot.rs
+0
-1
src/test/bench/task-perf-word-count.rs
src/test/bench/task-perf-word-count.rs
+0
-1
src/test/compile-fail/map-types.rs
src/test/compile-fail/map-types.rs
+2
-4
src/test/run-fail/unwind-misc-1.rs
src/test/run-fail/unwind-misc-1.rs
+1
-2
src/test/run-pass/hashmap-memory.rs
src/test/run-pass/hashmap-memory.rs
+0
-1
src/test/run-pass/issue-1696.rs
src/test/run-pass/issue-1696.rs
+0
-1
未找到文件。
src/cargo/cargo.rs
浏览文件 @
c245d9e9
...
...
@@ -16,7 +16,6 @@
import
std
::
json
;
import
result
;
import
std
::
map
;
import
std
::
map
::
hashmap
;
import
std
::
os
;
import
std
::
run
;
import
str
;
...
...
src/libstd/json.rs
浏览文件 @
c245d9e9
...
...
@@ -5,7 +5,6 @@
import
io
;
import
io
::{
reader_util
,
writer_util
};
import
map
;
import
map
::
hashmap
;
export
json
;
export
error
;
...
...
@@ -37,7 +36,7 @@ enum json {
/* Variant: list */
list
([
json
]),
/* Variant: dict */
dict
(
map
::
hash
map
<
str
,
json
>
),
dict
(
map
::
map
<
str
,
json
>
),
/* Variant: null */
null
,
}
...
...
src/libstd/map.rs
浏览文件 @
c245d9e9
...
...
@@ -4,10 +4,6 @@
A map type
*/
import
chained
::
hashmap
;
export
hashmap
,
hashfn
,
eqfn
,
set
,
map
,
chained
,
mk_hashmap
,
new_str_hash
;
export
new_bytes_hash
,
new_int_hash
,
new_uint_hash
,
set_add
;
/* Section: Types */
/*
...
...
@@ -27,13 +23,14 @@
type
eqfn
<
K
>
=
fn
@
(
K
,
K
)
->
bool
;
/*
Type: set
Type:
hash
set
A convenience type to treat a
hash
map as a set
A convenience type to treat a map as a set
*/
type
set
<
K
>
=
hash
map
<
K
,
()
>
;
type
set
<
K
>
=
map
<
K
,
()
>
;
type
hashmap
<
K
,
V
>
=
chained
::
t
<
K
,
V
>
;
// Temporary alias to make migration easier
type
hashmap
<
K
,
V
>
=
map
<
K
,
V
>
;
/*
IFace: map
...
...
@@ -106,7 +103,8 @@
}
// FIXME: package this up and export it as a datatype usable for
// external code that doesn't want to pay the cost of a box.
// external code that doesn't want to pay the cost of a box and vtable
// lookups.
mod
chained
{
type
entry
<
K
,
V
>
=
{
hash
:
uint
,
...
...
@@ -120,8 +118,8 @@ enum chain<K, V> {
absent
}
type
t
<
K
,
V
>
=
@
{
mutable
count
:
uint
,
type
t
<
K
,
V
>
=
{
mutable
size
:
uint
,
mutable
chains
:
[
mutable
chain
<
K
,
V
>
],
hasher
:
hashfn
<
K
>
,
eqer
:
eqfn
<
K
>
...
...
@@ -187,7 +185,7 @@ fn insert<K: copy, V: copy>(tbl: t<K,V>, k: K, v: V) -> bool {
let
hash
=
tbl
.hasher
(
k
);
alt
search_tbl
(
tbl
,
k
,
hash
)
{
not_found
{
tbl
.
count
+=
1u
;
tbl
.
size
+=
1u
;
let
idx
=
hash
%
vec
::
len
(
tbl
.chains
);
let
old_chain
=
tbl
.chains
[
idx
];
tbl
.chains
[
idx
]
=
present
(
@
{
...
...
@@ -231,13 +229,13 @@ fn remove<K: copy, V: copy>(tbl: t<K,V>, k: K) -> core::option<V> {
}
found_first
(
idx
,
entry
)
{
tbl
.
count
-=
1u
;
tbl
.
size
-=
1u
;
tbl
.chains
[
idx
]
=
entry
.next
;
ret
core
::
option
::
some
(
entry
.value
);
}
found_after
(
eprev
,
entry
)
{
tbl
.
count
-=
1u
;
tbl
.
size
-=
1u
;
eprev
.next
=
entry
.next
;
ret
core
::
option
::
some
(
entry
.value
);
}
...
...
@@ -293,12 +291,12 @@ fn items<K: copy, V: copy>(tbl: t<K,V>, blk: fn(K,V)) {
}
}
impl
hashmap
<
K
:
copy
,
V
:
copy
>
of
map
<
K
,
V
>
for
t
<
K
,
V
>
{
fn
size
()
->
uint
{
self
.
count
}
impl
<
K
:
copy
,
V
:
copy
>
of
map
<
K
,
V
>
for
t
<
K
,
V
>
{
fn
size
()
->
uint
{
self
.
size
}
fn
insert
(
k
:
K
,
v
:
V
)
->
bool
{
let
nchains
=
vec
::
len
(
self
.chains
);
let
load
=
{
num
:
(
self
.
count
+
1u
)
as
int
,
den
:
nchains
as
int
};
let
load
=
{
num
:
(
self
.
size
+
1u
)
as
int
,
den
:
nchains
as
int
};
// Structural consts would be nice. This is a const 3/4
// load factor that we compare against.
if
!
util
::
rational_leq
(
load
,
{
num
:
3
,
den
:
4
})
{
rehash
(
self
);
}
...
...
@@ -320,13 +318,13 @@ fn keys(blk: fn(K)) { items(self) { |k, _v| blk(k) } }
fn
values
(
blk
:
fn
(
V
))
{
items
(
self
)
{
|
_
k
,
v
|
blk
(
v
)
}
}
}
fn
mk
<
K
:
copy
,
V
:
copy
>
(
hasher
:
hashfn
<
K
>
,
eqer
:
eqfn
<
K
>
)
->
t
<
K
,
V
>
{
fn
mk
<
K
:
copy
,
V
:
copy
>
(
hasher
:
hashfn
<
K
>
,
eqer
:
eqfn
<
K
>
)
->
map
<
K
,
V
>
{
let
initial_capacity
:
uint
=
32u
;
// 2^5
let
slf
:
t
<
K
,
V
>
=
@
{
mutable
count
:
0u
,
let
slf
:
t
<
K
,
V
>
=
{
mutable
size
:
0u
,
mutable
chains
:
chains
(
initial_capacity
),
hasher
:
hasher
,
eqer
:
eqer
};
slf
slf
as
map
::
<
K
,
V
>
}
}
...
...
@@ -341,7 +339,7 @@ fn mk<K: copy, V: copy>(hasher: hashfn<K>, eqer: eqfn<K>) -> t<K,V> {
eqer - The equality function for key type K
*/
fn
mk_hashmap
<
K
:
copy
,
V
:
copy
>
(
hasher
:
hashfn
<
K
>
,
eqer
:
eqfn
<
K
>
)
->
hash
map
<
K
,
V
>
{
->
map
<
K
,
V
>
{
chained
::
mk
(
hasher
,
eqer
)
}
...
...
@@ -350,7 +348,7 @@ fn mk_hashmap<K: copy, V: copy>(hasher: hashfn<K>, eqer: eqfn<K>)
Construct a hashmap for string keys
*/
fn
new_str_hash
<
V
:
copy
>
()
->
hash
map
<
str
,
V
>
{
fn
new_str_hash
<
V
:
copy
>
()
->
map
<
str
,
V
>
{
ret
mk_hashmap
(
str
::
hash
,
str
::
eq
);
}
...
...
@@ -359,7 +357,7 @@ fn new_str_hash<V: copy>() -> hashmap<str, V> {
Construct a hashmap for byte string keys
*/
fn
new_bytes_hash
<
V
:
copy
>
()
->
hash
map
<
[
u8
],
V
>
{
fn
new_bytes_hash
<
V
:
copy
>
()
->
map
<
[
u8
],
V
>
{
ret
mk_hashmap
(
vec
::
u8
::
hash
,
vec
::
u8
::
eq
);
}
...
...
@@ -368,7 +366,7 @@ fn new_bytes_hash<V: copy>() -> hashmap<[u8], V> {
Construct a hashmap for int keys
*/
fn
new_int_hash
<
V
:
copy
>
()
->
hash
map
<
int
,
V
>
{
fn
new_int_hash
<
V
:
copy
>
()
->
map
<
int
,
V
>
{
fn
hash_int
(
&&
x
:
int
)
->
uint
{
int
::
hash
(
x
)
}
fn
eq_int
(
&&
a
:
int
,
&&
b
:
int
)
->
bool
{
ret
a
==
b
;
}
ret
mk_hashmap
(
hash_int
,
eq_int
);
...
...
@@ -379,7 +377,7 @@ fn hash_int(&&x: int) -> uint { int::hash(x) }
Construct a hashmap for uint keys
*/
fn
new_uint_hash
<
V
:
copy
>
()
->
hash
map
<
uint
,
V
>
{
fn
new_uint_hash
<
V
:
copy
>
()
->
map
<
uint
,
V
>
{
fn
hash_uint
(
&&
x
:
uint
)
->
uint
{
uint
::
hash
(
x
)
}
fn
eq_uint
(
&&
a
:
uint
,
&&
b
:
uint
)
->
bool
{
ret
a
==
b
;
}
ret
mk_hashmap
(
hash_uint
,
eq_uint
);
...
...
src/libstd/uv.rs
浏览文件 @
c245d9e9
import
map
::
hashmap
;
export
loop_new
,
loop_delete
,
run
,
close
,
run_in_bg
;
export
async_init
,
async_send
;
export
timer_init
,
timer_start
,
timer_stop
;
...
...
@@ -130,17 +129,17 @@ fn loop_new() -> uv_loop unsafe {
process_operation
);
// all state goes here
let
handles
:
map
::
hash
map
<
[
u8
],
*
ctypes
::
void
>
=
let
handles
:
map
::
map
<
[
u8
],
*
ctypes
::
void
>
=
map
::
new_bytes_hash
();
let
id_to_handle
:
map
::
hash
map
<
[
u8
],
uv_handle
>
=
let
id_to_handle
:
map
::
map
<
[
u8
],
uv_handle
>
=
map
::
new_bytes_hash
();
let
after_cbs
:
map
::
hash
map
<
[
u8
],
fn
~
(
uv_handle
)
>
=
let
after_cbs
:
map
::
map
<
[
u8
],
fn
~
(
uv_handle
)
>
=
map
::
new_bytes_hash
();
let
close_callbacks
:
map
::
hash
map
<
[
u8
],
fn
~
()
>
=
let
close_callbacks
:
map
::
map
<
[
u8
],
fn
~
()
>
=
map
::
new_bytes_hash
();
let
async_cbs
:
map
::
hash
map
<
[
u8
],
fn
~
(
uv_handle
)
>
=
let
async_cbs
:
map
::
map
<
[
u8
],
fn
~
(
uv_handle
)
>
=
map
::
new_bytes_hash
();
let
timer_cbs
:
map
::
hash
map
<
[
u8
],
fn
~
(
uv_handle
)
>
=
let
timer_cbs
:
map
::
map
<
[
u8
],
fn
~
(
uv_handle
)
>
=
map
::
new_bytes_hash
();
// the main loop that this task blocks on.
...
...
src/rustc/back/link.rs
浏览文件 @
c245d9e9
...
...
@@ -7,7 +7,6 @@
import
metadata
::{
encoder
,
cstore
};
import
middle
::
trans
::
common
::
crate_ctxt
;
import
std
::
fs
;
import
std
::
map
::
hashmap
;
import
std
::
run
;
import
std
::
sha1
::
sha1
;
import
syntax
::
ast
;
...
...
src/rustc/back/rpath.rs
浏览文件 @
c245d9e9
import
std
::{
os
,
fs
,
os_fs
,
map
};
import
std
::
map
::
hashmap
;
import
metadata
::
cstore
;
import
driver
::
session
;
import
util
::
filesearch
;
...
...
src/rustc/front/attr.rs
浏览文件 @
c245d9e9
// Functions dealing with attributes and meta_items
import
std
::
map
;
import
std
::
map
::
hashmap
;
import
syntax
::{
ast
,
ast_util
};
import
driver
::
session
::
session
;
...
...
src/rustc/lib/llvm.rs
浏览文件 @
c245d9e9
import
str
::
sbuf
;
import
std
::
map
::
hashmap
;
import
ctypes
::{
c_int
,
c_uint
,
unsigned
,
longlong
,
ulonglong
};
...
...
src/rustc/metadata/astencode.rs
浏览文件 @
c245d9e9
...
...
@@ -4,15 +4,15 @@
import
syntax
::
ast_util
;
import
syntax
::
ast_util
::
inlined_item_methods
;
import
syntax
::
codemap
::
span
;
import
std
::
map
::
map
;
import
std
::
smallintmap
::
map
;
import
std
::
ebml
;
import
std
::
ebml
::
writer
;
import
std
::
map
::
hashmap
;
import
std
::
serialization
;
import
std
::
serialization
::
serializer
;
import
std
::
serialization
::
deserializer
;
import
std
::
serialization
::
serializer_helpers
;
import
std
::
serialization
::
deserializer_helpers
;
import
std
::
smallintmap
::
map
;
import
middle
::
trans
::
common
::
maps
;
import
middle
::{
ty
,
typeck
,
last_use
,
ast_map
};
import
middle
::
typeck
::
method_origin
;
...
...
src/rustc/metadata/csearch.rs
浏览文件 @
c245d9e9
...
...
@@ -6,7 +6,6 @@
import
option
::{
some
,
none
};
import
driver
::
session
;
import
middle
::
trans
::
common
::
maps
;
import
std
::
map
::
hashmap
;
export
get_symbol
;
export
get_type_param_count
;
...
...
src/rustc/metadata/cstore.rs
浏览文件 @
c245d9e9
...
...
@@ -2,7 +2,6 @@
// crates and libraries
import
std
::
map
;
import
std
::
map
::
hashmap
;
import
syntax
::
ast
;
import
util
::
common
::
*
;
...
...
src/rustc/metadata/decoder.rs
浏览文件 @
c245d9e9
// Decoding metadata from a single crate's metadata
import
std
::{
ebml
,
map
,
io
};
import
std
::
map
::
hashmap
;
import
io
::
writer_util
;
import
syntax
::{
ast
,
ast_util
};
import
driver
::
session
::
session
;
...
...
src/rustc/metadata/encoder.rs
浏览文件 @
c245d9e9
// Metadata encoding
import
std
::{
io
,
ebml
,
map
,
list
};
import
std
::
map
::
hashmap
;
import
io
::
writer_util
;
import
ebml
::
writer
;
import
syntax
::
ast
::
*
;
...
...
src/rustc/metadata/reachable.rs
浏览文件 @
c245d9e9
...
...
@@ -10,11 +10,10 @@
import
syntax
::
visit
;
import
syntax
::
ast_util
::
def_id_of_def
;
import
front
::
attr
;
import
std
::
map
::
hashmap
;
export
map
,
find_reachable
;
type
map
=
std
::
map
::
hash
map
<
node_id
,
()
>
;
type
map
=
std
::
map
::
map
<
node_id
,
()
>
;
type
ctx
=
{
ccx
:
middle
::
trans
::
common
::
crate_ctxt
,
rmap
:
map
};
...
...
src/rustc/metadata/tydecode.rs
浏览文件 @
c245d9e9
...
...
@@ -5,7 +5,6 @@
import
syntax
::
ast_util
;
import
syntax
::
ast_util
::
respan
;
import
middle
::
ty
;
import
std
::
map
::
hashmap
;
export
parse_ty_data
,
parse_def_id
;
export
parse_bounds_data
;
...
...
src/rustc/middle/alias.rs
浏览文件 @
c245d9e9
...
...
@@ -5,7 +5,6 @@
import
syntax
::
visit
;
import
visit
::
vt
;
import
std
::
list
;
import
std
::
map
::
hashmap
;
import
std
::
util
::
unreachable
;
import
option
::
is_none
;
import
list
::
list
;
...
...
src/rustc/middle/ast_map.rs
浏览文件 @
c245d9e9
import
std
::
map
;
import
std
::
map
::
hashmap
;
import
syntax
::
ast
::
*
;
import
syntax
::
ast_util
;
import
syntax
::
ast_util
::
inlined_item_methods
;
...
...
@@ -36,7 +35,7 @@ enum ast_node {
node_res_ctor
(
@
item
),
}
type
map
=
std
::
map
::
hash
map
<
node_id
,
ast_node
>
;
type
map
=
std
::
map
::
map
<
node_id
,
ast_node
>
;
type
ctx
=
{
map
:
map
,
mutable
path
:
path
,
mutable
local_id
:
uint
};
type
vt
=
visit
::
vt
<
ctx
>
;
...
...
src/rustc/middle/capture.rs
浏览文件 @
c245d9e9
import
syntax
::{
ast
,
ast_util
};
import
driver
::
session
::
session
;
import
std
::
map
;
import
std
::
map
::
hashmap
;
export
capture_mode
;
export
capture_var
;
...
...
src/rustc/middle/check_alt.rs
浏览文件 @
c245d9e9
...
...
@@ -8,7 +8,6 @@
import
driver
::
session
::
session
;
import
middle
::
ty
;
import
middle
::
ty
::
*
;
import
std
::
map
::
hashmap
;
fn
check_crate
(
tcx
:
ty
::
ctxt
,
crate
:
@
crate
)
{
visit
::
visit_crate
(
*
crate
,
(),
visit
::
mk_vt
(
@
{
...
...
src/rustc/middle/check_const.rs
浏览文件 @
c245d9e9
import
syntax
::
ast
::
*
;
import
syntax
::{
visit
,
ast_util
};
import
driver
::
session
::
session
;
import
std
::
map
::
hashmap
;
fn
check_crate
(
sess
:
session
,
crate
:
@
crate
,
method_map
:
typeck
::
method_map
)
{
visit
::
visit_crate
(
*
crate
,
false
,
visit
::
mk_vt
(
@
{
...
...
src/rustc/middle/fn_usage.rs
浏览文件 @
c245d9e9
import
std
::
map
::
hashmap
;
import
syntax
::
ast
;
import
syntax
::
visit
;
import
syntax
::
print
::
pprust
::
expr_to_str
;
...
...
src/rustc/middle/kind.rs
浏览文件 @
c245d9e9
...
...
@@ -3,7 +3,6 @@
import
syntax
::
codemap
::
span
;
import
ty
::{
kind
,
kind_copyable
,
kind_sendable
,
kind_noncopyable
};
import
driver
::
session
::
session
;
import
std
::
map
::
hashmap
;
// Kind analysis pass. There are three kinds:
//
...
...
src/rustc/middle/last_use.rs
浏览文件 @
c245d9e9
...
...
@@ -4,7 +4,6 @@
import
std
::
list
::{
is_not_empty
,
list
,
nil
,
cons
,
tail
};
import
std
::
util
::
unreachable
;
import
std
::
list
;
import
std
::
map
::
hashmap
;
// Last use analysis pass.
//
...
...
src/rustc/middle/lint.rs
浏览文件 @
c245d9e9
...
...
@@ -3,7 +3,6 @@
import
syntax
::{
ast
,
visit
};
import
front
::
attr
;
import
std
::
io
;
import
std
::
map
::
hashmap
;
import
io
::
writer_util
;
enum
option
{
...
...
src/rustc/middle/mutbl.rs
浏览文件 @
c245d9e9
...
...
@@ -2,7 +2,6 @@
import
syntax
::
visit
;
import
syntax
::
ast_util
;
import
driver
::
session
::
session
;
import
std
::
map
::
hashmap
;
enum
deref_t
{
unbox
(
bool
),
field
,
index
,
}
...
...
src/rustc/middle/pat_util.rs
浏览文件 @
c245d9e9
...
...
@@ -4,7 +4,6 @@
import
syntax
::
fold
;
import
syntax
::
fold
::
*
;
import
syntax
::
codemap
::
span
;
import
std
::
map
::
hashmap
;
export
walk_pat
;
export
pat_binding_ids
,
pat_bindings
,
pat_id_map
;
...
...
src/rustc/middle/trans/alt.rs
浏览文件 @
c245d9e9
...
...
@@ -12,7 +12,6 @@
import
syntax
::
print
::
pprust
::
pat_to_str
;
import
back
::
abi
;
import
resolve
::
def_map
;
import
std
::
map
::
hashmap
;
import
common
::
*
;
...
...
src/rustc/middle/trans/closure.rs
浏览文件 @
c245d9e9
...
...
@@ -18,7 +18,6 @@
import
shape
::{
size_of
};
import
ast_map
::{
path
,
path_mod
,
path_name
};
import
driver
::
session
::
session
;
import
std
::
map
::
hashmap
;
// ___Good to know (tm)__________________________________________________
//
...
...
src/rustc/middle/trans/impl.rs
浏览文件 @
c245d9e9
...
...
@@ -11,7 +11,6 @@
import
lib
::
llvm
::{
ValueRef
,
TypeRef
};
import
lib
::
llvm
::
llvm
::
LLVMGetParam
;
import
ast_map
::{
path
,
path_mod
,
path_name
};
import
std
::
map
::
hashmap
;
// Translation functionality related to impls and ifaces
//
...
...
src/rustc/middle/trans/native.rs
浏览文件 @
c245d9e9
...
...
@@ -9,7 +9,6 @@
import
build
::
*
;
import
base
::
*
;
import
type_of
::
*
;
import
std
::
map
::
hashmap
;
export
link_name
,
trans_native_mod
,
register_crust_fn
,
trans_crust_fn
;
...
...
src/rustc/middle/trans/type_of.rs
浏览文件 @
c245d9e9
...
...
@@ -3,7 +3,6 @@
import
syntax
::
ast
;
import
lib
::
llvm
::
llvm
;
import
driver
::
session
::
session
;
import
std
::
map
::
hashmap
;
import
ty
::
*
;
...
...
src/rustc/middle/tstate/auxiliary.rs
浏览文件 @
c245d9e9
...
...
@@ -4,7 +4,7 @@
import
syntax
::
ast_util
::
*
;
import
syntax
::{
visit
,
codemap
};
import
codemap
::
span
;
import
std
::
map
::{
hashmap
,
new_int_hash
};
import
std
::
map
::{
new_int_hash
};
import
syntax
::
print
::
pprust
::
path_to_str
;
import
tstate
::
ann
::{
pre_and_post
,
pre_and_post_state
,
empty_ann
,
prestate
,
poststate
,
precond
,
postcond
,
...
...
src/rustc/middle/tstate/bitvectors.rs
浏览文件 @
c245d9e9
...
...
@@ -12,7 +12,6 @@
import
tritv
::
*
;
import
util
::
common
::
*
;
import
driver
::
session
::
session
;
import
std
::
map
::
hashmap
;
fn
bit_num
(
fcx
:
fn_ctxt
,
c
:
tsconstr
)
->
uint
{
let
d
=
tsconstr_to_def_id
(
c
);
...
...
src/rustc/middle/tstate/ck.rs
浏览文件 @
c245d9e9
...
...
@@ -14,7 +14,6 @@
import
pre_post_conditions
::
fn_pre_post
;
import
states
::
find_pre_post_state_fn
;
import
driver
::
session
::
session
;
import
std
::
map
::
hashmap
;
fn
check_unused_vars
(
fcx
:
fn_ctxt
)
{
...
...
src/rustc/middle/tstate/collect_locals.rs
浏览文件 @
c245d9e9
...
...
@@ -8,7 +8,6 @@
import
syntax
::
ast_util
::
respan
;
import
driver
::
session
::
session
;
import
aux
::
*
;
import
std
::
map
::
hashmap
;
type
ctxt
=
{
cs
:
@
mutable
[
sp_constr
],
tcx
:
ty
::
ctxt
};
...
...
src/rustc/middle/tstate/pre_post_conditions.rs
浏览文件 @
c245d9e9
...
...
@@ -13,7 +13,6 @@
has_nonlocal_exits
,
log_stmt
};
import
syntax
::
codemap
::
span
;
import
driver
::
session
::
session
;
import
std
::
map
::
hashmap
;
fn
find_pre_post_mod
(
_
m
:
_
mod
)
->
_
mod
{
#
debug
(
"implement find_pre_post_mod!"
);
...
...
src/rustc/middle/tstate/states.rs
浏览文件 @
c245d9e9
...
...
@@ -10,7 +10,6 @@
import
middle
::
ty
::{
expr_ty
,
type_is_bot
};
import
util
::
common
::
*
;
import
driver
::
session
::
session
;
import
std
::
map
::
hashmap
;
fn
forbid_upvar
(
fcx
:
fn_ctxt
,
rhs_id
:
node_id
,
sp
:
span
,
t
:
oper_type
)
{
alt
t
{
...
...
src/rustdoc/astsrv.rs
浏览文件 @
c245d9e9
...
...
@@ -7,7 +7,6 @@
Rustdoc from its non-sendableness."
)]
;
import
std
::
map
::
hashmap
;
import
rustc
::
driver
::
session
;
import
rustc
::
driver
::
driver
;
import
rustc
::
driver
::
diagnostic
;
...
...
src/rustdoc/attr_pass.rs
浏览文件 @
c245d9e9
...
...
@@ -8,7 +8,6 @@
import
rustc
::
syntax
::
ast
;
import
rustc
::
middle
::
ast_map
;
import
std
::
map
::
hashmap
;
export
mk_pass
;
...
...
src/rustdoc/prune_unexported_pass.rs
浏览文件 @
c245d9e9
...
...
@@ -3,7 +3,6 @@
import
rustc
::
syntax
::
ast
;
import
rustc
::
syntax
::
ast_util
;
import
rustc
::
middle
::
ast_map
;
import
std
::
map
::
hashmap
;
export
mk_pass
;
...
...
src/rustdoc/reexport_pass.rs
浏览文件 @
c245d9e9
#[doc
=
"Finds docs for reexported items and duplicates them"
]
;
import
std
::
map
;
import
std
::
map
::
hashmap
;
import
rustc
::
syntax
::
ast
;
import
rustc
::
syntax
::
ast_util
;
import
rustc
::
util
::
common
;
...
...
src/rustdoc/tystr_pass.rs
浏览文件 @
c245d9e9
...
...
@@ -4,7 +4,6 @@
import
rustc
::
syntax
::
ast
;
import
rustc
::
syntax
::
print
::
pprust
;
import
rustc
::
middle
::
ast_map
;
import
std
::
map
::
hashmap
;
export
mk_pass
;
...
...
src/serializer/serializer.rs
浏览文件 @
c245d9e9
...
...
@@ -50,7 +50,7 @@ fn parse(argv: [str]) -> parse_result {
type
ast_ty
=
str
;
type
ast_item
=
str
;
type
tp_map
=
hash
map
<
ast
::
node_id
,
ty
::
t
>
;
type
tp_map
=
map
<
ast
::
node_id
,
ty
::
t
>
;
type
serialize_ctx
=
{
crate
:
@
ast
::
crate
,
...
...
src/test/bench/shootout-mandelbrot.rs
浏览文件 @
c245d9e9
...
...
@@ -14,7 +14,6 @@
use
std
;
import
std
::
io
::
writer_util
;
import
std
::
map
::
hashmap
;
type
cmplx
=
{
re
:
f64
,
im
:
f64
};
type
line
=
{
i
:
uint
,
b
:
[
u8
]};
...
...
src/test/bench/task-perf-word-count.rs
浏览文件 @
c245d9e9
...
...
@@ -13,7 +13,6 @@
import
option
=
option
;
import
option
::{
some
,
none
};
import
std
::{
map
,
io
,
time
};
import
std
::
map
::
hashmap
;
import
io
::
reader_util
;
import
comm
::
chan
;
...
...
src/test/compile-fail/map-types.rs
浏览文件 @
c245d9e9
use
std
;
import
std
::
map
;
import
std
::
map
::
hashmap
;
import
std
::
map
::
map
;
// Test that iface types printed in error msgs include the type arguments.
fn
main
()
{
let
x
:
map
<
str
,
str
>
=
map
::
new_str_hash
::
<
str
>
()
as
map
::
<
str
,
str
>
;
let
y
:
map
<
uint
,
str
>
=
x
;
let
x
:
map
<
uint
,
str
>
=
map
::
new_str_hash
::
<
str
>
();
//!^ ERROR mismatched types: expected `std::map::map<uint,str>`
}
\ No newline at end of file
src/test/run-fail/unwind-misc-1.rs
浏览文件 @
c245d9e9
...
...
@@ -2,7 +2,6 @@
use
std
;
import
std
::
map
;
import
std
::
map
::
hashmap
;
import
uint
;
fn
main
()
{
...
...
src/test/run-pass/hashmap-memory.rs
浏览文件 @
c245d9e9
...
...
@@ -12,7 +12,6 @@
import
str
;
import
vec
;
import
std
::
map
;
import
std
::
map
::
hashmap
;
import
task
;
import
comm
::
chan
;
import
comm
::
port
;
...
...
src/test/run-pass/issue-1696.rs
浏览文件 @
c245d9e9
use
std
;
import
std
::
map
;
import
std
::
map
::
hashmap
;
fn
main
()
{
let
m
=
map
::
new_bytes_hash
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录