Skip to content

Commit 5d89d1c

Browse files
committed
---
yaml --- r: 143099 b: refs/heads/try2 c: 7b2218d h: refs/heads/master i: 143097: 7f218a2 143095: 054aeba v: v3
1 parent 52144ba commit 5d89d1c

Some content is hidden

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

48 files changed

+31
-856
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: a74d92e8ab61863876d2b5b6256b403efbb55492
8+
refs/heads/try2: 7b2218d248571a242ac243e0443d95619bdda056
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: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ 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-
# NOTE: add "-A warnings" after snapshot to WFLAGS_ST0
21-
WFLAGS_ST0 = -A unrecognized-lint
20+
WFLAGS_ST0 = -A warnings
2221
WFLAGS_ST1 = -D warnings
2322
WFLAGS_ST2 = -D warnings
2423

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,6 @@
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) ];
6663
#[ forbid(path_statement) ];
6764
#[ forbid(type_limits) ];
6865
#[ forbid(unrecognized_lint) ];

branches/try2/src/etc/zsh/_rust

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,9 @@ _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]'
3836
'missing-trait-doc[detects missing documentation for traits]'
3937
'missing-struct-doc[detects missing documentation for structs]'
4038
'ctypes[proper use of core::libc types in foreign modules]'
41-
'implicit-copies[implicit copies of non implicitly copyable data]'
4239
"unused-mut[detect mut variables which don't need to be mutable]"
4340
'unused-imports[imports that are never used]'
4441
'heap-memory[use of any (~ type or @ type) heap memory]'

branches/try2/src/libextra/arc.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,6 @@ 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
309308
#[no_freeze]
310309
struct RWARC<T> {
311310
priv x: UnsafeAtomicRcBox<RWARCInner<T>>,

branches/try2/src/libextra/arena.rs

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,7 @@ use std::sys;
4646
use std::uint;
4747
use std::vec;
4848
use std::unstable::intrinsics;
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-
}
49+
use std::unstable::intrinsics::{TyDesc, get_tydesc};
5850

5951
// The way arena uses arrays is really deeply awful. The arrays are
6052
// allocated, and have capacities reserved, but the fill for the array
@@ -65,7 +57,6 @@ struct Chunk {
6557
is_pod: bool,
6658
}
6759

