Skip to content

Commit ac59cbf

Browse files
committed
---
yaml --- r: 39798 b: refs/heads/incoming c: 4c441e9 h: refs/heads/master v: v3
1 parent 8691448 commit ac59cbf

File tree

8 files changed

+50
-71
lines changed

8 files changed

+50
-71
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: 3d5418789064fdb463e872a4e651af1c628a3650
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278
9-
refs/heads/incoming: ea937dca8995311c6ee8d73e0c45dab3d4c1a4f4
9+
refs/heads/incoming: 4c441e95d69909265e69cffd3439f890914e02b3
1010
refs/heads/dist-snap: 22efa39382d41b084fde1719df7ae8ce5697d8c9
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/src/libcore/core.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ pub mod util;
172172

173173
pub use kinds::{Const, Copy, Owned, Durable};
174174
pub use ops::{Drop};
175-
pub use ops::{Add, Sub, Mul, Div, Modulo, Neg, Not};
175+
pub use ops::{Add, Sub, Mul, Div, Modulo, Neg};
176176
pub use ops::{BitAnd, BitOr, BitXor};
177177
pub use ops::{Shl, Shr, Index};
178178

branches/incoming/src/libcore/ops.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,6 @@ pub trait Neg<Result> {
4848
pure fn neg(&self) -> Result;
4949
}
5050

