Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
440f8dfc
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,发现更多精彩内容 >>
提交
440f8dfc
编写于
1月 17, 2013
作者:
N
Niko Matsakis
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Correct tests
rs=breakage
上级
532c94d0
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
8 addition
and
18 deletion
+8
-18
src/librustc/middle/liveness.rs
src/librustc/middle/liveness.rs
+1
-1
src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs
src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs
+3
-8
src/test/compile-fail/borrowck-loan-rcvr.rs
src/test/compile-fail/borrowck-loan-rcvr.rs
+3
-8
src/test/compile-fail/liveness-move-from-mode.rs
src/test/compile-fail/liveness-move-from-mode.rs
+1
-1
未找到文件。
src/librustc/middle/liveness.rs
浏览文件 @
440f8dfc
...
...
@@ -1839,7 +1839,7 @@ fn report_illegal_move(move_span: span,
self
.report_illegal_read
(
move_span
,
lnk
,
var
,
MovedValue
);
self
.tcx.sess
.span_note
(
move_span
,
~
"move of va
riabl
e occurred here"
);
move_span
,
~
"move of va
lu
e occurred here"
);
}
...
...
src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs
浏览文件 @
440f8dfc
...
...
@@ -47,16 +47,11 @@ fn b() {
}
fn
c
()
{
// Here the receiver is in aliased memory
and hence we cannot
//
consider it immutable:
// Here the receiver is in aliased memory
but due to write
//
barriers we can still consider it immutable.
let
q
=
@
mut
Point
{
x
:
3
,
y
:
4
};
// ...this is ok for pure fns
*
q
+
3
;
// ...and impure fns
(
*
q
)
.times
(
3
);
q
.times
(
3
);
}
fn
main
()
{
...
...
src/test/compile-fail/borrowck-loan-rcvr.rs
浏览文件 @
440f8dfc
...
...
@@ -55,15 +55,10 @@ fn b() {
}
fn
c
()
{
// Here the receiver is in aliased memory and hence we cannot
// consider it immutable:
// Loaning @mut as & is considered legal due to dynamic checks:
let
q
=
@
mut
{
x
:
3
,
y
:
4
};
// ...this is ok for pure fns
(
*
q
)
.purem
();
// ...and impure fns
(
*
q
)
.impurem
();
q
.purem
();
q
.impurem
();
}
fn
main
()
{
...
...
src/test/compile-fail/liveness-move-from-mode.rs
浏览文件 @
440f8dfc
...
...
@@ -15,6 +15,6 @@ fn main() {
let
x
:
int
=
25
;
loop
{
take
(
move
x
);
//~ ERROR use of moved value: `x`
//~^ NOTE move of va
riabl
e occurred here
//~^ NOTE move of va
lu
e occurred here
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录