Skip to content

Commit 8a12630

Browse files
committed
---
yaml --- r: 143100 b: refs/heads/try2 c: d405117 h: refs/heads/master v: v3
1 parent 5d89d1c commit 8a12630

Some content is hidden

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

59 files changed

+1017
-389
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 7b2218d248571a242ac243e0443d95619bdda056
8+
refs/heads/try2: d4051178976aa0527ede20e6c053f72b3d4dc20c
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/mk/target.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ export CFG_COMPILER_TRIPLE
1717
# code, make sure that these common warnings are denied by default. These can
1818
# be overridden during development temporarily. For stage0, we allow all these
1919
# to suppress warnings which may be bugs in stage0 (should be fixed in stage1+)
20-
WFLAGS_ST0 = -A warnings
20+
# NOTE: add "-A warnings" after snapshot to WFLAGS_ST0
21+
WFLAGS_ST0 = -A unrecognized-lint
2122
WFLAGS_ST1 = -D warnings
2223
WFLAGS_ST2 = -D warnings
2324

branches/try2/src/etc/extract-tests.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@
6060
if not re.search(r"\bextern mod extra\b", block):
6161
block = "extern mod extra;\n" + block
6262
block = """#[ forbid(ctypes) ];
63+
#[ forbid(deprecated_pattern) ];
64+
#[ forbid(implicit_copies) ];
65+
#[ forbid(non_implicitly_copyable_typarams) ];
6366
#[ forbid(path_statement) ];
6467
#[ forbid(type_limits) ];
6568
#[ forbid(unrecognized_lint) ];

branches/try2/src/etc/zsh/_rust

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,12 @@ _rustc_opts_switches=(
3333
)
3434
_rustc_opts_lint=(
3535
'path-statement[path statements with no effect]'
36+
'deprecated-pattern[warn about deprecated uses of pattern bindings]'
37+
'non-implicitly-copyable-typarams[passing non implicitly copyable types as copy type params]'
3638
'missing-trait-doc[detects missing documentation for traits]'
3739
'missing-struct-doc[detects missing documentation for structs]'
3840
'ctypes[proper use of core::libc types in foreign modules]'
41+
'implicit-copies[implicit copies of non implicitly copyable data]'
3942
"unused-mut[detect mut variables which don't need to be mutable]"
4043
'unused-imports[imports that are never used]'
4144
'heap-memory[use of any (~ type or @ type) heap memory]'

branches/try2/src/libextra/arc.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ struct RWARCInner<T> { priv lock: RWlock, priv failed: bool, priv data: T }
305305
*
306306
* Unlike mutex_arcs, rw_arcs are safe, because they cannot be nested.
307307
*/
308+
#[mutable] // XXX remove after snap
308309
#[no_freeze]
309310
struct RWARC<T> {
310311
priv x: UnsafeAtomicRcBox<RWARCInner<T>>,

branches/try2/src/libextra/arena.rs

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,15 @@ use std::sys;
4646
use std::uint;
4747
use std::vec;
4848
use std::unstable::intrinsics;
49-
use std::unstable::intrinsics::{TyDesc, get_tydesc};
49+
use std::unstable::intrinsics::{TyDesc};
50+
51+
#[cfg(not(stage0))]
52+
use std::unstable::intrinsics::{get_tydesc};
53+
54+
#[cfg(stage0)]
55+
unsafe fn get_tydesc<T>() -> *TyDesc {
56+
intrinsics::get_tydesc::<T>() as *TyDesc
57+
}
5058

5159
// The way arena uses arrays is really deeply awful. The arrays are
5260
// allocated, and have capacities reserved, but the fill for the array
@@ -57,6 +65,7 @@ struct Chunk {
5765
is_pod: bool,
5866
}
5967

68+
#[mutable] // XXX remove after snap
6069
#[no_freeze]
6170
pub struct Arena {
6271
// The head is separated out from the list as a unbenchmarked
@@ -108,6 +117,19 @@ fn round_up_to(base: uint, align: uint) -> uint {
108117
(base + (align - 1)) & !(align - 1)
109118
}
110119

120+
#[inline]
121+
#[cfg(not(stage0))]
122+
unsafe fn call_drop_glue(tydesc: *TyDesc, data: *i8) {
123+
// This function should be inlined when stage0 is gone
124+
((*tydesc).drop_glue)(data);
125+
}
126+
127+
#[inline]
128+
#[cfg(stage0)]
129+
unsafe fn call_drop_glue(tydesc: *TyDesc, data: *i8) {
130+
((*tydesc).drop_glue)(0 as **TyDesc, data);
131+
}
132+
111133
// Walk down a chunk, running the destructors for any objects stored
112134
// in it.
113135
unsafe fn destroy_chunk(chunk: &Chunk) {
@@ -127,7 +149,7 @@ unsafe fn destroy_chunk(chunk: &Chunk) {
127149
//debug!("freeing object: idx = %u, size = %u, align = %u, done = %b",
128150
// start, size, align, is_done);
129151
if is_done {
130-
((*tydesc).drop_glue)(ptr::offset(buf, start) as *i8);
152+
call_drop_glue(tydesc, ptr::offset(buf, start) as *i8);
131153
}
132154

133155
// Find where the next tydesc lives

branches/try2/src/libextra/dbg.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,15 @@
1313
#[allow(missing_doc)];
1414

1515
use std::cast::transmute;
16+
#[cfg(stage0)]
17+
use intrinsic::{get_tydesc};
18+
#[cfg(not(stage0))]
1619
use std::unstable::intrinsics::{get_tydesc};
1720

1821
pub mod rustrt {
22+
#[cfg(stage0)]
23+
use intrinsic::{TyDesc};
24+
#[cfg(not(stage0))]
1925
use std::unstable::intrinsics::{TyDesc};
2026

2127
#[abi = "cdecl"]

branches/try2/src/libextra/rc.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,9 @@ struct RcMutBox<T> {
166166
}
167167

168168
/// Mutable reference counted pointer type
169+
#[non_owned]
169170
#[no_send]
171+
#[mutable] // XXX remove after snap
170172
#[no_freeze]
171173
#[unsafe_no_drop_flag]
172174
pub struct RcMut<T> {

branches/try2/src/libextra/rl.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ pub unsafe fn read(prompt: &str) -> Option<~str> {
6868

6969
pub type CompletionCb = @fn(~str, @fn(~str));
7070

71+
#[cfg(not(stage0))]
7172
static complete_key: local_data::Key<@CompletionCb> = &local_data::Key;
73+
#[cfg(stage0)]
74+
fn complete_key(_: @CompletionCb) {}
7275

7376
/// Bind to the main completion callback
7477
pub unsafe fn complete(cb: CompletionCb) {

0 commit comments

Comments
 (0)