51-
#[lang="not"]
52-
pub trait Not<Result> {
53-
pure fn not(&self) -> Result;
54-
}
55-
5651
#[lang="bitand"]
5752
pub trait BitAnd<RHS,Result> {
5853
pure fn bitand(&self, rhs: &RHS) -> Result;
@@ -82,3 +77,4 @@ pub trait Shr<RHS,Result> {
8277
pub trait Index<Index,Result> {
8378
pure fn index(&self, index: Index) -> Result;
8479
}
80+

branches/incoming/src/libcore/prelude.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
pub use kinds::{Const, Copy, Owned, Durable};
66
pub use ops::{Drop};
7-
pub use ops::{Add, Sub, Mul, Div, Modulo, Neg, Not};
7+
pub use ops::{Add, Sub, Mul, Div, Modulo, Neg};
88
pub use ops::{BitAnd, BitOr, BitXor};
99
pub use ops::{Shl, Shr, Index};
1010
pub use option::{Option, Some, None};

branches/incoming/src/librustc/middle/lang_items.rs

Lines changed: 41 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -50,37 +50,36 @@ pub enum LangItem {
5050
DivTraitLangItem, // 8
5151
ModuloTraitLangItem, // 9
5252
NegTraitLangItem, // 10
53-
NotTraitLangItem, // 11
54-
BitXorTraitLangItem, // 12
55-
BitAndTraitLangItem, // 13
56-
BitOrTraitLangItem, // 14
57-
ShlTraitLangItem, // 15
58-
ShrTraitLangItem, // 16
59-
IndexTraitLangItem, // 17
60-
61-
EqTraitLangItem, // 18
62-
OrdTraitLangItem, // 19
63-
64-
StrEqFnLangItem, // 20
65-
UniqStrEqFnLangItem, // 21
66-
AnnihilateFnLangItem, // 22
67-
LogTypeFnLangItem, // 23
68-
FailFnLangItem, // 24
69-
FailBoundsCheckFnLangItem, // 25
70-
ExchangeMallocFnLangItem, // 26
71-
ExchangeFreeFnLangItem, // 27
72-
MallocFnLangItem, // 28
73-
FreeFnLangItem, // 29
53+
BitXorTraitLangItem, // 11
54+
BitAndTraitLangItem, // 12
55+
BitOrTraitLangItem, // 13
56+
ShlTraitLangItem, // 14
57+
ShrTraitLangItem, // 15
58+
IndexTraitLangItem, // 16
59+
60+
EqTraitLangItem, // 17
61+
OrdTraitLangItem, // 18
62+
63+
StrEqFnLangItem, // 19
64+
UniqStrEqFnLangItem, // 20
65+
AnnihilateFnLangItem, // 21
66+
LogTypeFnLangItem, // 22
67+
FailFnLangItem, // 23
68+
FailBoundsCheckFnLangItem, // 24
69+
ExchangeMallocFnLangItem, // 25
70+
ExchangeFreeFnLangItem, // 26
71+
MallocFnLangItem, // 27
72+
FreeFnLangItem, // 28
7473
}
7574

7675
struct LanguageItems {
77-
items: [ Option<def_id> * 30 ]
76+
items: [ Option<def_id> * 29 ]
7877
}
7978

8079
impl LanguageItems {
8180
static pub fn new() -> LanguageItems {
8281
LanguageItems {
83-
items: [ None, ..30 ]
82+
items: [ None, ..29 ]
8483
}
8584
}
8685

@@ -107,26 +106,25 @@ impl LanguageItems {
107106
8 => "div",
108107
9 => "modulo",
109108
10 => "neg",
110-
11 => "not",
111-
12 => "bitxor",
112-
13 => "bitand",
113-
14 => "bitor",
114-
15 => "shl",
115-
16 => "shr",
116-
17 => "index",
117-
18 => "eq",
118-
19 => "ord",
119-
120-
20 => "str_eq",
121-
21 => "uniq_str_eq",
122-
22 => "annihilate",
123-
23 => "log_type",
124-
24 => "fail_",
125-
25 => "fail_bounds_check",
126-
26 => "exchange_malloc",
127-
27 => "exchange_free",
128-
28 => "malloc",
129-
29 => "free",
109+
11 => "bitxor",
110+
12 => "bitand",
111+
13 => "bitor",
112+
14 => "shl",
113+
15 => "shr",
114+
16 => "index",
115+
17 => "eq",
116+
18 => "ord",
117+
118+
19 => "str_eq",
119+
20 => "uniq_str_eq",
120+
21 => "annihilate",
121+
22 => "log_type",
122+
23 => "fail_",
123+
24 => "fail_bounds_check",
124+
25 => "exchange_malloc",
125+
26 => "exchange_free",
126+
27 => "malloc",
127+
28 => "free",
130128

131129
_ => "???"
132130
}
@@ -169,9 +167,6 @@ impl LanguageItems {
169167
pub fn neg_trait(&const self) -> def_id {
170168
self.items[NegTraitLangItem as uint].get()
171169
}
172-
pub fn not_trait(&const self) -> def_id {
173-
self.items[NotTraitLangItem as uint].get()
174-
}
175170
pub fn bitxor_trait(&const self) -> def_id {
176171
self.items[BitXorTraitLangItem as uint].get()
177172
}
@@ -249,7 +244,6 @@ fn LanguageItemCollector(crate: @crate,
249244
item_refs.insert(~"div", DivTraitLangItem as uint);
250245
item_refs.insert(~"modulo", ModuloTraitLangItem as uint);
251246
item_refs.insert(~"neg", NegTraitLangItem as uint);
252-
item_refs.insert(~"not", NotTraitLangItem as uint);
253247
item_refs.insert(~"bitxor", BitXorTraitLangItem as uint);
254248
item_refs.insert(~"bitand", BitAndTraitLangItem as uint);
255249
item_refs.insert(~"bitor", BitOrTraitLangItem as uint);

branches/incoming/src/librustc/middle/resolve.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ use syntax::ast::{ty_str, ty_u, ty_u16, ty_u32, ty_u64, ty_u8, ty_uint};
5454
use syntax::ast::{type_value_ns, ty_param_bound, unnamed_field};
5555
use syntax::ast::{variant, view_item, view_item_export, view_item_import};
5656
use syntax::ast::{view_item_use, view_path_glob, view_path_list};
57-
use syntax::ast::{view_path_simple, visibility, anonymous, named, not};
57+
use syntax::ast::{view_path_simple, visibility, anonymous, named};
5858
use syntax::ast_util::{def_id_of_def, dummy_sp, local_def};
5959
use syntax::ast_util::{path_to_ident, walk_pat, trait_method_to_ty_method};
6060
use syntax::ast_util::{Privacy, Public, Private, visibility_to_privacy};
@@ -5217,10 +5217,6 @@ impl Resolver {
52175217
self.add_fixed_trait_for_expr(expr.id,
52185218
self.lang_items.neg_trait());
52195219
}
5220-
expr_unary(not, _) => {
5221-
self.add_fixed_trait_for_expr(expr.id,
5222-
self.lang_items.not_trait());
5223-
}
52245220
expr_index(*) => {
52255221
self.add_fixed_trait_for_expr(expr.id,
52265222
self.lang_items.index_trait());

branches/incoming/src/libstd/net_url.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,12 +1077,16 @@ mod tests {
10771077

10781078
#[test]
10791079
fn test_decode_form_urlencoded() {
1080+
// FIXME #4449: Commented out because this causes an ICE, but only
1081+
// on FreeBSD
1082+
/*
10801083
assert decode_form_urlencoded(~[]).len() == 0;
10811084
10821085
let s = str::to_bytes("a=1&foo+bar=abc&foo+bar=12+%3D+34");
10831086
let form = decode_form_urlencoded(s);
10841087
assert form.len() == 2;
10851088
assert form.get_ref(&~"a") == &~[~"1"];
10861089
assert form.get_ref(&~"foo bar") == &~[~"abc", ~"12 = 34"];
1090+
*/
10871091
}
10881092
}

branches/incoming/src/test/run-pass/operator-overloading.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,6 @@ impl Point : ops::Neg<Point> {
3434
}
3535
}
3636

37-
impl Point : ops::Not<Point> {
38-
pure fn not(&self) -> Point {
39-
Point {x: !self.x, y: !self.y }
40-
}
41-
}
42-
4337
impl Point : ops::Index<bool,int> {
4438
pure fn index(&self, +x: bool) -> int {
4539
if x { self.x } else { self.y }
@@ -61,11 +55,6 @@ fn main() {
6155
assert -p == Point {x: -11, y: -22};
6256
assert p[true] == 11;
6357
assert p[false] == 22;
64-
65-
let q = !p;
66-
assert q.x == !(p.x);
67-
assert q.y == !(p.y);
68-
6958
// Issue #1733
7059
fn~(_x: int){}(p[true]);
7160
}

0 commit comments

Comments
 (0)