68-
#[mutable] // XXX remove after snap
6960
#[no_freeze]
7061
pub struct Arena {
7162
// The head is separated out from the list as a unbenchmarked
@@ -117,19 +108,6 @@ fn round_up_to(base: uint, align: uint) -> uint {
117108
(base + (align - 1)) & !(align - 1)
118109
}
119110

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-
133111
// Walk down a chunk, running the destructors for any objects stored
134112
// in it.
135113
unsafe fn destroy_chunk(chunk: &Chunk) {
@@ -149,7 +127,7 @@ unsafe fn destroy_chunk(chunk: &Chunk) {
149127
//debug!("freeing object: idx = %u, size = %u, align = %u, done = %b",
150128
// start, size, align, is_done);
151129
if is_done {
152-
call_drop_glue(tydesc, ptr::offset(buf, start) as *i8);
130+
((*tydesc).drop_glue)(ptr::offset(buf, start) as *i8);
153131
}
154132

155133
// Find where the next tydesc lives

branches/try2/src/libextra/dbg.rs

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

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

2118
pub mod rustrt {
22-
#[cfg(stage0)]
23-
use intrinsic::{TyDesc};
24-
#[cfg(not(stage0))]
2519
use std::unstable::intrinsics::{TyDesc};
2620

2721
#[abi = "cdecl"]

branches/try2/src/libextra/rc.rs

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

168168
/// Mutable reference counted pointer type
169-
#[non_owned]
170169
#[no_send]
171-
#[mutable] // XXX remove after snap
172170
#[no_freeze]
173171
#[unsafe_no_drop_flag]
174172
pub struct RcMut<T> {

branches/try2/src/libextra/rl.rs

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

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

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

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

branches/try2/src/librustc/back/link.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ pub mod jit {
106106
use metadata::cstore;
107107

108108
use std::cast;
109-
#[cfg(not(stage0))]
110109
use std::local_data;
111110
use std::unstable::intrinsics;
112111

@@ -204,22 +203,15 @@ pub mod jit {
204203

205204
// The stage1 compiler won't work, but that doesn't really matter. TLS
206205
// changed only very recently to allow storage of owned values.
207-
#[cfg(not(stage0))]
208206
static engine_key: local_data::Key<~Engine> = &local_data::Key;
209207

210-
#[cfg(not(stage0))]
211208
fn set_engine(engine: ~Engine) {
212209
local_data::set(engine_key, engine)
213210
}
214-
#[cfg(stage0)]
215-
fn set_engine(_: ~Engine) {}
216211

217-
#[cfg(not(stage0))]
218212
pub fn consume_engine() -> Option<~Engine> {
219213
local_data::pop(engine_key)
220214
}
221-
#[cfg(stage0)]
222-
pub fn consume_engine() -> Option<~Engine> { None }
223215
}
224216

225217
pub mod write {

branches/try2/src/librustc/middle/lint.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,7 @@ pub enum lint {
7575
unnecessary_qualification,
7676
while_true,
7777
path_statement,
78-
implicit_copies,
7978
unrecognized_lint,
80-
deprecated_pattern,
8179
non_camel_case_types,
8280
non_uppercase_statics,
8381
type_limits,
@@ -182,20 +180,6 @@ static lint_table: &'static [(&'static str, LintSpec)] = &[
182180
default: warn
183181
}),
184182

185-
("implicit_copies",
186-
LintSpec {
187-
lint: implicit_copies,
188-
desc: "implicit copies of non implicitly copyable data",
189-
default: warn
190-
}),
191-
192-
("deprecated_pattern",
193-
LintSpec {
194-
lint: deprecated_pattern,
195-
desc: "warn about deprecated uses of pattern bindings",
196-
default: allow
197-
}),
198-
199183
("non_camel_case_types",
200184
LintSpec {
201185
lint: non_camel_case_types,

branches/try2/src/librustc/middle/trans/base.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,7 @@ use syntax::abi::{X86, X86_64, Arm, Mips};
9090

9191
pub use middle::trans::context::task_llcx;
9292

93-
#[cfg(not(stage0))]
9493
static task_local_insn_key: local_data::Key<@~[&'static str]> = &local_data::Key;
95-
#[cfg(stage0)]
96-
fn task_local_insn_key(_: @~[&'static str]) {}
9794

9895
pub fn with_insn_ctxt(blk: &fn(&[&'static str])) {
9996
let opt = local_data::get(task_local_insn_key, |k| k.map(|&k| *k));

branches/try2/src/librustc/middle/trans/context.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,6 @@ impl Drop for CrateContext {
236236
}
237237
}
238238

239-
#[cfg(stage0)]
240-
fn task_local_llcx_key(_v: @ContextRef) {}
241-
#[cfg(not(stage0))]
242239
static task_local_llcx_key: local_data::Key<@ContextRef> = &local_data::Key;
243240

244241
pub fn task_llcx() -> ContextRef {

branches/try2/src/librustc/middle/trans/debuginfo.rs

Lines changed: 0 additions & 139 deletions
Original file line numberDiff line numberDiff line change
@@ -607,9 +607,6 @@ fn tuple_metadata(cx: &mut CrateContext,
607607
span);
608608
}
609609

610-
// The stage0 snapshot does not yet support the fixes from PR #7557, so there are two versions of
611-
// following function for now
612-
#[cfg(not(stage0))]
613610
fn enum_metadata(cx: &mut CrateContext,
614611
enum_type: ty::t,
615612
enum_def_id: ast::def_id,
@@ -772,142 +769,6 @@ fn enum_metadata(cx: &mut CrateContext,
772769
}
773770
}
774771

775-
#[cfg(stage0)]
776-
fn enum_metadata(cx: &mut CrateContext,
777-
enum_type: ty::t,
778-
enum_def_id: ast::def_id,
779-
substs: &ty::substs,
780-
span: span)
781-
-> DIType {
782-
783-
let enum_name = ty_to_str(cx.tcx, enum_type);
784-
785-
// For empty enums there is an early exit. Just describe it as an empty struct with the
786-
// appropriate type name
787-
if ty::type_is_empty(cx.tcx, enum_type) {
788-
return composite_type_metadata(cx, Type::nil(), enum_name, &[], &[], &[], span);
789-
}
790-
791-
// Prepare some data (llvm type, size, align, ...) about the discriminant. This data will be
792-
// needed in all of the following cases.
793-
let discriminant_llvm_type = Type::enum_discrim(cx);
794-
let (discriminant_size, discriminant_align) = size_and_align_of(cx, discriminant_llvm_type);
795-
796-
assert!(Type::enum_discrim(cx) == cx.int_type);
797-
let discriminant_type_metadata = type_metadata(cx, ty::mk_int(), span);
798-
799-
let variants: &[@ty::VariantInfo] = *ty::enum_variants(cx.tcx, enum_def_id);
800-
801-
let enumerators_metadata: ~[DIDescriptor] = variants
802-
.iter()
803-
.transform(|v| {
804-
let name: &str = cx.sess.str_of(v.name);
805-
let discriminant_value = v.disr_val as c_ulonglong;
806-
807-
do name.as_c_str |name| {
808-
unsafe {
809-
llvm::LLVMDIBuilderCreateEnumerator(
810-
DIB(cx),
811-
name,
812-
discriminant_value)
813-
}
814-
}
815-
})
816-
.collect();
817-
818-
let loc = span_start(cx, span);
819-
let file_metadata = file_metadata(cx, loc.file.name);
820-
821-
let discriminant_type_metadata = do enum_name.as_c_str |enum_name| {
822-
unsafe {
823-
llvm::LLVMDIBuilderCreateEnumerationType(
824-
DIB(cx),
825-
file_metadata,
826-
enum_name,
827-
file_metadata,
828-
loc.line as c_uint,
829-
bytes_to_bits(discriminant_size),
830-
bytes_to_bits(discriminant_align),
831-
create_DIArray(DIB(cx), enumerators_metadata),
832-
discriminant_type_metadata)
833-
}
834-
};
835-
836-
if ty::type_is_c_like_enum(cx.tcx, enum_type) {
837-
return discriminant_type_metadata;
838-
}
839-
840-
let is_univariant = variants.len() == 1;
841-
842-
let variants_metadata = do variants.map |&vi| {
843-
844-
let raw_types: &[ty::t] = vi.args;
845-
let arg_types = do raw_types.map |&raw_type| { ty::subst(cx.tcx, substs, raw_type) };
846-
847-
let mut arg_llvm_types = do arg_types.map |&ty| { type_of::type_of(cx, ty) };
848-
let mut arg_names = match vi.arg_names {
849-
Some(ref names) => do names.map |ident| { cx.sess.str_of(*ident).to_owned() },
850-
None => do arg_types.map |_| { ~"" }
851-
};
852-
853-
let mut arg_metadata = do arg_types.map |&ty| { type_metadata(cx, ty, span) };
854-
855-
if !is_univariant {
856-
arg_llvm_types.insert(0, discriminant_llvm_type);
857-
arg_names.insert(0, ~"");
858-
arg_metadata.insert(0, discriminant_type_metadata);
859-
}
860-
861-
let variant_llvm_type = Type::struct_(arg_llvm_types, false);
862-
let (variant_type_size, variant_type_align) = size_and_align_of(cx, variant_llvm_type);
863-
864-
let variant_type_metadata = composite_type_metadata(
865-
cx,
866-
variant_llvm_type,
867-
&"",
868-
arg_llvm_types,
869-
arg_names,
870-
arg_metadata,
871-
span);
872-
873-
do "".as_c_str |name| {
874-
unsafe {
875-
llvm::LLVMDIBuilderCreateMemberType(
876-
DIB(cx),
877-
file_metadata,
878-
name,
879-
file_metadata,
880-
loc.line as c_uint,
881-
bytes_to_bits(variant_type_size),
882-
bytes_to_bits(variant_type_align),
883-
bytes_to_bits(0),
884-
0,
885-
variant_type_metadata)
886-
}
887-
}
888-
};
889-
890-
let enum_llvm_type = type_of::type_of(cx, enum_type);
891-
let (enum_type_size, enum_type_align) = size_and_align_of(cx, enum_llvm_type);
892-
893-
return do enum_name.as_c_str |enum_name| {
894-
unsafe {
895-
llvm::LLVMDIBuilderCreateUnionType(
896-
DIB(cx),
897-
file_metadata,
898-
enum_name,
899-
file_metadata,
900-
loc.line as c_uint,
901-
bytes_to_bits(enum_type_size),
902-
bytes_to_bits(enum_type_align),
903-
0, // Flags
904-
create_DIArray(DIB(cx), variants_metadata),
905-
0) // RuntimeLang
906-
}
907-
};
908-
}
909-
910-
911772
/// Creates debug information for a composite type, that is, anything that results in a LLVM struct.
912773
///
913774
/// Examples of Rust types to use this are: structs, tuples, boxes, vecs, and enums.

branches/try2/src/librustc/rustc.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
#[license = "MIT/ASL2"];
1818
#[crate_type = "lib"];
1919

20-
#[deny(deprecated_pattern)];
21-
2220
extern mod extra;
2321
extern mod syntax;
2422

0 commit comments

Comments
 (0)