Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
3bbbb314
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,发现更多精彩内容 >>
提交
3bbbb314
编写于
5月 08, 2013
作者:
B
bors
浏览文件
操作
浏览文件
下载
差异文件
auto merge of #6327 : z0w0/rust/rm-notest, r=brson
Makes it more consistent, imo.
上级
d82d9874
cb66d894
变更
20
隐藏空白更改
内联
并排
Showing
20 changed file
with
131 addition
and
132 deletion
+131
-132
src/libcore/at_vec.rs
src/libcore/at_vec.rs
+1
-1
src/libcore/bool.rs
src/libcore/bool.rs
+4
-4
src/libcore/char.rs
src/libcore/char.rs
+4
-4
src/libcore/cleanup.rs
src/libcore/cleanup.rs
+3
-3
src/libcore/core.rc
src/libcore/core.rc
+3
-3
src/libcore/logging.rs
src/libcore/logging.rs
+1
-1
src/libcore/managed.rs
src/libcore/managed.rs
+5
-5
src/libcore/nil.rs
src/libcore/nil.rs
+5
-5
src/libcore/num/f32.rs
src/libcore/num/f32.rs
+9
-9
src/libcore/num/f64.rs
src/libcore/num/f64.rs
+9
-9
src/libcore/num/float.rs
src/libcore/num/float.rs
+9
-9
src/libcore/num/int-template.rs
src/libcore/num/int-template.rs
+14
-14
src/libcore/num/uint-template.rs
src/libcore/num/uint-template.rs
+14
-14
src/libcore/owned.rs
src/libcore/owned.rs
+3
-3
src/libcore/ptr.rs
src/libcore/ptr.rs
+5
-5
src/libcore/str.rs
src/libcore/str.rs
+17
-17
src/libcore/tuple.rs
src/libcore/tuple.rs
+7
-7
src/libcore/unstable.rs
src/libcore/unstable.rs
+1
-1
src/libcore/vec.rs
src/libcore/vec.rs
+15
-15
src/librustc/driver/driver.rs
src/librustc/driver/driver.rs
+2
-3
未找到文件。
src/libcore/at_vec.rs
浏览文件 @
3bbbb314
...
...
@@ -166,7 +166,7 @@ pub fn from_slice<T:Copy>(v: &[T]) -> @[T] {
from_fn
(
v
.len
(),
|
i
|
v
[
i
])
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
pub
mod
traits
{
use
at_vec
::
append
;
use
kinds
::
Copy
;
...
...
src/libcore/bool.rs
浏览文件 @
3bbbb314
...
...
@@ -10,7 +10,7 @@
//! Boolean logic
#[cfg(not
est
)]
#[cfg(not
(test)
)]
use
cmp
::{
Eq
,
Ord
,
TotalOrd
,
Ordering
};
use
option
::{
None
,
Option
,
Some
};
use
from_str
::
FromStr
;
...
...
@@ -75,7 +75,7 @@ pub fn all_values(blk: &fn(v: bool)) {
#[inline(always)]
pub
fn
to_bit
(
v
:
bool
)
->
u8
{
if
v
{
1u8
}
else
{
0u8
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Ord
for
bool
{
#[inline(always)]
fn
lt
(
&
self
,
other
:
&
bool
)
->
bool
{
to_bit
(
*
self
)
<
to_bit
(
*
other
)
}
...
...
@@ -87,13 +87,13 @@ fn gt(&self, other: &bool) -> bool { to_bit(*self) > to_bit(*other) }
fn
ge
(
&
self
,
other
:
&
bool
)
->
bool
{
to_bit
(
*
self
)
>=
to_bit
(
*
other
)
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
TotalOrd
for
bool
{
#[inline(always)]
fn
cmp
(
&
self
,
other
:
&
bool
)
->
Ordering
{
to_bit
(
*
self
)
.cmp
(
&
to_bit
(
*
other
))
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Eq
for
bool
{
#[inline(always)]
fn
eq
(
&
self
,
other
:
&
bool
)
->
bool
{
(
*
self
)
==
(
*
other
)
}
...
...
src/libcore/char.rs
浏览文件 @
3bbbb314
...
...
@@ -10,7 +10,7 @@
//! Utilities for manipulating the char type
#[cfg(not
est
)]
#[cfg(not
(test)
)]
use
cmp
::
Ord
;
use
option
::{
None
,
Option
,
Some
};
use
str
;
...
...
@@ -18,7 +18,7 @@
use
uint
;
use
unicode
::{
derived_property
,
general_category
};
#[cfg(not
est
)]
use
cmp
::
Eq
;
#[cfg(not
(test)
)]
use
cmp
::
Eq
;
/*
Lu Uppercase_Letter an uppercase letter
...
...
@@ -244,7 +244,7 @@ pub fn len_utf8_bytes(c: char) -> uint {
else
{
fail
!
(
~
"invalid character!"
)
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Eq
for
char
{
#[inline(always)]
fn
eq
(
&
self
,
other
:
&
char
)
->
bool
{
(
*
self
)
==
(
*
other
)
}
...
...
@@ -252,7 +252,7 @@ fn eq(&self, other: &char) -> bool { (*self) == (*other) }
fn
ne
(
&
self
,
other
:
&
char
)
->
bool
{
(
*
self
)
!=
(
*
other
)
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Ord
for
char
{
#[inline(always)]
fn
lt
(
&
self
,
other
:
&
char
)
->
bool
{
*
self
<
*
other
}
...
...
src/libcore/cleanup.rs
浏览文件 @
3bbbb314
...
...
@@ -15,9 +15,9 @@
use
repr
::
BoxRepr
;
use
sys
::
TypeDesc
;
use
cast
::
transmute
;
#[cfg(not
est
)]
use
unstable
::
lang
::
clear_task_borrow_list
;
#[cfg(not
(test)
)]
use
unstable
::
lang
::
clear_task_borrow_list
;
#[cfg(not
est
)]
use
ptr
::
to_unsafe_ptr
;
#[cfg(not
(test)
)]
use
ptr
::
to_unsafe_ptr
;
/**
* Runtime structures
...
...
@@ -164,7 +164,7 @@ fn debug_mem() -> bool {
}
/// Destroys all managed memory (i.e. @ boxes) held by the current task.
#[cfg(not
est
)]
#[cfg(not
(test)
)]
#[lang=
"annihilate"
]
pub
unsafe
fn
annihilate
()
{
use
unstable
::
lang
::
local_free
;
...
...
src/libcore/core.rc
浏览文件 @
3bbbb314
...
...
@@ -179,9 +179,9 @@ pub mod managed;
/* Core language traits */
#[cfg(not
est
)] pub mod kinds;
#[cfg(not
est
)] pub mod ops;
#[cfg(not
est
)] pub mod cmp;
#[cfg(not
(test)
)] pub mod kinds;
#[cfg(not
(test)
)] pub mod ops;
#[cfg(not
(test)
)] pub mod cmp;
/* Common traits */
...
...
src/libcore/logging.rs
浏览文件 @
3bbbb314
...
...
@@ -42,7 +42,7 @@ pub fn console_off() {
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
#[lang=
"log_type"
]
pub
fn
log_type
<
T
>
(
level
:
u32
,
object
:
&
T
)
{
use
cast
::
transmute
;
...
...
src/libcore/managed.rs
浏览文件 @
3bbbb314
...
...
@@ -12,7 +12,7 @@
use
ptr
::
to_unsafe_ptr
;
#[cfg(not
est
)]
use
cmp
::{
Eq
,
Ord
};
#[cfg(not
(test)
)]
use
cmp
::{
Eq
,
Ord
};
pub
mod
raw
{
use
intrinsic
::
TyDesc
;
...
...
@@ -49,7 +49,7 @@ pub fn mut_ptr_eq<T>(a: @mut T, b: @mut T) -> bool {
a_ptr
==
b_ptr
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
<
T
:
Eq
>
Eq
for
@
T
{
#[inline(always)]
fn
eq
(
&
self
,
other
:
&@
T
)
->
bool
{
*
(
*
self
)
==
*
(
*
other
)
}
...
...
@@ -57,7 +57,7 @@ fn eq(&self, other: &@T) -> bool { *(*self) == *(*other) }
fn
ne
(
&
self
,
other
:
&@
T
)
->
bool
{
*
(
*
self
)
!=
*
(
*
other
)
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
<
T
:
Eq
>
Eq
for
@
mut
T
{
#[inline(always)]
fn
eq
(
&
self
,
other
:
&@
mut
T
)
->
bool
{
*
(
*
self
)
==
*
(
*
other
)
}
...
...
@@ -65,7 +65,7 @@ fn eq(&self, other: &@mut T) -> bool { *(*self) == *(*other) }
fn
ne
(
&
self
,
other
:
&@
mut
T
)
->
bool
{
*
(
*
self
)
!=
*
(
*
other
)
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
<
T
:
Ord
>
Ord
for
@
T
{
#[inline(always)]
fn
lt
(
&
self
,
other
:
&@
T
)
->
bool
{
*
(
*
self
)
<
*
(
*
other
)
}
...
...
@@ -77,7 +77,7 @@ fn ge(&self, other: &@T) -> bool { *(*self) >= *(*other) }
fn
gt
(
&
self
,
other
:
&@
T
)
->
bool
{
*
(
*
self
)
>
*
(
*
other
)
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
<
T
:
Ord
>
Ord
for
@
mut
T
{
#[inline(always)]
fn
lt
(
&
self
,
other
:
&@
mut
T
)
->
bool
{
*
(
*
self
)
<
*
(
*
other
)
}
...
...
src/libcore/nil.rs
浏览文件 @
3bbbb314
...
...
@@ -14,10 +14,10 @@
*/
#[cfg(not
est
)]
#[cfg(not
(test)
)]
use
prelude
::
*
;
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Eq
for
()
{
#[inline(always)]
fn
eq
(
&
self
,
_
other
:
&
())
->
bool
{
true
}
...
...
@@ -25,7 +25,7 @@ fn eq(&self, _other: &()) -> bool { true }
fn
ne
(
&
self
,
_
other
:
&
())
->
bool
{
false
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Ord
for
()
{
#[inline(always)]
fn
lt
(
&
self
,
_
other
:
&
())
->
bool
{
false
}
...
...
@@ -37,13 +37,13 @@ fn ge(&self, _other: &()) -> bool { true }
fn
gt
(
&
self
,
_
other
:
&
())
->
bool
{
false
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
TotalOrd
for
()
{
#[inline(always)]
fn
cmp
(
&
self
,
_
other
:
&
())
->
Ordering
{
Equal
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
TotalEq
for
()
{
#[inline(always)]
fn
equals
(
&
self
,
_
other
:
&
())
->
bool
{
true
}
...
...
src/libcore/num/f32.rs
浏览文件 @
3bbbb314
...
...
@@ -198,7 +198,7 @@ pub mod consts {
impl
Num
for
f32
{}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Eq
for
f32
{
#[inline(always)]
fn
eq
(
&
self
,
other
:
&
f32
)
->
bool
{
(
*
self
)
==
(
*
other
)
}
...
...
@@ -206,7 +206,7 @@ fn eq(&self, other: &f32) -> bool { (*self) == (*other) }
fn
ne
(
&
self
,
other
:
&
f32
)
->
bool
{
(
*
self
)
!=
(
*
other
)
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
ApproxEq
<
f32
>
for
f32
{
#[inline(always)]
fn
approx_epsilon
()
->
f32
{
1.0e-6
}
...
...
@@ -222,7 +222,7 @@ fn approx_eq_eps(&self, other: &f32, approx_epsilon: &f32) -> bool {
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Ord
for
f32
{
#[inline(always)]
fn
lt
(
&
self
,
other
:
&
f32
)
->
bool
{
(
*
self
)
<
(
*
other
)
}
...
...
@@ -272,37 +272,37 @@ impl One for f32 {
fn
one
()
->
f32
{
1.0
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Add
<
f32
,
f32
>
for
f32
{
#[inline(always)]
fn
add
(
&
self
,
other
:
&
f32
)
->
f32
{
*
self
+
*
other
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Sub
<
f32
,
f32
>
for
f32
{
#[inline(always)]
fn
sub
(
&
self
,
other
:
&
f32
)
->
f32
{
*
self
-
*
other
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Mul
<
f32
,
f32
>
for
f32
{
#[inline(always)]
fn
mul
(
&
self
,
other
:
&
f32
)
->
f32
{
*
self
*
*
other
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Div
<
f32
,
f32
>
for
f32
{
#[inline(always)]
fn
div
(
&
self
,
other
:
&
f32
)
->
f32
{
*
self
/
*
other
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Rem
<
f32
,
f32
>
for
f32
{
#[inline(always)]
fn
rem
(
&
self
,
other
:
&
f32
)
->
f32
{
*
self
%
*
other
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Neg
<
f32
>
for
f32
{
#[inline(always)]
fn
neg
(
&
self
)
->
f32
{
-*
self
}
...
...
src/libcore/num/f64.rs
浏览文件 @
3bbbb314
...
...
@@ -221,7 +221,7 @@ pub mod consts {
impl
Num
for
f64
{}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Eq
for
f64
{
#[inline(always)]
fn
eq
(
&
self
,
other
:
&
f64
)
->
bool
{
(
*
self
)
==
(
*
other
)
}
...
...
@@ -229,7 +229,7 @@ fn eq(&self, other: &f64) -> bool { (*self) == (*other) }
fn
ne
(
&
self
,
other
:
&
f64
)
->
bool
{
(
*
self
)
!=
(
*
other
)
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
ApproxEq
<
f64
>
for
f64
{
#[inline(always)]
fn
approx_epsilon
()
->
f64
{
1.0e-6
}
...
...
@@ -245,7 +245,7 @@ fn approx_eq_eps(&self, other: &f64, approx_epsilon: &f64) -> bool {
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Ord
for
f64
{
#[inline(always)]
fn
lt
(
&
self
,
other
:
&
f64
)
->
bool
{
(
*
self
)
<
(
*
other
)
}
...
...
@@ -295,28 +295,28 @@ impl One for f64 {
fn
one
()
->
f64
{
1.0
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Add
<
f64
,
f64
>
for
f64
{
fn
add
(
&
self
,
other
:
&
f64
)
->
f64
{
*
self
+
*
other
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Sub
<
f64
,
f64
>
for
f64
{
fn
sub
(
&
self
,
other
:
&
f64
)
->
f64
{
*
self
-
*
other
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Mul
<
f64
,
f64
>
for
f64
{
fn
mul
(
&
self
,
other
:
&
f64
)
->
f64
{
*
self
*
*
other
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Div
<
f64
,
f64
>
for
f64
{
fn
div
(
&
self
,
other
:
&
f64
)
->
f64
{
*
self
/
*
other
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Rem
<
f64
,
f64
>
for
f64
{
#[inline(always)]
fn
rem
(
&
self
,
other
:
&
f64
)
->
f64
{
*
self
%
*
other
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Neg
<
f64
>
for
f64
{
fn
neg
(
&
self
)
->
f64
{
-*
self
}
}
...
...
src/libcore/num/float.rs
浏览文件 @
3bbbb314
...
...
@@ -363,7 +363,7 @@ pub fn tan(x: float) -> float {
impl
Num
for
float
{}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Eq
for
float
{
#[inline(always)]
fn
eq
(
&
self
,
other
:
&
float
)
->
bool
{
(
*
self
)
==
(
*
other
)
}
...
...
@@ -371,7 +371,7 @@ fn eq(&self, other: &float) -> bool { (*self) == (*other) }
fn
ne
(
&
self
,
other
:
&
float
)
->
bool
{
(
*
self
)
!=
(
*
other
)
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
ApproxEq
<
float
>
for
float
{
#[inline(always)]
fn
approx_epsilon
()
->
float
{
1.0e-6
}
...
...
@@ -387,7 +387,7 @@ fn approx_eq_eps(&self, other: &float, approx_epsilon: &float) -> bool {
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Ord
for
float
{
#[inline(always)]
fn
lt
(
&
self
,
other
:
&
float
)
->
bool
{
(
*
self
)
<
(
*
other
)
}
...
...
@@ -695,36 +695,36 @@ fn y1(&self) -> float { y1(*self as f64) as float }
fn
yn
(
&
self
,
n
:
int
)
->
float
{
yn
(
n
as
c_int
,
*
self
as
f64
)
as
float
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Add
<
float
,
float
>
for
float
{
#[inline(always)]
fn
add
(
&
self
,
other
:
&
float
)
->
float
{
*
self
+
*
other
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Sub
<
float
,
float
>
for
float
{
#[inline(always)]
fn
sub
(
&
self
,
other
:
&
float
)
->
float
{
*
self
-
*
other
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Mul
<
float
,
float
>
for
float
{
#[inline(always)]
fn
mul
(
&
self
,
other
:
&
float
)
->
float
{
*
self
*
*
other
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Div
<
float
,
float
>
for
float
{
#[inline(always)]
fn
div
(
&
self
,
other
:
&
float
)
->
float
{
*
self
/
*
other
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Rem
<
float
,
float
>
for
float
{
#[inline(always)]
fn
rem
(
&
self
,
other
:
&
float
)
->
float
{
*
self
%
*
other
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Neg
<
float
>
for
float
{
#[inline(always)]
fn
neg
(
&
self
)
->
float
{
-*
self
}
...
...
src/libcore/num/int-template.rs
浏览文件 @
3bbbb314
...
...
@@ -131,7 +131,7 @@ pub fn abs(i: T) -> T { i.abs() }
impl
Num
for
T
{}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Ord
for
T
{
#[inline(always)]
fn
lt
(
&
self
,
other
:
&
T
)
->
bool
{
return
(
*
self
)
<
(
*
other
);
}
...
...
@@ -143,7 +143,7 @@ impl Ord for T {
fn
gt
(
&
self
,
other
:
&
T
)
->
bool
{
return
(
*
self
)
>
(
*
other
);
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Eq
for
T
{
#[inline(always)]
fn
eq
(
&
self
,
other
:
&
T
)
->
bool
{
return
(
*
self
)
==
(
*
other
);
}
...
...
@@ -182,25 +182,25 @@ impl One for T {
fn
one
()
->
T
{
1
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Add
<
T
,
T
>
for
T
{
#[inline(always)]
fn
add
(
&
self
,
other
:
&
T
)
->
T
{
*
self
+
*
other
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Sub
<
T
,
T
>
for
T
{
#[inline(always)]
fn
sub
(
&
self
,
other
:
&
T
)
->
T
{
*
self
-
*
other
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Mul
<
T
,
T
>
for
T
{
#[inline(always)]
fn
mul
(
&
self
,
other
:
&
T
)
->
T
{
*
self
*
*
other
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Div
<
T
,
T
>
for
T
{
///
/// Integer division, truncated towards 0. As this behaviour reflects the underlying
...
...
@@ -224,7 +224,7 @@ impl Div<T,T> for T {
fn
div
(
&
self
,
other
:
&
T
)
->
T
{
*
self
/
*
other
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Rem
<
T
,
T
>
for
T
{
///
/// Returns the integer remainder after division, satisfying:
...
...
@@ -251,7 +251,7 @@ impl Rem<T,T> for T {
fn
rem
(
&
self
,
other
:
&
T
)
->
T
{
*
self
%
*
other
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Neg
<
T
>
for
T
{
#[inline(always)]
fn
neg
(
&
self
)
->
T
{
-*
self
}
...
...
@@ -417,37 +417,37 @@ fn is_odd(&self) -> bool { !self.is_even() }
impl
Bitwise
for
T
{}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
BitOr
<
T
,
T
>
for
T
{
#[inline(always)]
fn
bitor
(
&
self
,
other
:
&
T
)
->
T
{
*
self
|
*
other
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
BitAnd
<
T
,
T
>
for
T
{
#[inline(always)]
fn
bitand
(
&
self
,
other
:
&
T
)
->
T
{
*
self
&
*
other
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
BitXor
<
T
,
T
>
for
T
{
#[inline(always)]
fn
bitxor
(
&
self
,
other
:
&
T
)
->
T
{
*
self
^
*
other
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Shl
<
T
,
T
>
for
T
{
#[inline(always)]
fn
shl
(
&
self
,
other
:
&
T
)
->
T
{
*
self
<<
*
other
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Shr
<
T
,
T
>
for
T
{
#[inline(always)]
fn
shr
(
&
self
,
other
:
&
T
)
->
T
{
*
self
>>
*
other
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Not
<
T
>
for
T
{
#[inline(always)]
fn
not
(
&
self
)
->
T
{
!*
self
}
...
...
src/libcore/num/uint-template.rs
浏览文件 @
3bbbb314
...
...
@@ -96,7 +96,7 @@ pub fn compl(i: T) -> T {
impl
Num
for
T
{}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Ord
for
T
{
#[inline(always)]
fn
lt
(
&
self
,
other
:
&
T
)
->
bool
{
(
*
self
)
<
(
*
other
)
}
...
...
@@ -108,7 +108,7 @@ fn ge(&self, other: &T) -> bool { (*self) >= (*other) }
fn
gt
(
&
self
,
other
:
&
T
)
->
bool
{
(
*
self
)
>
(
*
other
)
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Eq
for
T
{
#[inline(always)]
fn
eq
(
&
self
,
other
:
&
T
)
->
bool
{
return
(
*
self
)
==
(
*
other
);
}
...
...
@@ -147,37 +147,37 @@ impl One for T {
fn
one
()
->
T
{
1
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Add
<
T
,
T
>
for
T
{
#[inline(always)]
fn
add
(
&
self
,
other
:
&
T
)
->
T
{
*
self
+
*
other
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Sub
<
T
,
T
>
for
T
{
#[inline(always)]
fn
sub
(
&
self
,
other
:
&
T
)
->
T
{
*
self
-
*
other
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Mul
<
T
,
T
>
for
T
{
#[inline(always)]
fn
mul
(
&
self
,
other
:
&
T
)
->
T
{
*
self
*
*
other
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Div
<
T
,
T
>
for
T
{
#[inline(always)]
fn
div
(
&
self
,
other
:
&
T
)
->
T
{
*
self
/
*
other
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Rem
<
T
,
T
>
for
T
{
#[inline(always)]
fn
rem
(
&
self
,
other
:
&
T
)
->
T
{
*
self
%
*
other
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Neg
<
T
>
for
T
{
#[inline(always)]
fn
neg
(
&
self
)
->
T
{
-*
self
}
...
...
@@ -240,37 +240,37 @@ fn is_odd(&self) -> bool { !self.is_even() }
impl
Bitwise
for
T
{}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
BitOr
<
T
,
T
>
for
T
{
#[inline(always)]
fn
bitor
(
&
self
,
other
:
&
T
)
->
T
{
*
self
|
*
other
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
BitAnd
<
T
,
T
>
for
T
{
#[inline(always)]
fn
bitand
(
&
self
,
other
:
&
T
)
->
T
{
*
self
&
*
other
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
BitXor
<
T
,
T
>
for
T
{
#[inline(always)]
fn
bitxor
(
&
self
,
other
:
&
T
)
->
T
{
*
self
^
*
other
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Shl
<
T
,
T
>
for
T
{
#[inline(always)]
fn
shl
(
&
self
,
other
:
&
T
)
->
T
{
*
self
<<
*
other
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Shr
<
T
,
T
>
for
T
{
#[inline(always)]
fn
shr
(
&
self
,
other
:
&
T
)
->
T
{
*
self
>>
*
other
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Not
<
T
>
for
T
{
#[inline(always)]
fn
not
(
&
self
)
->
T
{
!*
self
}
...
...
src/libcore/owned.rs
浏览文件 @
3bbbb314
...
...
@@ -10,9 +10,9 @@
//! Operations on unique pointer types
#[cfg(not
est
)]
use
cmp
::{
Eq
,
Ord
};
#[cfg(not
(test)
)]
use
cmp
::{
Eq
,
Ord
};
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
<
T
:
Eq
>
Eq
for
~
T
{
#[inline(always)]
fn
eq
(
&
self
,
other
:
&~
T
)
->
bool
{
*
(
*
self
)
==
*
(
*
other
)
}
...
...
@@ -20,7 +20,7 @@ fn eq(&self, other: &~T) -> bool { *(*self) == *(*other) }
fn
ne
(
&
self
,
other
:
&~
T
)
->
bool
{
*
(
*
self
)
!=
*
(
*
other
)
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
<
T
:
Ord
>
Ord
for
~
T
{
#[inline(always)]
fn
lt
(
&
self
,
other
:
&~
T
)
->
bool
{
*
(
*
self
)
<
*
(
*
other
)
}
...
...
src/libcore/ptr.rs
浏览文件 @
3bbbb314
...
...
@@ -15,7 +15,7 @@
use
libc
::{
c_void
,
size_t
};
use
sys
;
#[cfg(not
est
)]
use
cmp
::{
Eq
,
Ord
};
#[cfg(not
(test)
)]
use
cmp
::{
Eq
,
Ord
};
use
uint
;
pub
mod
libc_
{
...
...
@@ -243,7 +243,7 @@ fn offset(&self, count: uint) -> *mut T { mut_offset(*self, count) }
}
// Equality for pointers
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
<
T
>
Eq
for
*
const
T
{
#[inline(always)]
fn
eq
(
&
self
,
other
:
&*
const
T
)
->
bool
{
...
...
@@ -258,7 +258,7 @@ fn ne(&self, other: &*const T) -> bool { !(*self).eq(other) }
}
// Comparison for pointers
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
<
T
>
Ord
for
*
const
T
{
#[inline(always)]
fn
lt
(
&
self
,
other
:
&*
const
T
)
->
bool
{
...
...
@@ -295,7 +295,7 @@ fn gt(&self, other: &*const T) -> bool {
}
// Equality for region pointers
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
<
'self
,
T
:
Eq
>
Eq
for
&
'self
T
{
#[inline(always)]
fn
eq
(
&
self
,
other
:
&
&
'self
T
)
->
bool
{
...
...
@@ -308,7 +308,7 @@ fn ne(&self, other: & &'self T) -> bool {
}
// Comparison for region pointers
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
<
'self
,
T
:
Ord
>
Ord
for
&
'self
T
{
#[inline(always)]
fn
lt
(
&
self
,
other
:
&
&
'self
T
)
->
bool
{
...
...
src/libcore/str.rs
浏览文件 @
3bbbb314
...
...
@@ -32,7 +32,7 @@
use
vec
;
use
to_str
::
ToStr
;
#[cfg(not
est
)]
use
cmp
::{
Eq
,
Ord
,
Equiv
,
TotalEq
};
#[cfg(not
(test)
)]
use
cmp
::{
Eq
,
Ord
,
Equiv
,
TotalEq
};
/*
Section: Creating a string
...
...
@@ -913,7 +913,7 @@ pub fn replace(s: &str, from: &str, to: &str) -> ~str {
*/
/// Bytewise slice equality
#[cfg(not
est
)]
#[cfg(not
(test)
)]
#[lang=
"str_eq"
]
#[inline]
pub
fn
eq_slice
(
a
:
&
str
,
b
:
&
str
)
->
bool
{
...
...
@@ -949,7 +949,7 @@ pub fn eq_slice(a: &str, b: &str) -> bool {
}
/// Bytewise string equality
#[cfg(not
est
)]
#[cfg(not
(test)
)]
#[lang=
"uniq_str_eq"
]
#[inline]
pub
fn
eq
(
a
:
&~
str
,
b
:
&~
str
)
->
bool
{
...
...
@@ -977,19 +977,19 @@ fn cmp(a: &str, b: &str) -> Ordering {
a
.len
()
.cmp
(
&
b
.len
())
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
<
'self
>
TotalOrd
for
&
'self
str
{
#[inline]
fn
cmp
(
&
self
,
other
:
&
&
'self
str
)
->
Ordering
{
cmp
(
*
self
,
*
other
)
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
TotalOrd
for
~
str
{
#[inline]
fn
cmp
(
&
self
,
other
:
&~
str
)
->
Ordering
{
cmp
(
*
self
,
*
other
)
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
TotalOrd
for
@
str
{
#[inline]
fn
cmp
(
&
self
,
other
:
&@
str
)
->
Ordering
{
cmp
(
*
self
,
*
other
)
}
...
...
@@ -1030,7 +1030,7 @@ fn gt(a: &str, b: &str) -> bool {
!
le
(
a
,
b
)
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
<
'self
>
Eq
for
&
'self
str
{
#[inline(always)]
fn
eq
(
&
self
,
other
:
&
&
'self
str
)
->
bool
{
...
...
@@ -1040,7 +1040,7 @@ fn eq(&self, other: & &'self str) -> bool {
fn
ne
(
&
self
,
other
:
&
&
'self
str
)
->
bool
{
!
(
*
self
)
.eq
(
other
)
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Eq
for
~
str
{
#[inline(always)]
fn
eq
(
&
self
,
other
:
&~
str
)
->
bool
{
...
...
@@ -1050,7 +1050,7 @@ fn eq(&self, other: &~str) -> bool {
fn
ne
(
&
self
,
other
:
&~
str
)
->
bool
{
!
(
*
self
)
.eq
(
other
)
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Eq
for
@
str
{
#[inline(always)]
fn
eq
(
&
self
,
other
:
&@
str
)
->
bool
{
...
...
@@ -1060,7 +1060,7 @@ fn eq(&self, other: &@str) -> bool {
fn
ne
(
&
self
,
other
:
&@
str
)
->
bool
{
!
(
*
self
)
.eq
(
other
)
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
<
'self
>
TotalEq
for
&
'self
str
{
#[inline(always)]
fn
equals
(
&
self
,
other
:
&
&
'self
str
)
->
bool
{
...
...
@@ -1068,7 +1068,7 @@ fn equals(&self, other: & &'self str) -> bool {
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
TotalEq
for
~
str
{
#[inline(always)]
fn
equals
(
&
self
,
other
:
&~
str
)
->
bool
{
...
...
@@ -1076,7 +1076,7 @@ fn equals(&self, other: &~str) -> bool {
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
TotalEq
for
@
str
{
#[inline(always)]
fn
equals
(
&
self
,
other
:
&@
str
)
->
bool
{
...
...
@@ -1084,7 +1084,7 @@ fn equals(&self, other: &@str) -> bool {
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Ord
for
~
str
{
#[inline(always)]
fn
lt
(
&
self
,
other
:
&~
str
)
->
bool
{
lt
((
*
self
),
(
*
other
))
}
...
...
@@ -1096,7 +1096,7 @@ fn ge(&self, other: &~str) -> bool { ge((*self), (*other)) }
fn
gt
(
&
self
,
other
:
&~
str
)
->
bool
{
gt
((
*
self
),
(
*
other
))
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
<
'self
>
Ord
for
&
'self
str
{
#[inline(always)]
fn
lt
(
&
self
,
other
:
&
&
'self
str
)
->
bool
{
lt
((
*
self
),
(
*
other
))
}
...
...
@@ -1108,7 +1108,7 @@ fn ge(&self, other: & &'self str) -> bool { ge((*self), (*other)) }
fn
gt
(
&
self
,
other
:
&
&
'self
str
)
->
bool
{
gt
((
*
self
),
(
*
other
))
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
Ord
for
@
str
{
#[inline(always)]
fn
lt
(
&
self
,
other
:
&@
str
)
->
bool
{
lt
((
*
self
),
(
*
other
))
}
...
...
@@ -1120,7 +1120,7 @@ fn ge(&self, other: &@str) -> bool { ge((*self), (*other)) }
fn
gt
(
&
self
,
other
:
&@
str
)
->
bool
{
gt
((
*
self
),
(
*
other
))
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
<
'self
>
Equiv
<~
str
>
for
&
'self
str
{
#[inline(always)]
fn
equiv
(
&
self
,
other
:
&~
str
)
->
bool
{
eq_slice
(
*
self
,
*
other
)
}
...
...
@@ -2451,7 +2451,7 @@ fn test_from_buf_len() {
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
pub
mod
traits
{
use
ops
::
Add
;
use
str
::
append
;
...
...
src/libcore/tuple.rs
浏览文件 @
3bbbb314
...
...
@@ -14,7 +14,7 @@
use
kinds
::
Copy
;
use
vec
;
#[cfg(not
est
)]
use
cmp
::{
Eq
,
Ord
};
#[cfg(not
(test)
)]
use
cmp
::{
Eq
,
Ord
};
pub
trait
CopyableTuple
<
T
,
U
>
{
fn
first
(
&
self
)
->
T
;
...
...
@@ -122,7 +122,7 @@ fn map<C>(&self, f: &fn(a: &A, b: &B) -> C) -> ~[C] {
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
<
A
:
Eq
>
Eq
for
(
A
,)
{
#[inline(always)]
fn
eq
(
&
self
,
other
:
&
(
A
,))
->
bool
{
...
...
@@ -138,7 +138,7 @@ fn eq(&self, other: &(A,)) -> bool {
fn
ne
(
&
self
,
other
:
&
(
A
,))
->
bool
{
!
(
*
self
)
.eq
(
other
)
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
<
A
:
Ord
>
Ord
for
(
A
,)
{
#[inline(always)]
fn
lt
(
&
self
,
other
:
&
(
A
,))
->
bool
{
...
...
@@ -161,7 +161,7 @@ fn ge(&self, other: &(A,)) -> bool { !self.lt(other) }
fn
gt
(
&
self
,
other
:
&
(
A
,))
->
bool
{
other
.lt
(
&
(
*
self
))
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
<
A
:
Eq
,
B
:
Eq
>
Eq
for
(
A
,
B
)
{
#[inline(always)]
fn
eq
(
&
self
,
other
:
&
(
A
,
B
))
->
bool
{
...
...
@@ -177,7 +177,7 @@ fn eq(&self, other: &(A, B)) -> bool {
fn
ne
(
&
self
,
other
:
&
(
A
,
B
))
->
bool
{
!
(
*
self
)
.eq
(
other
)
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
<
A
:
Ord
,
B
:
Ord
>
Ord
for
(
A
,
B
)
{
#[inline(always)]
fn
lt
(
&
self
,
other
:
&
(
A
,
B
))
->
bool
{
...
...
@@ -202,7 +202,7 @@ fn ge(&self, other: &(A, B)) -> bool { !(*self).lt(other) }
fn
gt
(
&
self
,
other
:
&
(
A
,
B
))
->
bool
{
(
*
other
)
.lt
(
&
(
*
self
))
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
<
A
:
Eq
,
B
:
Eq
,
C
:
Eq
>
Eq
for
(
A
,
B
,
C
)
{
#[inline(always)]
fn
eq
(
&
self
,
other
:
&
(
A
,
B
,
C
))
->
bool
{
...
...
@@ -219,7 +219,7 @@ fn eq(&self, other: &(A, B, C)) -> bool {
fn
ne
(
&
self
,
other
:
&
(
A
,
B
,
C
))
->
bool
{
!
(
*
self
)
.eq
(
other
)
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
<
A
:
Ord
,
B
:
Ord
,
C
:
Ord
>
Ord
for
(
A
,
B
,
C
)
{
#[inline(always)]
fn
lt
(
&
self
,
other
:
&
(
A
,
B
,
C
))
->
bool
{
...
...
src/libcore/unstable.rs
浏览文件 @
3bbbb314
...
...
@@ -35,7 +35,7 @@
#[path
=
"unstable/extfmt.rs"
]
pub
mod
extfmt
;
#[path
=
"unstable/lang.rs"
]
#[cfg(not
est
)]
#[cfg(not
(test)
)]
pub
mod
lang
;
mod
rustrt
{
...
...
src/libcore/vec.rs
浏览文件 @
3bbbb314
...
...
@@ -30,7 +30,7 @@
use
unstable
::
intrinsics
;
use
vec
;
#[cfg(not
est
)]
use
cmp
::
Equiv
;
#[cfg(not
(test)
)]
use
cmp
::
Equiv
;
pub
mod
rustrt
{
use
libc
;
...
...
@@ -1656,7 +1656,7 @@ fn equals<T: TotalEq>(a: &[T], b: &[T]) -> bool {
true
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
<
'self
,
T
:
Eq
>
Eq
for
&
'self
[
T
]
{
#[inline(always)]
fn
eq
(
&
self
,
other
:
&
&
'self
[
T
])
->
bool
{
eq
(
*
self
,
*
other
)
}
...
...
@@ -1664,7 +1664,7 @@ fn eq(&self, other: & &'self [T]) -> bool { eq(*self, *other) }
fn
ne
(
&
self
,
other
:
&
&
'self
[
T
])
->
bool
{
!
self
.eq
(
other
)
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
<
T
:
Eq
>
Eq
for
~
[
T
]
{
#[inline(always)]
fn
eq
(
&
self
,
other
:
&~
[
T
])
->
bool
{
eq
(
*
self
,
*
other
)
}
...
...
@@ -1672,7 +1672,7 @@ fn eq(&self, other: &~[T]) -> bool { eq(*self, *other) }
fn
ne
(
&
self
,
other
:
&~
[
T
])
->
bool
{
!
self
.eq
(
other
)
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
<
T
:
Eq
>
Eq
for
@
[
T
]
{
#[inline(always)]
fn
eq
(
&
self
,
other
:
&@
[
T
])
->
bool
{
eq
(
*
self
,
*
other
)
}
...
...
@@ -1680,25 +1680,25 @@ fn eq(&self, other: &@[T]) -> bool { eq(*self, *other) }
fn
ne
(
&
self
,
other
:
&@
[
T
])
->
bool
{
!
self
.eq
(
other
)
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
<
'self
,
T
:
TotalEq
>
TotalEq
for
&
'self
[
T
]
{
#[inline(always)]
fn
equals
(
&
self
,
other
:
&
&
'self
[
T
])
->
bool
{
equals
(
*
self
,
*
other
)
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
<
T
:
TotalEq
>
TotalEq
for
~
[
T
]
{
#[inline(always)]
fn
equals
(
&
self
,
other
:
&~
[
T
])
->
bool
{
equals
(
*
self
,
*
other
)
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
<
T
:
TotalEq
>
TotalEq
for
@
[
T
]
{
#[inline(always)]
fn
equals
(
&
self
,
other
:
&@
[
T
])
->
bool
{
equals
(
*
self
,
*
other
)
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
<
'self
,
T
:
Eq
>
Equiv
<~
[
T
]
>
for
&
'self
[
T
]
{
#[inline(always)]
fn
equiv
(
&
self
,
other
:
&~
[
T
])
->
bool
{
eq
(
*
self
,
*
other
)
}
...
...
@@ -1720,19 +1720,19 @@ fn cmp<T: TotalOrd>(a: &[T], b: &[T]) -> Ordering {
a
.len
()
.cmp
(
&
b
.len
())
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
<
'self
,
T
:
TotalOrd
>
TotalOrd
for
&
'self
[
T
]
{
#[inline(always)]
fn
cmp
(
&
self
,
other
:
&
&
'self
[
T
])
->
Ordering
{
cmp
(
*
self
,
*
other
)
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
<
T
:
TotalOrd
>
TotalOrd
for
~
[
T
]
{
#[inline(always)]
fn
cmp
(
&
self
,
other
:
&~
[
T
])
->
Ordering
{
cmp
(
*
self
,
*
other
)
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
<
T
:
TotalOrd
>
TotalOrd
for
@
[
T
]
{
#[inline(always)]
fn
cmp
(
&
self
,
other
:
&@
[
T
])
->
Ordering
{
cmp
(
*
self
,
*
other
)
}
...
...
@@ -1757,7 +1757,7 @@ fn le<T:Ord>(a: &[T], b: &[T]) -> bool { !lt(b, a) }
fn
ge
<
T
:
Ord
>
(
a
:
&
[
T
],
b
:
&
[
T
])
->
bool
{
!
lt
(
a
,
b
)
}
fn
gt
<
T
:
Ord
>
(
a
:
&
[
T
],
b
:
&
[
T
])
->
bool
{
lt
(
b
,
a
)
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
<
'self
,
T
:
Ord
>
Ord
for
&
'self
[
T
]
{
#[inline(always)]
fn
lt
(
&
self
,
other
:
&
&
'self
[
T
])
->
bool
{
lt
((
*
self
),
(
*
other
))
}
...
...
@@ -1769,7 +1769,7 @@ fn ge(&self, other: & &'self [T]) -> bool { ge((*self), (*other)) }
fn
gt
(
&
self
,
other
:
&
&
'self
[
T
])
->
bool
{
gt
((
*
self
),
(
*
other
))
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
<
T
:
Ord
>
Ord
for
~
[
T
]
{
#[inline(always)]
fn
lt
(
&
self
,
other
:
&~
[
T
])
->
bool
{
lt
((
*
self
),
(
*
other
))
}
...
...
@@ -1781,7 +1781,7 @@ fn ge(&self, other: &~[T]) -> bool { ge((*self), (*other)) }
fn
gt
(
&
self
,
other
:
&~
[
T
])
->
bool
{
gt
((
*
self
),
(
*
other
))
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
impl
<
T
:
Ord
>
Ord
for
@
[
T
]
{
#[inline(always)]
fn
lt
(
&
self
,
other
:
&@
[
T
])
->
bool
{
lt
((
*
self
),
(
*
other
))
}
...
...
@@ -1793,7 +1793,7 @@ fn ge(&self, other: &@[T]) -> bool { ge((*self), (*other)) }
fn
gt
(
&
self
,
other
:
&@
[
T
])
->
bool
{
gt
((
*
self
),
(
*
other
))
}
}
#[cfg(not
est
)]
#[cfg(not
(test)
)]
pub
mod
traits
{
use
kinds
::
Copy
;
use
ops
::
Add
;
...
...
src/librustc/driver/driver.rs
浏览文件 @
3bbbb314
...
...
@@ -119,9 +119,8 @@ pub fn build_configuration(sess: Session, argv0: @~str, input: &input) ->
let
default_cfg
=
default_configuration
(
sess
,
argv0
,
input
);
let
user_cfg
=
/*bad*/
copy
sess
.opts.cfg
;
// If the user wants a test runner, then add the test cfg
let
user_cfg
=
append_configuration
(
user_cfg
,
if
sess
.opts.test
{
~
"test"
}
else
{
~
"notest"
});
let
user_cfg
=
if
sess
.opts.test
{
append_configuration
(
user_cfg
,
~
"test"
)
}
else
{
user_cfg
};
// If the user requested GC, then add the GC cfg
let
user_cfg
=
append_configuration
(
user_cfg
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录