Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
588c1eb4
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,发现更多精彩内容 >>
提交
588c1eb4
编写于
6月 22, 2012
作者:
T
Tim Chevalier
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove resources from remaining test cases
上级
21399dca
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
44 addition
and
14 deletion
+44
-14
src/test/auxiliary/issue-2526.rs
src/test/auxiliary/issue-2526.rs
+5
-1
src/test/auxiliary/issue2170lib.rs
src/test/auxiliary/issue2170lib.rs
+4
-2
src/test/auxiliary/test_comm.rs
src/test/auxiliary/test_comm.rs
+1
-2
src/test/bench/task-perf-alloc-unwind.rs
src/test/bench/task-perf-alloc-unwind.rs
+4
-1
src/test/compile-fail/no-send-res-ports.rs
src/test/compile-fail/no-send-res-ports.rs
+6
-2
src/test/compile-fail/regions-in-rsrcs.rs
src/test/compile-fail/regions-in-rsrcs.rs
+24
-6
未找到文件。
src/test/auxiliary/issue-2526.rs
浏览文件 @
588c1eb4
...
...
@@ -7,7 +7,11 @@
export
context
;
resource
arc_destruct
<
T
:
const
>
(
_
data
:
int
)
{
}
class
arc_destruct
<
T
:
const
>
{
let
_
data
:
int
;
new
(
data
:
int
)
{
self
._data
=
data
;
}
drop
{}
}
fn
arc
<
T
:
const
>
(
_
data
:
T
)
->
arc_destruct
<
T
>
{
arc_destruct
(
0
)
...
...
src/test/auxiliary/issue2170lib.rs
浏览文件 @
588c1eb4
...
...
@@ -3,6 +3,8 @@
fn
foo
(
_
x
:
i32
)
{
}
resource
rsrc
(
x
:
i32
)
{
foo
(
x
);
class
rsrc
{
let
x
:
i32
;
new
(
x
:
i32
)
{
self
.x
=
x
;
}
drop
{
foo
(
self
.x
);
}
}
\ No newline at end of file
src/test/auxiliary/test_comm.rs
浏览文件 @
588c1eb4
/*
Minimized version of core::comm (with still-local modifications
to turn a resource into a class) for testing.
Minimized version of core::comm for testing.
Could probably be more minimal.
*/
...
...
src/test/bench/task-perf-alloc-unwind.rs
浏览文件 @
588c1eb4
...
...
@@ -41,7 +41,10 @@ enum st {
})
}
resource
r
(
_
l
:
@
nillist
)
{
class
r
{
let
_
l
:
@
nillist
;
new
(
l
:
@
nillist
)
{
self
._l
=
l
;
}
drop
{}
}
fn
recurse_or_fail
(
depth
:
int
,
st
:
option
<
st
>
)
{
...
...
src/test/compile-fail/no-send-res-ports.rs
浏览文件 @
588c1eb4
fn
main
()
{
resource
foo
(
_
x
:
comm
::
port
<
()
>
)
{}
class
foo
{
let
_
x
:
comm
::
port
<
()
>
;
new
(
x
:
comm
::
port
<
()
>
)
{
self
._x
=
x
;
}
drop
{}
}
let
x
=
~
mut
some
(
foo
(
comm
::
port
()));
task
::
spawn
{|
move
x
|
//! ERROR not a sendable value
...
...
src/test/compile-fail/regions-in-rsrcs.rs
浏览文件 @
588c1eb4
resource
no0
(
x
:
&
uint
)
{
//! ERROR to use region types here, the containing type must be declared with a region bound
class
no0
{
let
x
:
&
uint
;
new
(
x
:
&
uint
)
{
self
.x
=
x
;
}
//! ERROR to use region types here, the containing type must be declared with a region bound
drop
{}
}
resource
no1
(
x
:
&
self
.uint
)
{
//! ERROR to use region types here, the containing type must be declared with a region bound
class
no1
{
let
x
:
&
self
.uint
;
new
(
x
:
&
self
.uint
)
{
self
.x
=
x
;
}
//! ERROR to use region types here, the containing type must be declared with a region bound
drop
{}
}
resource
no2
(
x
:
&
foo
.uint
)
{
//! ERROR named regions other than `self` are not allowed as part of a type declaration
class
no2
{
let
x
:
&
foo
.uint
;
new
(
x
:
&
foo
.uint
)
{
self
.x
=
x
;
}
//! ERROR named regions other than `self` are not allowed as part of a type declaration
drop
{}
}
resource
yes0
/&
(
x
:
&
uint
)
{
class
yes0
/&
{
let
x
:
&
uint
;
new
(
x
:
&
uint
)
{
self
.x
=
x
;
}
drop
{}
}
resource
yes1
/&
(
x
:
&
self
.uint
)
{
class
yes1
/&
{
let
x
:
&
self
.uint
;
new
(
x
:
&
self
.uint
)
{
self
.x
=
x
;
}
drop
{}
}
resource
yes2
/&
(
x
:
&
foo
.uint
)
{
//! ERROR named regions other than `self` are not allowed as part of a type declaration
class
yes2
/&
{
let
x
:
&
foo
.uint
;
new
(
x
:
&
foo
.uint
)
{
self
.x
=
x
;
}
//! ERROR named regions other than `self` are not allowed as part of a type declaration
drop
{}
}
fn
main
()
{}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录