Skip to content

Commit 8b7956a

Browse files
committed
---
yaml --- r: 65473 b: refs/heads/master c: 4f92d3a h: refs/heads/master i: 65471: c0b7bd9 v: v3
1 parent 51d09a5 commit 8b7956a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+196
-315
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 29aba8033afa4cab0261c82d5a4eded4b79af656
2+
refs/heads/master: 4f92d3a11c11c18230e18c981ab0aaf95baef6e7
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 18e3db7392d2d0697b7e27d6d986139960144d85
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9

trunk/doc/tutorial-ffi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ impl<T: Owned> Drop for Unique<T> {
188188
unsafe {
189189
let mut x = intrinsics::init(); // dummy value to swap in
190190
// moving the object out is needed to call the destructor
191-
ptr::replace_ptr(self.ptr, x);
191+
util::replace_ptr(self.ptr, x);
192192
free(self.ptr as *c_void)
193193
}
194194
}

trunk/src/etc/kate/rust.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
<item> Copy </item>
5050
<item> Send </item>
5151
<item> Owned </item>
52-
<item> Sized </item>
5352
<item> Eq </item>
5453
<item> Ord </item>
5554
<item> Num </item>

trunk/src/etc/vim/syntax/rust.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ syn keyword rustType size_t ptrdiff_t clock_t time_t
4444
syn keyword rustType c_longlong c_ulonglong intptr_t uintptr_t
4545
syn keyword rustType off_t dev_t ino_t pid_t mode_t ssize_t
4646

47-
syn keyword rustTrait Const Copy Send Owned Sized " inherent traits
47+
syn keyword rustTrait Const Copy Send Owned " inherent traits
4848
syn keyword rustTrait Eq Ord Num Ptr
4949
syn keyword rustTrait Drop Add Sub Mul Quot Rem Neg BitAnd BitOr
5050
syn keyword rustTrait BitXor Shl Shr Index

trunk/src/libextra/bitv.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -13,6 +13,7 @@ use core::prelude::*;
1313
use core::cmp;
1414
use core::ops;
1515
use core::uint;
16+
use core::vec::from_elem;
1617
use core::vec;
1718

