Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
890ed5c4
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,发现更多精彩内容 >>
提交
890ed5c4
编写于
3月 30, 2015
作者:
N
Niko Matsakis
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fallout in tests
上级
c4edd0c8
变更
108
展开全部
隐藏空白更改
内联
并排
Showing
108 changed file
with
154 addition
and
142 deletion
+154
-142
src/test/auxiliary/issue-14422.rs
src/test/auxiliary/issue-14422.rs
+1
-1
src/test/auxiliary/issue13213aux.rs
src/test/auxiliary/issue13213aux.rs
+2
-2
src/test/auxiliary/method_self_arg1.rs
src/test/auxiliary/method_self_arg1.rs
+1
-1
src/test/auxiliary/method_self_arg2.rs
src/test/auxiliary/method_self_arg2.rs
+1
-1
src/test/auxiliary/struct_variant_xc_aux.rs
src/test/auxiliary/struct_variant_xc_aux.rs
+1
-1
src/test/auxiliary/xcrate_unit_struct.rs
src/test/auxiliary/xcrate_unit_struct.rs
+5
-5
src/test/bench/noise.rs
src/test/bench/noise.rs
+1
-1
src/test/bench/shootout-chameneos-redux.rs
src/test/bench/shootout-chameneos-redux.rs
+2
-2
src/test/bench/shootout-fannkuch-redux.rs
src/test/bench/shootout-fannkuch-redux.rs
+2
-2
src/test/bench/shootout-fasta-redux.rs
src/test/bench/shootout-fasta-redux.rs
+1
-1
src/test/bench/shootout-k-nucleotide.rs
src/test/bench/shootout-k-nucleotide.rs
+1
-1
src/test/bench/shootout-nbody.rs
src/test/bench/shootout-nbody.rs
+1
-1
src/test/compile-fail/borrowck-borrow-from-owned-ptr.rs
src/test/compile-fail/borrowck-borrow-from-owned-ptr.rs
+2
-2
src/test/compile-fail/borrowck-borrow-from-stack-variable.rs
src/test/compile-fail/borrowck-borrow-from-stack-variable.rs
+2
-2
src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs
src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs
+1
-1
src/test/compile-fail/borrowck-use-mut-borrow.rs
src/test/compile-fail/borrowck-use-mut-borrow.rs
+1
-1
src/test/compile-fail/coherence-impls-copy.rs
src/test/compile-fail/coherence-impls-copy.rs
+6
-0
src/test/compile-fail/dst-index.rs
src/test/compile-fail/dst-index.rs
+2
-2
src/test/compile-fail/exclusive-drop-and-copy.rs
src/test/compile-fail/exclusive-drop-and-copy.rs
+2
-2
src/test/compile-fail/feature-gate-simd-ffi.rs
src/test/compile-fail/feature-gate-simd-ffi.rs
+1
-1
src/test/compile-fail/gated-simd-ffi.rs
src/test/compile-fail/gated-simd-ffi.rs
+1
-1
src/test/compile-fail/kindck-copy.rs
src/test/compile-fail/kindck-copy.rs
+1
-1
src/test/compile-fail/kindck-inherited-copy-bound.rs
src/test/compile-fail/kindck-inherited-copy-bound.rs
+2
-2
src/test/compile-fail/opt-in-copy.rs
src/test/compile-fail/opt-in-copy.rs
+2
-0
src/test/compile-fail/pub-method-macro.rs
src/test/compile-fail/pub-method-macro.rs
+1
-1
src/test/debuginfo/c-style-enum.rs
src/test/debuginfo/c-style-enum.rs
+3
-3
src/test/debuginfo/generic-method-on-generic-struct.rs
src/test/debuginfo/generic-method-on-generic-struct.rs
+1
-1
src/test/debuginfo/method-on-enum.rs
src/test/debuginfo/method-on-enum.rs
+1
-1
src/test/debuginfo/method-on-generic-struct.rs
src/test/debuginfo/method-on-generic-struct.rs
+1
-1
src/test/debuginfo/method-on-struct.rs
src/test/debuginfo/method-on-struct.rs
+1
-1
src/test/debuginfo/method-on-trait.rs
src/test/debuginfo/method-on-trait.rs
+1
-1
src/test/debuginfo/method-on-tuple-struct.rs
src/test/debuginfo/method-on-tuple-struct.rs
+1
-1
src/test/debuginfo/self-in-default-method.rs
src/test/debuginfo/self-in-default-method.rs
+1
-1
src/test/debuginfo/self-in-generic-default-method.rs
src/test/debuginfo/self-in-generic-default-method.rs
+1
-1
src/test/pretty/block-disambig.rs
src/test/pretty/block-disambig.rs
+1
-1
src/test/run-make/allow-non-lint-warnings-cmdline/foo.rs
src/test/run-make/allow-non-lint-warnings-cmdline/foo.rs
+1
-1
src/test/run-make/extern-fn-with-packed-struct/test.rs
src/test/run-make/extern-fn-with-packed-struct/test.rs
+1
-1
src/test/run-make/save-analysis/foo.rs
src/test/run-make/save-analysis/foo.rs
+1
-1
src/test/run-pass/associated-types-normalize-unifield-struct.rs
...st/run-pass/associated-types-normalize-unifield-struct.rs
+2
-2
src/test/run-pass/binops-issue-22743.rs
src/test/run-pass/binops-issue-22743.rs
+1
-1
src/test/run-pass/borrowck-univariant-enum.rs
src/test/run-pass/borrowck-univariant-enum.rs
+1
-1
src/test/run-pass/builtin-superkinds-in-metadata.rs
src/test/run-pass/builtin-superkinds-in-metadata.rs
+1
-1
src/test/run-pass/class-impl-very-parameterized-trait.rs
src/test/run-pass/class-impl-very-parameterized-trait.rs
+1
-1
src/test/run-pass/coherence-impl-in-fn.rs
src/test/run-pass/coherence-impl-in-fn.rs
+1
-1
src/test/run-pass/const-nullary-univariant-enum.rs
src/test/run-pass/const-nullary-univariant-enum.rs
+1
-1
src/test/run-pass/copy-out-of-array-1.rs
src/test/run-pass/copy-out-of-array-1.rs
+1
-2
src/test/run-pass/deriving-bounds.rs
src/test/run-pass/deriving-bounds.rs
+1
-1
src/test/run-pass/dst-struct-sole.rs
src/test/run-pass/dst-struct-sole.rs
+1
-1
src/test/run-pass/dst-struct.rs
src/test/run-pass/dst-struct.rs
+1
-1
src/test/run-pass/dst-trait.rs
src/test/run-pass/dst-trait.rs
+2
-2
src/test/run-pass/empty-tag.rs
src/test/run-pass/empty-tag.rs
+1
-1
src/test/run-pass/enum-discrim-width-stuff.rs
src/test/run-pass/enum-discrim-width-stuff.rs
+1
-1
src/test/run-pass/explicit-self-generic.rs
src/test/run-pass/explicit-self-generic.rs
+1
-1
src/test/run-pass/expr-copy.rs
src/test/run-pass/expr-copy.rs
+1
-1
src/test/run-pass/expr-if-struct.rs
src/test/run-pass/expr-if-struct.rs
+2
-2
src/test/run-pass/expr-match-struct.rs
src/test/run-pass/expr-match-struct.rs
+2
-2
src/test/run-pass/exterior.rs
src/test/run-pass/exterior.rs
+1
-1
src/test/run-pass/extern-pass-TwoU16s.rs
src/test/run-pass/extern-pass-TwoU16s.rs
+1
-1
src/test/run-pass/extern-pass-TwoU32s.rs
src/test/run-pass/extern-pass-TwoU32s.rs
+1
-1
src/test/run-pass/extern-pass-TwoU64s.rs
src/test/run-pass/extern-pass-TwoU64s.rs
+1
-1
src/test/run-pass/extern-pass-TwoU8s.rs
src/test/run-pass/extern-pass-TwoU8s.rs
+1
-1
src/test/run-pass/foreign-fn-with-byval.rs
src/test/run-pass/foreign-fn-with-byval.rs
+1
-1
src/test/run-pass/generic-fn.rs
src/test/run-pass/generic-fn.rs
+1
-1
src/test/run-pass/guards-not-exhaustive.rs
src/test/run-pass/guards-not-exhaustive.rs
+1
-1
src/test/run-pass/guards.rs
src/test/run-pass/guards.rs
+1
-1
src/test/run-pass/hrtb-opt-in-copy.rs
src/test/run-pass/hrtb-opt-in-copy.rs
+2
-2
src/test/run-pass/issue-12860.rs
src/test/run-pass/issue-12860.rs
+1
-1
src/test/run-pass/issue-13264.rs
src/test/run-pass/issue-13264.rs
+1
-1
src/test/run-pass/issue-19100.rs
src/test/run-pass/issue-19100.rs
+1
-1
src/test/run-pass/issue-20797.rs
src/test/run-pass/issue-20797.rs
+1
-1
src/test/run-pass/issue-21296.rs
src/test/run-pass/issue-21296.rs
+4
-0
src/test/run-pass/issue-22536-copy-mustnt-zero.rs
src/test/run-pass/issue-22536-copy-mustnt-zero.rs
+3
-1
src/test/run-pass/issue-2288.rs
src/test/run-pass/issue-2288.rs
+1
-1
src/test/run-pass/issue-23550.rs
src/test/run-pass/issue-23550.rs
+1
-1
src/test/run-pass/issue-2633.rs
src/test/run-pass/issue-2633.rs
+2
-2
src/test/run-pass/issue-3121.rs
src/test/run-pass/issue-3121.rs
+3
-3
src/test/run-pass/issue-3563-3.rs
src/test/run-pass/issue-3563-3.rs
+3
-3
src/test/run-pass/issue-3743.rs
src/test/run-pass/issue-3743.rs
+1
-1
src/test/run-pass/issue-3753.rs
src/test/run-pass/issue-3753.rs
+2
-2
src/test/run-pass/issue-5688.rs
src/test/run-pass/issue-5688.rs
+1
-1
src/test/run-pass/match-arm-statics.rs
src/test/run-pass/match-arm-statics.rs
+1
-1
src/test/run-pass/method-self-arg-trait.rs
src/test/run-pass/method-self-arg-trait.rs
+1
-1
src/test/run-pass/method-self-arg.rs
src/test/run-pass/method-self-arg.rs
+1
-1
src/test/run-pass/monomorphize-abi-alignment.rs
src/test/run-pass/monomorphize-abi-alignment.rs
+3
-3
src/test/run-pass/multidispatch1.rs
src/test/run-pass/multidispatch1.rs
+1
-1
src/test/run-pass/multidispatch2.rs
src/test/run-pass/multidispatch2.rs
+1
-1
src/test/run-pass/newtype.rs
src/test/run-pass/newtype.rs
+2
-2
src/test/run-pass/operator-overloading.rs
src/test/run-pass/operator-overloading.rs
+1
-1
src/test/run-pass/out-pointer-aliasing.rs
src/test/run-pass/out-pointer-aliasing.rs
+1
-1
src/test/run-pass/overloaded-autoderef-order.rs
src/test/run-pass/overloaded-autoderef-order.rs
+2
-2
src/test/run-pass/packed-struct-vec.rs
src/test/run-pass/packed-struct-vec.rs
+1
-1
src/test/run-pass/rec-tup.rs
src/test/run-pass/rec-tup.rs
+1
-1
src/test/run-pass/rec.rs
src/test/run-pass/rec.rs
+1
-1
src/test/run-pass/regions-dependent-addr-of.rs
src/test/run-pass/regions-dependent-addr-of.rs
+1
-1
src/test/run-pass/regions-early-bound-used-in-bound-method.rs
...test/run-pass/regions-early-bound-used-in-bound-method.rs
+1
-1
src/test/run-pass/regions-early-bound-used-in-bound.rs
src/test/run-pass/regions-early-bound-used-in-bound.rs
+1
-2
src/test/run-pass/regions-early-bound-used-in-type-param.rs
src/test/run-pass/regions-early-bound-used-in-type-param.rs
+1
-1
src/test/run-pass/regions-mock-tcx.rs
src/test/run-pass/regions-mock-tcx.rs
+4
-4
src/test/run-pass/self-in-mut-slot-immediate-value.rs
src/test/run-pass/self-in-mut-slot-immediate-value.rs
+1
-1
src/test/run-pass/simd-generics.rs
src/test/run-pass/simd-generics.rs
+1
-1
src/test/run-pass/small-enum-range-edge.rs
src/test/run-pass/small-enum-range-edge.rs
+2
-2
src/test/run-pass/struct-return.rs
src/test/run-pass/struct-return.rs
+2
-2
src/test/run-pass/structured-compare.rs
src/test/run-pass/structured-compare.rs
+1
-1
src/test/run-pass/sync-send-iterators-in-libcollections.rs
src/test/run-pass/sync-send-iterators-in-libcollections.rs
+1
-1
src/test/run-pass/tag-variant-disr-val.rs
src/test/run-pass/tag-variant-disr-val.rs
+1
-1
src/test/run-pass/trait-coercion-generic.rs
src/test/run-pass/trait-coercion-generic.rs
+1
-1
src/test/run-pass/trait-coercion.rs
src/test/run-pass/trait-coercion.rs
+1
-1
src/test/run-pass/ufcs-explicit-self.rs
src/test/run-pass/ufcs-explicit-self.rs
+2
-2
未找到文件。
src/test/auxiliary/issue-14422.rs
浏览文件 @
890ed5c4
...
...
@@ -23,7 +23,7 @@ pub mod aliases {
pub
mod
hidden_core
{
use
super
::
aliases
::
B
;
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
pub
struct
A
;
pub
fn
make
()
->
B
{
A
}
...
...
src/test/auxiliary/issue13213aux.rs
浏览文件 @
890ed5c4
...
...
@@ -13,13 +13,13 @@
pub
use
private
::
P
;
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
pub
struct
S
{
p
:
P
,
}
mod
private
{
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
pub
struct
P
{
p
:
i32
,
}
...
...
src/test/auxiliary/method_self_arg1.rs
浏览文件 @
890ed5c4
...
...
@@ -17,7 +17,7 @@
pub
fn
get_count
()
->
u64
{
unsafe
{
COUNT
}
}
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
pub
struct
Foo
;
impl
Foo
{
...
...
src/test/auxiliary/method_self_arg2.rs
浏览文件 @
890ed5c4
...
...
@@ -17,7 +17,7 @@
pub
fn
get_count
()
->
u64
{
unsafe
{
COUNT
}
}
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
pub
struct
Foo
;
impl
Foo
{
...
...
src/test/auxiliary/struct_variant_xc_aux.rs
浏览文件 @
890ed5c4
...
...
@@ -11,7 +11,7 @@
#![crate_name=
"struct_variant_xc_aux"
]
#![crate_type
=
"lib"
]
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
pub
enum
Enum
{
Variant
(
u8
),
StructVariant
{
arg
:
u8
}
...
...
src/test/auxiliary/xcrate_unit_struct.rs
浏览文件 @
890ed5c4
...
...
@@ -12,26 +12,26 @@
// used by the rpass test
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
pub
struct
Struct
;
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
pub
enum
Unit
{
UnitVariant
,
Argument
(
Struct
)
}
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
pub
struct
TupleStruct
(
pub
usize
,
pub
&
'static
str
);
// used by the cfail test
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
pub
struct
StructWithFields
{
foo
:
isize
,
}
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
pub
enum
EnumWithVariants
{
EnumVariant
,
EnumVariantArg
(
isize
)
...
...
src/test/bench/noise.rs
浏览文件 @
890ed5c4
...
...
@@ -18,7 +18,7 @@
use
std
::
num
::
Float
;
use
std
::
rand
::{
Rng
,
StdRng
};
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
Vec2
{
x
:
f32
,
y
:
f32
,
...
...
src/test/bench/shootout-chameneos-redux.rs
浏览文件 @
890ed5c4
...
...
@@ -54,7 +54,7 @@ fn print_complements() {
}
}
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
enum
Color
{
Red
,
Yellow
,
...
...
@@ -72,7 +72,7 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
}
}
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
CreatureInfo
{
name
:
usize
,
color
:
Color
...
...
src/test/bench/shootout-fannkuch-redux.rs
浏览文件 @
890ed5c4
...
...
@@ -63,12 +63,12 @@ fn next_permutation(perm: &mut [i32], count: &mut [i32]) {
}
}
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
P
{
p
:
[
i32
;
16
],
}
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
Perm
{
cnt
:
[
i32
;
16
],
fact
:
[
u32
;
16
],
...
...
src/test/bench/shootout-fasta-redux.rs
浏览文件 @
890ed5c4
...
...
@@ -105,7 +105,7 @@ fn sum_and_scale(a: &'static [AminoAcid]) -> Vec<AminoAcid> {
result
}
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
AminoAcid
{
c
:
u8
,
p
:
f32
,
...
...
src/test/bench/shootout-k-nucleotide.rs
浏览文件 @
890ed5c4
...
...
@@ -64,7 +64,7 @@
// Code implementation
#[derive(Copy,
PartialEq,
PartialOrd,
Ord,
Eq)]
#[derive(Copy,
Clone,
PartialEq,
PartialOrd,
Ord,
Eq)]
struct
Code
(
u64
);
impl
Code
{
...
...
src/test/bench/shootout-nbody.rs
浏览文件 @
890ed5c4
...
...
@@ -96,7 +96,7 @@
},
];
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
Planet
{
x
:
f64
,
y
:
f64
,
z
:
f64
,
vx
:
f64
,
vy
:
f64
,
vz
:
f64
,
...
...
src/test/compile-fail/borrowck-borrow-from-owned-ptr.rs
浏览文件 @
890ed5c4
...
...
@@ -9,13 +9,13 @@
// except according to those terms.
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
Foo
{
bar1
:
Bar
,
bar2
:
Bar
}
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
Bar
{
int1
:
isize
,
int2
:
isize
,
...
...
src/test/compile-fail/borrowck-borrow-from-stack-variable.rs
浏览文件 @
890ed5c4
...
...
@@ -8,13 +8,13 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
Foo
{
bar1
:
Bar
,
bar2
:
Bar
}
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
Bar
{
int1
:
isize
,
int2
:
isize
,
...
...
src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs
浏览文件 @
890ed5c4
...
...
@@ -10,7 +10,7 @@
use
std
::
ops
::
Add
;
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
Point
{
x
:
isize
,
y
:
isize
,
...
...
src/test/compile-fail/borrowck-use-mut-borrow.rs
浏览文件 @
890ed5c4
...
...
@@ -10,7 +10,7 @@
#![feature(box_syntax)]
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
A
{
a
:
isize
,
b
:
isize
}
struct
B
{
a
:
isize
,
b
:
Box
<
isize
>
}
...
...
src/test/compile-fail/coherence-impls-copy.rs
浏览文件 @
890ed5c4
...
...
@@ -22,7 +22,11 @@ enum TestE {
impl
!
Sync
for
NotSync
{}
impl
Copy
for
TestE
{}
impl
Clone
for
TestE
{
fn
clone
(
&
self
)
->
Self
{
*
self
}
}
impl
Copy
for
MyType
{}
impl
Clone
for
MyType
{
fn
clone
(
&
self
)
->
Self
{
*
self
}
}
impl
Copy
for
(
MyType
,
MyType
)
{}
//~^ ERROR E0206
...
...
@@ -31,6 +35,8 @@ impl Copy for &'static NotSync {}
impl
Copy
for
[
MyType
]
{}
//~^ ERROR E0206
//~| ERROR E0277
//~| ERROR E0277
impl
Copy
for
&
'static
[
NotSync
]
{}
//~^ ERROR E0206
...
...
src/test/compile-fail/dst-index.rs
浏览文件 @
890ed5c4
...
...
@@ -14,7 +14,7 @@
use
std
::
ops
::
Index
;
use
std
::
fmt
::
Debug
;
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
S
;
impl
Index
<
usize
>
for
S
{
...
...
@@ -25,7 +25,7 @@ fn index(&self, _: usize) -> &str {
}
}
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
T
;
impl
Index
<
usize
>
for
T
{
...
...
src/test/compile-fail/exclusive-drop-and-copy.rs
浏览文件 @
890ed5c4
...
...
@@ -12,14 +12,14 @@
// issue #20126
#[derive(Copy)]
//~ ERROR the trait `Copy` may not be implemented
#[derive(Copy
,
Clone
)]
//~ ERROR the trait `Copy` may not be implemented
struct
Foo
;
impl
Drop
for
Foo
{
fn
drop
(
&
mut
self
)
{}
}
#[derive(Copy)]
//~ ERROR the trait `Copy` may not be implemented
#[derive(Copy
,
Clone
)]
//~ ERROR the trait `Copy` may not be implemented
struct
Bar
<
T
>
(::
std
::
marker
::
PhantomData
<
T
>
);
#[unsafe_destructor]
...
...
src/test/compile-fail/feature-gate-simd-ffi.rs
浏览文件 @
890ed5c4
...
...
@@ -13,7 +13,7 @@
use
std
::
simd
::
f32x4
;
#[simd]
#[derive(Copy)]
#[repr(C)]
struct
LocalSimd
(
u8
,
u8
);
#[simd]
#[derive(Copy
,
Clone
)]
#[repr(C)]
struct
LocalSimd
(
u8
,
u8
);
extern
{
fn
foo
()
->
f32x4
;
//~ ERROR use of SIMD type
...
...
src/test/compile-fail/gated-simd-ffi.rs
浏览文件 @
890ed5c4
...
...
@@ -13,7 +13,7 @@
#![feature(simd)]
#[repr(C)]
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
#[simd]
pub
struct
f32x4
(
f32
,
f32
,
f32
,
f32
);
...
...
src/test/compile-fail/kindck-copy.rs
浏览文件 @
890ed5c4
...
...
@@ -17,7 +17,7 @@ fn assert_copy<T:Copy>() { }
trait
Dummy
:
MarkerTrait
{
}
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
MyStruct
{
x
:
isize
,
y
:
isize
,
...
...
src/test/compile-fail/kindck-inherited-copy-bound.rs
浏览文件 @
890ed5c4
...
...
@@ -25,13 +25,13 @@ fn take_param<T:Foo>(foo: &T) { }
fn
a
()
{
let
x
:
Box
<
_
>
=
box
3
;
take_param
(
&
x
);
//~ ERROR
`core::marker::Copy` is not implemented
take_param
(
&
x
);
//~ ERROR
E0277
}
fn
b
()
{
let
x
:
Box
<
_
>
=
box
3
;
let
y
=
&
x
;
let
z
=
&
x
as
&
Foo
;
//~ ERROR
`core::marker::Copy` is not implemented
let
z
=
&
x
as
&
Foo
;
//~ ERROR
E0038
}
fn
main
()
{
}
src/test/compile-fail/opt-in-copy.rs
浏览文件 @
890ed5c4
...
...
@@ -16,6 +16,7 @@ struct IWantToCopyThis {
impl
Copy
for
IWantToCopyThis
{}
//~^ ERROR the trait `Copy` may not be implemented for this type
//~| ERROR E0277
enum
CantCopyThisEither
{
A
,
...
...
@@ -28,5 +29,6 @@ enum IWantToCopyThisToo {
impl
Copy
for
IWantToCopyThisToo
{}
//~^ ERROR the trait `Copy` may not be implemented for this type
//~| ERROR E0277
fn
main
()
{}
src/test/compile-fail/pub-method-macro.rs
浏览文件 @
890ed5c4
...
...
@@ -20,7 +20,7 @@ fn $n (&self) -> i32 {
)
}
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
pub
struct
S
;
impl
S
{
...
...
src/test/debuginfo/c-style-enum.rs
浏览文件 @
890ed5c4
...
...
@@ -105,21 +105,21 @@
use
self
::
ManualDiscriminant
::{
OneHundred
,
OneThousand
,
OneMillion
};
use
self
::
SingleVariant
::
TheOnlyVariant
;
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
enum
AutoDiscriminant
{
One
,
Two
,
Three
}
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
enum
ManualDiscriminant
{
OneHundred
=
100
,
OneThousand
=
1000
,
OneMillion
=
1000000
}
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
enum
SingleVariant
{
TheOnlyVariant
}
...
...
src/test/debuginfo/generic-method-on-generic-struct.rs
浏览文件 @
890ed5c4
...
...
@@ -114,7 +114,7 @@
#![feature(box_syntax)]
#![omit_gdb_pretty_printer_section]
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
Struct
<
T
>
{
x
:
T
}
...
...
src/test/debuginfo/method-on-enum.rs
浏览文件 @
890ed5c4
...
...
@@ -115,7 +115,7 @@
#![feature(box_syntax)]
#![omit_gdb_pretty_printer_section]
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
enum
Enum
{
Variant1
{
x
:
u16
,
y
:
u16
},
Variant2
(
u32
)
...
...
src/test/debuginfo/method-on-generic-struct.rs
浏览文件 @
890ed5c4
...
...
@@ -115,7 +115,7 @@
#![feature(box_syntax)]
#![omit_gdb_pretty_printer_section]
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
Struct
<
T
>
{
x
:
T
}
...
...
src/test/debuginfo/method-on-struct.rs
浏览文件 @
890ed5c4
...
...
@@ -115,7 +115,7 @@
#![feature(box_syntax)]
#![omit_gdb_pretty_printer_section]
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
Struct
{
x
:
isize
}
...
...
src/test/debuginfo/method-on-trait.rs
浏览文件 @
890ed5c4
...
...
@@ -115,7 +115,7 @@
#![feature(box_syntax)]
#![omit_gdb_pretty_printer_section]
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
Struct
{
x
:
isize
}
...
...
src/test/debuginfo/method-on-tuple-struct.rs
浏览文件 @
890ed5c4
...
...
@@ -115,7 +115,7 @@
#![feature(box_syntax)]
#![omit_gdb_pretty_printer_section]
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
TupleStruct
(
isize
,
f64
);
impl
TupleStruct
{
...
...
src/test/debuginfo/self-in-default-method.rs
浏览文件 @
890ed5c4
...
...
@@ -114,7 +114,7 @@
#![feature(box_syntax)]
#![omit_gdb_pretty_printer_section]
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
Struct
{
x
:
isize
}
...
...
src/test/debuginfo/self-in-generic-default-method.rs
浏览文件 @
890ed5c4
...
...
@@ -114,7 +114,7 @@
#![feature(box_syntax)]
#![omit_gdb_pretty_printer_section]
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
Struct
{
x
:
isize
}
...
...
src/test/pretty/block-disambig.rs
浏览文件 @
890ed5c4
...
...
@@ -19,7 +19,7 @@
fn
test2
()
->
isize
{
let
val
=
&
0
;
{
}
*
val
}
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
S
{
eax
:
isize
}
fn
test3
()
{
...
...
src/test/run-make/allow-non-lint-warnings-cmdline/foo.rs
浏览文件 @
890ed5c4
...
...
@@ -9,7 +9,7 @@
// except according to those terms.
#[derive()]
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
pub
struct
Foo
;
pub
fn
main
()
{
}
src/test/run-make/extern-fn-with-packed-struct/test.rs
浏览文件 @
890ed5c4
...
...
@@ -9,7 +9,7 @@
// except according to those terms.
#[repr(packed)]
#[derive(Copy,
PartialEq,
Debug)]
#[derive(Copy,
Clone,
PartialEq,
Debug)]
struct
Foo
{
a
:
i8
,
b
:
i16
,
...
...
src/test/run-make/save-analysis/foo.rs
浏览文件 @
890ed5c4
...
...
@@ -179,7 +179,7 @@ enum SomeEnum<'a> {
MyTypes
(
MyType
,
MyType
)
}
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
enum
SomeOtherEnum
{
SomeConst1
,
SomeConst2
,
...
...
src/test/run-pass/associated-types-normalize-unifield-struct.rs
浏览文件 @
890ed5c4
...
...
@@ -20,10 +20,10 @@ pub trait Offset {
fn
dummy
(
&
self
)
{
}
}
#[derive(Copy)]
pub
struct
X
;
#[derive(Copy
,
Clone
)]
pub
struct
X
;
impl
Offset
for
X
{
type
State
=
Y
;
}
#[derive(Copy)]
pub
struct
Y
;
#[derive(Copy
,
Clone
)]
pub
struct
Y
;
impl
OffsetState
for
Y
{}
pub
fn
now
()
->
DateTime
<
X
>
{
from_utc
(
Y
)
}
...
...
src/test/run-pass/binops-issue-22743.rs
浏览文件 @
890ed5c4
...
...
@@ -10,7 +10,7 @@
use
std
::
ops
::
Mul
;
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
pub
struct
Foo
{
x
:
f64
,
}
...
...
src/test/run-pass/borrowck-univariant-enum.rs
浏览文件 @
890ed5c4
...
...
@@ -13,7 +13,7 @@
use
std
::
cell
::
Cell
;
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
enum
newtype
{
newvar
(
isize
)
}
...
...
src/test/run-pass/builtin-superkinds-in-metadata.rs
浏览文件 @
890ed5c4
...
...
@@ -20,7 +20,7 @@
use
trait_superkinds_in_metadata
::
RequiresCopy
;
use
std
::
marker
;
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
X
<
T
>
(
T
);
impl
<
T
:
Sync
>
RequiresShare
for
X
<
T
>
{
}
...
...
src/test/run-pass/class-impl-very-parameterized-trait.rs
浏览文件 @
890ed5c4
...
...
@@ -11,7 +11,7 @@
use
std
::
cmp
;
#[derive(Copy,
Debug)]
#[derive(Copy,
Clone,
Debug)]
enum
cat_type
{
tuxedo
,
tabby
,
tortoiseshell
}
impl
cmp
::
PartialEq
for
cat_type
{
...
...
src/test/run-pass/coherence-impl-in-fn.rs
浏览文件 @
890ed5c4
...
...
@@ -11,7 +11,7 @@
// pretty-expanded FIXME #23616
pub
fn
main
()
{
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
enum
x
{
foo
}
impl
::
std
::
cmp
::
PartialEq
for
x
{
fn
eq
(
&
self
,
other
:
&
x
)
->
bool
{
...
...
src/test/run-pass/const-nullary-univariant-enum.rs
浏览文件 @
890ed5c4
...
...
@@ -10,7 +10,7 @@
// pretty-expanded FIXME #23616
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
enum
Foo
{
Bar
=
0xDEADBEE
}
...
...
src/test/run-pass/copy-out-of-array-1.rs
浏览文件 @
890ed5c4
...
...
@@ -14,10 +14,9 @@
// pretty-expanded FIXME #23616
#[derive(Copy,
Clone)]
struct
C
{
_
x
:
u8
}
impl
Copy
for
C
{
}
fn
main
()
{
fn
d
()
->
C
{
C
{
_
x
:
0
}
}
...
...
src/test/run-pass/deriving-bounds.rs
浏览文件 @
890ed5c4
...
...
@@ -10,7 +10,7 @@
// pretty-expanded FIXME #23616
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
Test
;
pub
fn
main
()
{}
src/test/run-pass/dst-struct-sole.rs
浏览文件 @
890ed5c4
...
...
@@ -32,7 +32,7 @@ fn foo2<T:ToBar>(x: &Fat<[T]>) {
assert
!
(
x
.ptr
[
1
]
.to_bar
()
==
bar
);
}
#[derive(Copy,
PartialEq,
Eq)]
#[derive(Copy,
Clone,
PartialEq,
Eq)]
struct
Bar
;
trait
ToBar
{
...
...
src/test/run-pass/dst-struct.rs
浏览文件 @
890ed5c4
...
...
@@ -51,7 +51,7 @@ fn foo3(x: &Fat<Fat<[isize]>>) {
}
#[derive(Copy,
PartialEq,
Eq)]
#[derive(Copy,
Clone,
PartialEq,
Eq)]
struct
Bar
;
trait
ToBar
{
...
...
src/test/run-pass/dst-trait.rs
浏览文件 @
890ed5c4
...
...
@@ -19,10 +19,10 @@ struct Fat<T: ?Sized> {
ptr
:
T
}
#[derive(Copy,
PartialEq,
Eq)]
#[derive(Copy,
Clone,
PartialEq,
Eq)]
struct
Bar
;
#[derive(Copy,
PartialEq,
Eq)]
#[derive(Copy,
Clone,
PartialEq,
Eq)]
struct
Bar1
{
f
:
isize
}
...
...
src/test/run-pass/empty-tag.rs
浏览文件 @
890ed5c4
...
...
@@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[derive(Copy,
Debug)]
#[derive(Copy,
Clone,
Debug)]
enum
chan
{
chan_t
,
}
impl
PartialEq
for
chan
{
...
...
src/test/run-pass/enum-discrim-width-stuff.rs
浏览文件 @
890ed5c4
...
...
@@ -12,7 +12,7 @@
(
$m:ident
,
$t:ty
,
$v:expr
)
=>
{{
mod
$m
{
use
std
::
mem
::
size_of
;
#[derive(Copy,
Debug)]
#[derive(Copy,
Clone,
Debug)]
enum
E
{
V
=
$v
,
A
=
0
...
...
src/test/run-pass/explicit-self-generic.rs
浏览文件 @
890ed5c4
...
...
@@ -13,7 +13,7 @@
#![allow(unknown_features)]
#![feature(box_syntax)]
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
LM
{
resize_at
:
usize
,
size
:
usize
}
enum
HashMap
<
K
,
V
>
{
...
...
src/test/run-pass/expr-copy.rs
浏览文件 @
890ed5c4
...
...
@@ -15,7 +15,7 @@ fn f(arg: &mut A) {
arg
.a
=
100
;
}
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
A
{
a
:
isize
}
pub
fn
main
()
{
...
...
src/test/run-pass/expr-if-struct.rs
浏览文件 @
890ed5c4
...
...
@@ -14,7 +14,7 @@
// Tests for if as expressions returning nominal types
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
I
{
i
:
isize
}
fn
test_rec
()
{
...
...
@@ -22,7 +22,7 @@ fn test_rec() {
assert_eq!
(
rs
.i
,
100
);
}
#[derive(Copy,
Debug)]
#[derive(Copy,
Clone,
Debug)]
enum
mood
{
happy
,
sad
,
}
impl
PartialEq
for
mood
{
...
...
src/test/run-pass/expr-match-struct.rs
浏览文件 @
890ed5c4
...
...
@@ -13,7 +13,7 @@
// Tests for match as expressions resulting in struct types
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
R
{
i
:
isize
}
fn
test_rec
()
{
...
...
@@ -21,7 +21,7 @@ fn test_rec() {
assert_eq!
(
rs
.i
,
100
);
}
#[derive(Copy,
Debug)]
#[derive(Copy,
Clone,
Debug)]
enum
mood
{
happy
,
sad
,
}
impl
PartialEq
for
mood
{
...
...
src/test/run-pass/exterior.rs
浏览文件 @
890ed5c4
...
...
@@ -13,7 +13,7 @@
use
std
::
cell
::
Cell
;
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
Point
{
x
:
isize
,
y
:
isize
,
z
:
isize
}
fn
f
(
p
:
&
Cell
<
Point
>
)
{
...
...
src/test/run-pass/extern-pass-TwoU16s.rs
浏览文件 @
890ed5c4
...
...
@@ -11,7 +11,7 @@
// Test a foreign function that accepts and returns a struct
// by value.
#[derive(Copy,
PartialEq,
Debug)]
#[derive(Copy,
Clone,
PartialEq,
Debug)]
pub
struct
TwoU16s
{
one
:
u16
,
two
:
u16
}
...
...
src/test/run-pass/extern-pass-TwoU32s.rs
浏览文件 @
890ed5c4
...
...
@@ -11,7 +11,7 @@
// Test a foreign function that accepts and returns a struct
// by value.
#[derive(Copy,
PartialEq,
Debug)]
#[derive(Copy,
Clone,
PartialEq,
Debug)]
pub
struct
TwoU32s
{
one
:
u32
,
two
:
u32
}
...
...
src/test/run-pass/extern-pass-TwoU64s.rs
浏览文件 @
890ed5c4
...
...
@@ -11,7 +11,7 @@
// Test a foreign function that accepts and returns a struct
// by value.
#[derive(Copy,
PartialEq,
Debug)]
#[derive(Copy,
Clone,
PartialEq,
Debug)]
pub
struct
TwoU64s
{
one
:
u64
,
two
:
u64
}
...
...
src/test/run-pass/extern-pass-TwoU8s.rs
浏览文件 @
890ed5c4
...
...
@@ -11,7 +11,7 @@
// Test a foreign function that accepts and returns a struct
// by value.
#[derive(Copy,
PartialEq,
Debug)]
#[derive(Copy,
Clone,
PartialEq,
Debug)]
pub
struct
TwoU8s
{
one
:
u8
,
two
:
u8
}
...
...
src/test/run-pass/foreign-fn-with-byval.rs
浏览文件 @
890ed5c4
...
...
@@ -10,7 +10,7 @@
// pretty-expanded FIXME #23616
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
pub
struct
S
{
x
:
u64
,
y
:
u64
,
...
...
src/test/run-pass/generic-fn.rs
浏览文件 @
890ed5c4
...
...
@@ -12,7 +12,7 @@
fn
id
<
T
>
(
x
:
T
)
->
T
{
return
x
;
}
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
Triple
{
x
:
isize
,
y
:
isize
,
z
:
isize
}
pub
fn
main
()
{
...
...
src/test/run-pass/guards-not-exhaustive.rs
浏览文件 @
890ed5c4
...
...
@@ -10,7 +10,7 @@
// pretty-expanded FIXME #23616
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
enum
Q
{
R
(
Option
<
usize
>
)
}
fn
xyzzy
(
q
:
Q
)
->
usize
{
...
...
src/test/run-pass/guards.rs
浏览文件 @
890ed5c4
...
...
@@ -10,7 +10,7 @@
// pretty-expanded FIXME #23616
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
Pair
{
x
:
isize
,
y
:
isize
}
pub
fn
main
()
{
...
...
src/test/run-pass/hrtb-opt-in-copy.rs
浏览文件 @
890ed5c4
...
...
@@ -22,7 +22,7 @@
use
std
::
marker
::
PhantomData
;
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
Foo
<
T
>
{
x
:
T
}
type
Ty
<
'tcx
>
=
&
'tcx
TyS
<
'tcx
>
;
...
...
@@ -31,7 +31,7 @@ enum TyS<'tcx> {
Boop
(
PhantomData
<*
mut
&
'tcx
()
>
)
}
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
enum
Bar
<
'tcx
>
{
Baz
(
Foo
<
Ty
<
'tcx
>>
)
}
...
...
src/test/run-pass/issue-12860.rs
浏览文件 @
890ed5c4
...
...
@@ -16,7 +16,7 @@
use
std
::
collections
::
HashSet
;
#[derive(Copy,
PartialEq,
Eq,
Hash)]
#[derive(Copy,
Clone,
PartialEq,
Eq,
Hash)]
struct
XYZ
{
x
:
isize
,
y
:
isize
,
...
...
src/test/run-pass/issue-13264.rs
浏览文件 @
890ed5c4
...
...
@@ -24,7 +24,7 @@ fn deref<'a>(&'a self) -> &'a JSRef {
}
}
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
JSRef
{
node
:
*
const
Node
}
...
...
src/test/run-pass/issue-19100.rs
浏览文件 @
890ed5c4
...
...
@@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
enum
Foo
{
Bar
,
Baz
...
...
src/test/run-pass/issue-20797.rs
浏览文件 @
890ed5c4
...
...
@@ -34,7 +34,7 @@ pub trait Strategy {
}
/// The basic fully-recursive strategy. Nothing is pruned.
#[derive(Copy,
Default)]
#[derive(Copy,
Clone,
Default)]
pub
struct
Recursive
;
impl
Strategy
for
Recursive
{
...
...
src/test/run-pass/issue-21296.rs
浏览文件 @
890ed5c4
...
...
@@ -14,4 +14,8 @@
#[derive(Copy)]
struct
Test
(
*
const
i32
);
impl
Clone
for
Test
{
fn
clone
(
&
self
)
->
Test
{
*
self
}
}
fn
main
()
{}
src/test/run-pass/issue-22536-copy-mustnt-zero.rs
浏览文件 @
890ed5c4
...
...
@@ -22,12 +22,14 @@ struct BufferHandle<R: Resources> {
raw
:
<
R
as
Resources
>
::
Buffer
,
}
impl
<
R
:
Resources
>
Copy
for
BufferHandle
<
R
>
{}
impl
<
R
:
Resources
>
Clone
for
BufferHandle
<
R
>
{
fn
clone
(
&
self
)
->
BufferHandle
<
R
>
{
*
self
}
}
enum
Res
{}
impl
Resources
for
Res
{
type
Buffer
=
u32
;
}
impl
Copy
for
Res
{
}
fn
main
()
{
let
b
:
BufferHandle
<
Res
>
=
BufferHandle
{
raw
:
1
};
...
...
src/test/run-pass/issue-2288.rs
浏览文件 @
890ed5c4
...
...
@@ -17,7 +17,7 @@ trait clam<A> {
fn
chowder
(
&
self
,
y
:
A
);
}
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
foo
<
A
>
{
x
:
A
,
}
...
...
src/test/run-pass/issue-23550.rs
浏览文件 @
890ed5c4
...
...
@@ -13,7 +13,7 @@
use
std
::
intrinsics
;
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
Wrap
(
i64
);
// These volatile and atomic intrinsics used to cause an ICE
...
...
src/test/run-pass/issue-2633.rs
浏览文件 @
890ed5c4
...
...
@@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
cat
{
meow
:
extern
"Rust"
fn
(),
}
...
...
@@ -23,7 +23,7 @@ fn cat() -> cat {
}
}
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
KittyInfo
{
kitty
:
cat
}
// Code compiles and runs successfully if we add a + before the first arg
...
...
src/test/run-pass/issue-3121.rs
浏览文件 @
890ed5c4
...
...
@@ -13,11 +13,11 @@
#![allow(unknown_features)]
#![feature(box_syntax)]
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
enum
side
{
mayo
,
catsup
,
vinegar
}
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
enum
order
{
hamburger
,
fries
(
side
),
shake
}
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
enum
meal
{
to_go
(
order
),
for_here
(
order
)
}
fn
foo
(
m
:
Box
<
meal
>
,
cond
:
bool
)
{
...
...
src/test/run-pass/issue-3563-3.rs
浏览文件 @
890ed5c4
...
...
@@ -29,7 +29,7 @@
use
std
::
slice
;
// Represents a position on a canvas.
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
Point
{
x
:
isize
,
y
:
isize
,
...
...
@@ -37,13 +37,13 @@ struct Point {
// Represents an offset on a canvas. (This has the same structure as a Point.
// but different semantics).
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
Size
{
width
:
isize
,
height
:
isize
,
}
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
Rect
{
top_left
:
Point
,
size
:
Size
,
...
...
src/test/run-pass/issue-3743.rs
浏览文件 @
890ed5c4
...
...
@@ -13,7 +13,7 @@
use
std
::
ops
::
Mul
;
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
Vec2
{
x
:
f64
,
y
:
f64
...
...
src/test/run-pass/issue-3753.rs
浏览文件 @
890ed5c4
...
...
@@ -16,13 +16,13 @@
use
std
::
f64
;
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
pub
struct
Point
{
x
:
f64
,
y
:
f64
}
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
pub
enum
Shape
{
Circle
(
Point
,
f64
),
Rectangle
(
Point
,
Point
)
...
...
src/test/run-pass/issue-5688.rs
浏览文件 @
890ed5c4
...
...
@@ -17,7 +17,7 @@
failed to typecheck correctly.
*/
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
X
{
vec
:
&
'static
[
isize
]
}
static
V
:
&
'static
[
X
]
=
&
[
X
{
vec
:
&
[
1
,
2
,
3
]
}];
...
...
src/test/run-pass/match-arm-statics.rs
浏览文件 @
890ed5c4
...
...
@@ -38,7 +38,7 @@ enum EnumWithStructVariants {
dir
:
Direction
::
North
};
pub
mod
glfw
{
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
pub
struct
InputState
(
usize
);
pub
const
RELEASE
:
InputState
=
InputState
(
0
);
...
...
src/test/run-pass/method-self-arg-trait.rs
浏览文件 @
890ed5c4
...
...
@@ -17,7 +17,7 @@
static
mut
COUNT
:
u64
=
1
;
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
Foo
;
trait
Bar
:
Sized
{
...
...
src/test/run-pass/method-self-arg.rs
浏览文件 @
890ed5c4
...
...
@@ -17,7 +17,7 @@
static
mut
COUNT
:
usize
=
1
;
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
Foo
;
impl
Foo
{
...
...
src/test/run-pass/monomorphize-abi-alignment.rs
浏览文件 @
890ed5c4
...
...
@@ -18,7 +18,7 @@
* and apply the wrong instance of the method `unwrap`.
*/
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
S
<
T
>
{
i
:
u8
,
t
:
T
}
impl
<
T
>
S
<
T
>
{
...
...
@@ -27,10 +27,10 @@ fn unwrap(self) -> T {
}
}
#[derive(Copy,
PartialEq,
Debug)]
#[derive(Copy,
Clone,
PartialEq,
Debug)]
struct
A
((
u32
,
u32
));
#[derive(Copy,
PartialEq,
Debug)]
#[derive(Copy,
Clone,
PartialEq,
Debug)]
struct
B
(
u64
);
pub
fn
main
()
{
...
...
src/test/run-pass/multidispatch1.rs
浏览文件 @
890ed5c4
...
...
@@ -16,7 +16,7 @@ trait MyTrait<T> {
fn
get
(
&
self
)
->
T
;
}
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
MyType
{
dummy
:
usize
}
...
...
src/test/run-pass/multidispatch2.rs
浏览文件 @
890ed5c4
...
...
@@ -25,7 +25,7 @@ fn get(&self) -> T {
}
}
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
MyType
{
dummy
:
usize
}
...
...
src/test/run-pass/newtype.rs
浏览文件 @
890ed5c4
...
...
@@ -8,10 +8,10 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
mytype
(
Mytype
);
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
Mytype
{
compute
:
fn
(
mytype
)
->
isize
,
val
:
isize
,
...
...
src/test/run-pass/operator-overloading.rs
浏览文件 @
890ed5c4
...
...
@@ -13,7 +13,7 @@
use
std
::
cmp
;
use
std
::
ops
;
#[derive(Copy,
Debug)]
#[derive(Copy,
Clone,
Debug)]
struct
Point
{
x
:
isize
,
y
:
isize
...
...
src/test/run-pass/out-pointer-aliasing.rs
浏览文件 @
890ed5c4
...
...
@@ -10,7 +10,7 @@
// pretty-expanded FIXME #23616
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
pub
struct
Foo
{
f1
:
isize
,
_
f2
:
isize
,
...
...
src/test/run-pass/overloaded-autoderef-order.rs
浏览文件 @
890ed5c4
...
...
@@ -13,7 +13,7 @@
use
std
::
rc
::
Rc
;
use
std
::
ops
::
Deref
;
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
DerefWrapper
<
X
,
Y
>
{
x
:
X
,
y
:
Y
...
...
@@ -36,7 +36,7 @@ fn deref(&self) -> &Y {
mod
priv_test
{
use
std
::
ops
::
Deref
;
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
pub
struct
DerefWrapperHideX
<
X
,
Y
>
{
x
:
X
,
pub
y
:
Y
...
...
src/test/run-pass/packed-struct-vec.rs
浏览文件 @
890ed5c4
...
...
@@ -13,7 +13,7 @@
use
std
::
mem
;
#[repr(packed)]
#[derive(Copy,
PartialEq,
Debug)]
#[derive(Copy,
Clone,
PartialEq,
Debug)]
struct
Foo
{
bar
:
u8
,
baz
:
u64
...
...
src/test/run-pass/rec-tup.rs
浏览文件 @
890ed5c4
...
...
@@ -10,7 +10,7 @@
// pretty-expanded FIXME #23616
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
Point
{
x
:
isize
,
y
:
isize
}
type
rect
=
(
Point
,
Point
);
...
...
src/test/run-pass/rec.rs
浏览文件 @
890ed5c4
...
...
@@ -10,7 +10,7 @@
// pretty-expanded FIXME #23616
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
Rect
{
x
:
isize
,
y
:
isize
,
w
:
isize
,
h
:
isize
}
fn
f
(
r
:
Rect
,
x
:
isize
,
y
:
isize
,
w
:
isize
,
h
:
isize
)
{
...
...
src/test/run-pass/regions-dependent-addr-of.rs
浏览文件 @
890ed5c4
...
...
@@ -30,7 +30,7 @@ struct B {
v6
:
Option
<
C
>
}
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
C
{
f
:
isize
}
...
...
src/test/run-pass/regions-early-bound-used-in-bound-method.rs
浏览文件 @
890ed5c4
...
...
@@ -17,7 +17,7 @@ trait GetRef<'a> {
fn
get
(
&
self
)
->
&
'a
isize
;
}
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
Box
<
'a
>
{
t
:
&
'a
isize
}
...
...
src/test/run-pass/regions-early-bound-used-in-bound.rs
浏览文件 @
890ed5c4
...
...
@@ -17,12 +17,11 @@ trait GetRef<'a, T> {
fn
get
(
&
self
)
->
&
'a
T
;
}
#[derive(Copy,
Clone)]
struct
Box
<
'a
,
T
:
'a
>
{
t
:
&
'a
T
}
impl
<
'a
,
T
:
'a
>
Copy
for
Box
<
'a
,
T
>
{}
impl
<
'a
,
T
:
Clone
>
GetRef
<
'a
,
T
>
for
Box
<
'a
,
T
>
{
fn
get
(
&
self
)
->
&
'a
T
{
self
.t
...
...
src/test/run-pass/regions-early-bound-used-in-type-param.rs
浏览文件 @
890ed5c4
...
...
@@ -17,7 +17,7 @@ trait Get<T> {
fn
get
(
&
self
)
->
T
;
}
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
Box
<
T
>
{
t
:
T
}
...
...
src/test/run-pass/regions-mock-tcx.rs
浏览文件 @
890ed5c4
...
...
@@ -29,7 +29,7 @@
type
Type
<
'tcx
>
=
&
'tcx
TypeStructure
<
'tcx
>
;
#[derive(Copy,
Debug)]
#[derive(Copy,
Clone,
Debug)]
enum
TypeStructure
<
'tcx
>
{
TypeInt
,
TypeFunction
(
Type
<
'tcx
>
,
Type
<
'tcx
>
),
...
...
@@ -94,20 +94,20 @@ fn ast(&mut self, a: AstKind<'ast>) -> Ast<'ast> {
}
}
#[derive(Copy,
PartialEq,
Eq,
Hash)]
#[derive(Copy,
Clone,
PartialEq,
Eq,
Hash)]
struct
NodeId
{
id
:
usize
}
type
Ast
<
'ast
>
=
&
'ast
AstStructure
<
'ast
>
;
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
AstStructure
<
'ast
>
{
id
:
NodeId
,
kind
:
AstKind
<
'ast
>
}
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
enum
AstKind
<
'ast
>
{
ExprInt
,
ExprVar
(
usize
),
...
...
src/test/run-pass/self-in-mut-slot-immediate-value.rs
浏览文件 @
890ed5c4
...
...
@@ -13,7 +13,7 @@
// pretty-expanded FIXME #23616
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
Value
{
n
:
isize
}
...
...
src/test/run-pass/simd-generics.rs
浏览文件 @
890ed5c4
...
...
@@ -16,7 +16,7 @@
use
std
::
ops
;
#[simd]
#[derive(Copy)]
#[derive(Copy
,
Clone
)]
struct
f32x4
(
f32
,
f32
,
f32
,
f32
);
fn
add
<
T
:
ops
::
Add
<
Output
=
T
>>
(
lhs
:
T
,
rhs
:
T
)
->
T
{
...
...
src/test/run-pass/small-enum-range-edge.rs
浏览文件 @
890ed5c4
此差异已折叠。
点击以展开。
src/test/run-pass/struct-return.rs
浏览文件 @
890ed5c4
此差异已折叠。
点击以展开。
src/test/run-pass/structured-compare.rs
浏览文件 @
890ed5c4
此差异已折叠。
点击以展开。
src/test/run-pass/sync-send-iterators-in-libcollections.rs
浏览文件 @
890ed5c4
此差异已折叠。
点击以展开。
src/test/run-pass/tag-variant-disr-val.rs
浏览文件 @
890ed5c4
此差异已折叠。
点击以展开。
src/test/run-pass/trait-coercion-generic.rs
浏览文件 @
890ed5c4
此差异已折叠。
点击以展开。
src/test/run-pass/trait-coercion.rs
浏览文件 @
890ed5c4
此差异已折叠。
点击以展开。
src/test/run-pass/ufcs-explicit-self.rs
浏览文件 @
890ed5c4
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录