1819
struct SmallBitv {

trunk/src/libextra/rc.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ use core::libc::{c_void, size_t, malloc, free};
2828
use core::ptr;
2929
use core::sys;
3030
use core::unstable::intrinsics;
31+
use core::util;
3132

3233
struct RcBox<T> {
3334
value: T,
@@ -72,7 +73,7 @@ impl<T> Drop for Rc<T> {
7273
unsafe {
7374
(*self.ptr).count -= 1;
7475
if (*self.ptr).count == 0 {
75-
ptr::replace_ptr(self.ptr, intrinsics::uninit());
76+
util::replace_ptr(self.ptr, intrinsics::uninit());
7677
free(self.ptr as *c_void)
7778
}
7879
}
@@ -222,7 +223,7 @@ impl<T> Drop for RcMut<T> {
222223
unsafe {
223224
(*self.ptr).count -= 1;
224225
if (*self.ptr).count == 0 {
225-
ptr::replace_ptr(self.ptr, uninit());
226+
util::replace_ptr(self.ptr, uninit());
226227
free(self.ptr as *c_void)
227228
}
228229
}

trunk/src/libextra/test.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -24,11 +24,13 @@ use term;
2424
use core::comm::{stream, SharedChan};
2525
use core::either;
2626
use core::io;
27+
use core::num;
2728
use core::option;
2829
use core::result;
2930
use core::str;
3031
use core::task;
3132
use core::to_str::ToStr;
33+
use core::u64;
3234
use core::uint;
3335
use core::vec;
3436

trunk/src/libextra/uv_global_loop.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -16,7 +16,9 @@ use iotask = uv_iotask;
1616
use uv_iotask::{IoTask, spawn_iotask};
1717

1818
use core::comm::Chan;
19+
use core::libc;
1920
use core::option::{Some, None};
21+
use core::str;
2022
use core::task::task;
2123
use core::unstable::global::{global_data_clone_create, global_data_clone};
2224
use core::unstable::weak_task::weaken_task;

trunk/src/librustc/back/link.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -106,7 +106,9 @@ pub mod jit {
106106
use metadata::cstore;
107107

108108
use core::cast;
109+
use core::char;
109110
use core::libc::c_int;
111+
use core::os;
110112
use core::ptr;
111113
use core::str;
112114

trunk/src/librustc/back/passes.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -12,7 +12,7 @@ use core::prelude::*;
1212
use core::str;
1313
use core::io;
1414

15-
use driver::session::{OptLevel, No, Less, Aggressive};
15+
use driver::session::{OptLevel, No, Less, Default, Aggressive};
1616
use driver::session::{Session};
1717
use lib::llvm::{PassRef, ModuleRef,PassManagerRef,TargetDataRef};
1818
use lib::llvm::llvm;

trunk/src/librustc/metadata/tydecode.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -569,9 +569,6 @@ fn parse_bounds(st: @mut PState, conv: conv_did) -> ty::ParamBounds {
569569
'O' => {
570570
param_bounds.builtin_bounds.add(ty::BoundStatic);
571571
}
572-
'Z' => {
573-
param_bounds.builtin_bounds.add(ty::BoundSized);
574-
}
575572
'I' => {
576573
param_bounds.trait_bounds.push(@parse_trait_ref(st, conv));
577574
}

trunk/src/librustc/metadata/tyencode.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,6 @@ fn enc_bounds(w: @io::Writer, cx: @ctxt, bs: &ty::ParamBounds) {
403403
ty::BoundCopy => w.write_char('C'),
404404
ty::BoundConst => w.write_char('K'),
405405
ty::BoundStatic => w.write_char('O'),
406-
ty::BoundSized => w.write_char('Z'),
407406
}
408407
}
409408

trunk/src/librustc/middle/lang_items.rs

Lines changed: 76 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -36,56 +36,55 @@ pub enum LangItem {
3636
ConstTraitLangItem, // 0
3737
CopyTraitLangItem, // 1
3838
OwnedTraitLangItem, // 2
39-
SizedTraitLangItem, // 3
4039

41-
DropTraitLangItem, // 4
40+
DropTraitLangItem, // 3
4241

43-
AddTraitLangItem, // 5
44-
SubTraitLangItem, // 6
45-
MulTraitLangItem, // 7
46-
DivTraitLangItem, // 8
47-
RemTraitLangItem, // 9
48-
NegTraitLangItem, // 10
49-
NotTraitLangItem, // 11
42+
AddTraitLangItem, // 4
43+
SubTraitLangItem, // 5
44+
MulTraitLangItem, // 6
45+
DivTraitLangItem, // 7
46+
RemTraitLangItem, // 8
47+
NegTraitLangItem, // 9
48+
NotTraitLangItem, // 10
5049
BitXorTraitLangItem, // 11
51-
BitAndTraitLangItem, // 13
52-
BitOrTraitLangItem, // 14
53-
ShlTraitLangItem, // 15
54-
ShrTraitLangItem, // 16
55-
IndexTraitLangItem, // 17
56-
57-
EqTraitLangItem, // 18
58-
OrdTraitLangItem, // 19
59-
60-
StrEqFnLangItem, // 20
61-
UniqStrEqFnLangItem, // 21
62-
AnnihilateFnLangItem, // 22
63-
LogTypeFnLangItem, // 23
64-
FailFnLangItem, // 24
65-
FailBoundsCheckFnLangItem, // 25
66-
ExchangeMallocFnLangItem, // 26
67-
ExchangeFreeFnLangItem, // 27
68-
MallocFnLangItem, // 28
69-
FreeFnLangItem, // 29
70-
BorrowAsImmFnLangItem, // 30
71-
BorrowAsMutFnLangItem, // 31
72-
ReturnToMutFnLangItem, // 32
73-
CheckNotBorrowedFnLangItem, // 33
74-
StrDupUniqFnLangItem, // 34
75-
RecordBorrowFnLangItem, // 35
76-
UnrecordBorrowFnLangItem, // 36
77-
78-
StartFnLangItem, // 37
50+
BitAndTraitLangItem, // 12
51+
BitOrTraitLangItem, // 13
52+
ShlTraitLangItem, // 14
53+
ShrTraitLangItem, // 15
54+
IndexTraitLangItem, // 16
55+
56+
EqTraitLangItem, // 17
57+
OrdTraitLangItem, // 18
58+
59+
StrEqFnLangItem, // 19
60+
UniqStrEqFnLangItem, // 20
61+
AnnihilateFnLangItem, // 21
62+
LogTypeFnLangItem, // 22
63+
FailFnLangItem, // 23
64+
FailBoundsCheckFnLangItem, // 24
65+
ExchangeMallocFnLangItem, // 25
66+
ExchangeFreeFnLangItem, // 26
67+
MallocFnLangItem, // 27
68+
FreeFnLangItem, // 28
69+
BorrowAsImmFnLangItem, // 29
70+
BorrowAsMutFnLangItem, // 30
71+
ReturnToMutFnLangItem, // 31
72+
CheckNotBorrowedFnLangItem, // 32
73+
StrDupUniqFnLangItem, // 33
74+
RecordBorrowFnLangItem, // 34
75+
UnrecordBorrowFnLangItem, // 35
76+
77+
StartFnLangItem, // 36
7978
}
8079

8180
pub struct LanguageItems {
82-
items: [Option<def_id>, ..38]
81+
items: [Option<def_id>, ..37]
8382
}
8483

8584
pub impl LanguageItems {
8685
pub fn new() -> LanguageItems {
8786
LanguageItems {
88-
items: [ None, ..38 ]
87+
items: [ None, ..37 ]
8988
}
9089
}
9190

@@ -98,45 +97,44 @@ pub impl LanguageItems {
9897
0 => "const",
9998
1 => "copy",
10099
2 => "owned",
101-
3 => "sized",
102-
103-
4 => "drop",
104-
105-
5 => "add",
106-
6 => "sub",
107-
7 => "mul",
108-
8 => "div",
109-
9 => "rem",
110-
10 => "neg",
111-
11 => "not",
112-
12 => "bitxor",
113-
13 => "bitand",
114-
14 => "bitor",
115-
15 => "shl",
116-
16 => "shr",
117-
17 => "index",
118-
18 => "eq",
119-
19 => "ord",
120-
121-
20 => "str_eq",
122-
21 => "uniq_str_eq",
123-
22 => "annihilate",
124-
23 => "log_type",
125-
24 => "fail_",
126-
25 => "fail_bounds_check",
127-
26 => "exchange_malloc",
128-
27 => "exchange_free",
129-
28 => "malloc",
130-
29 => "free",
131-
30 => "borrow_as_imm",
132-
31 => "borrow_as_mut",
133-
32 => "return_to_mut",
134-
33 => "check_not_borrowed",
135-
34 => "strdup_uniq",
136-
35 => "record_borrow",
137-
36 => "unrecord_borrow",
138-
139-
37 => "start",
100+
101+
3 => "drop",
102+
103+
4 => "add",
104+
5 => "sub",
105+
6 => "mul",
106+
7 => "div",
107+
8 => "rem",
108+
9 => "neg",
109+
10 => "not",
110+
11 => "bitxor",
111+
12 => "bitand",
112+
13 => "bitor",
113+
14 => "shl",
114+
15 => "shr",
115+
16 => "index",
116+
17 => "eq",
117+
18 => "ord",
118+
119+
19 => "str_eq",
120+
20 => "uniq_str_eq",
121+
21 => "annihilate",
122+
22 => "log_type",
123+
23 => "fail_",
124+
24 => "fail_bounds_check",
125+
25 => "exchange_malloc",
126+
26 => "exchange_free",
127+
27 => "malloc",
128+
28 => "free",
129+
29 => "borrow_as_imm",
130+
30 => "borrow_as_mut",
131+
31 => "return_to_mut",
132+
32 => "check_not_borrowed",
133+
33 => "strdup_uniq",
134+
34 => "record_borrow",
135+
35 => "unrecord_borrow",
136+
137+
36 => "start",
140138

141139
_ => "???"
142140
}
@@ -153,9 +151,6 @@ pub impl LanguageItems {
153151
pub fn owned_trait(&const self) -> def_id {
154152
self.items[OwnedTraitLangItem as uint].get()
155153
}
156-
pub fn sized_trait(&const self) -> def_id {
157-
self.items[SizedTraitLangItem as uint].get()
158-
}
159154

160155
pub fn drop_trait(&const self) -> def_id {
161156
self.items[DropTraitLangItem as uint].get()
@@ -272,7 +267,6 @@ fn LanguageItemCollector(crate: @crate,
272267
item_refs.insert(@~"const", ConstTraitLangItem as uint);
273268
item_refs.insert(@~"copy", CopyTraitLangItem as uint);
274269
item_refs.insert(@~"owned", OwnedTraitLangItem as uint);
275-
item_refs.insert(@~"sized", SizedTraitLangItem as uint);
276270

277271
item_refs.insert(@~"drop", DropTraitLangItem as uint);
278272

trunk/src/librustc/middle/resolve.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3079,7 +3079,7 @@ pub impl Resolver {
30793079
self.session.span_err(imports[index].span, "unresolved import");
30803080
} else {
30813081
let err = fmt!("unresolved import (maybe you meant `%s::*`?)",
3082-
sn.slice(0, sn.len() - 1)); // -1 to adjust for semicolon
3082+
sn.slice(0, sn.len()));
30833083
self.session.span_err(imports[index].span, err);
30843084
}
30853085
}

trunk/src/librustc/middle/trans/adt.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,6 @@ fn build_const_struct(ccx: @CrateContext, st: &Struct, vals: &[ValueRef])
563563
vals[i]
564564
};
565565
cfields.push(val);
566-
offset += machine::llsize_of_alloc(ccx, llty) as u64
567566
}
568567

569568
return cfields;

trunk/src/librustc/middle/trans/foreign.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ use middle::ty;
3434
use middle::ty::FnSig;
3535
use util::ppaux::ty_to_str;
3636

37+
use core::str;
3738
use core::uint;
3839
use core::vec;
3940
use syntax::codemap::span;

trunk/src/librustc/middle/trans/glue.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -19,6 +19,7 @@ use back::link::*;
1919
use driver::session;
2020
use lib;
2121
use lib::llvm::{llvm, ValueRef, TypeRef, True};
22+
use lib::llvm::type_to_str;
2223
use middle::trans::adt;
2324
use middle::trans::base::*;
2425
use middle::trans::callee;

0 commit comments

Comments
 (0)