Skip to content

Commit 04ace71

Browse files
committed
---
yaml --- r: 103615 b: refs/heads/try c: ea7b20d h: refs/heads/master i: 103613: 57b211d 103611: 0bb438d 103607: 15104d5 103599: f07e3c8 103583: 275c974 103551: 3dbf3b0 v: v3
1 parent c38d6ce commit 04ace71

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

+147
-291
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 62f1d68439dcfd509eaca29887afa97f22938373
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 6e7f170fedd3c526a643c0b2d13863acd982be02
5-
refs/heads/try: a39be7ca2ef65f08c160404c1675d93ee7d0f059
5+
refs/heads/try: ea7b20d8f279ea8c63b9a4b8e9129fce0e3c2b5d
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,10 @@ src/.DS_Store
7575
/doc/latex
7676
/doc/std
7777
/doc/extra
78-
/doc/flate
7978
/doc/green
8079
/doc/native
8180
/doc/rustc
8281
/doc/syntax
83-
/doc/rustdoc
8482
/doc/rustuv
8583
/doc/rustpkg
8684
/nd/

branches/try/doc/guide-runtime.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ implemented in user-space.
176176
The primary concern of an M:N runtime is that a Rust task cannot block itself in
177177
a syscall. If this happens, then the entire OS thread is frozen and unavailable
178178
for running more Rust tasks, making this a (M-1):N runtime (and you can see how
179-
this can reach 0/deadlock). By using asynchronous I/O under the hood (all I/O
179+
this can reach 0/deadlock. By using asynchronous I/O under the hood (all I/O
180180
still looks synchronous in terms of code), OS threads are never blocked until
181181
the appropriate time comes.
182182

branches/try/mk/tests.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,7 @@ ifeq ($(NO_REBUILD),)
344344
STDTESTDEP_$(1)_$(2)_$(3)_$(4) = $$(SREQ$(1)_T_$(2)_H_$(3)) \
345345
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.extra \
346346
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.rustuv \
347-
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.green \
348-
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.native
347+
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.green
349348
else
350349
STDTESTDEP_$(1)_$(2)_$(3)_$(4) =
351350
endif

branches/try/src/etc/generate-deriving-span-tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def write_file(name, string):
118118
for (trait, supers, errs) in [('Rand', [], 1),
119119
('Clone', [], 1), ('DeepClone', ['Clone'], 1),
120120
('Eq', [], 2), ('Ord', [], 8),
121-
('TotalEq', [], 1), ('TotalOrd', ['TotalEq'], 1)]:
121+
('TotalEq', [], 2), ('TotalOrd', ['TotalEq'], 2)]:
122122
traits[trait] = (ALL, supers, errs)
123123

124124
for (trait, (types, super_traits, error_count)) in traits.items():

branches/try/src/libextra/dlist.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,13 @@ struct Node<T> {
4747
}
4848

4949
/// Double-ended DList iterator
50+
#[deriving(Clone)]
5051
pub struct Items<'a, T> {
5152
priv head: &'a Link<T>,
5253
priv tail: Rawlink<Node<T>>,
5354
priv nelem: uint,
5455
}
5556

56-
// FIXME #11820: the &'a Option<> of the Link stops clone working.
57-
impl<'a, T> Clone for Items<'a, T> {
58-
fn clone(&self) -> Items<'a, T> { *self }
59-
}
60-
6157
/// Double-ended mutable DList iterator
6258
pub struct MutItems<'a, T> {
6359
priv list: &'a mut DList<T>,

branches/try/src/librustc/driver/driver.rs

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -897,56 +897,42 @@ pub fn build_session_options(binary: ~str,
897897
return sopts;
898898
}
899899

900-
pub fn build_session(sopts: @session::Options,
901-
local_crate_source_file: Option<Path>,
902-
demitter: @diagnostic::Emitter)
900+
pub fn build_session(sopts: @session::Options, demitter: @diagnostic::Emitter)
903901
-> Session {
904902
let codemap = @codemap::CodeMap::new();
905903
let diagnostic_handler =
906904
diagnostic::mk_handler(Some(demitter));
907905
let span_diagnostic_handler =
908906
diagnostic::mk_span_handler(diagnostic_handler, codemap);
909-
910-
build_session_(sopts, local_crate_source_file, codemap, demitter, span_diagnostic_handler)
907+
build_session_(sopts, codemap, demitter, span_diagnostic_handler)
911908
}
912909

913910
pub fn build_session_(sopts: @session::Options,
914-
local_crate_source_file: Option<Path>,
915-
codemap: @codemap::CodeMap,
911+
cm: @codemap::CodeMap,
916912
demitter: @diagnostic::Emitter,
917913
span_diagnostic_handler: @diagnostic::SpanHandler)
918914
-> Session {
919915
let target_cfg = build_target_config(sopts, demitter);
920-
let p_s = parse::new_parse_sess_special_handler(span_diagnostic_handler, codemap);
916+
let p_s = parse::new_parse_sess_special_handler(span_diagnostic_handler,
917+
cm);
921918
let cstore = @CStore::new(token::get_ident_interner());
922919
let filesearch = @filesearch::FileSearch::new(
923920
&sopts.maybe_sysroot,
924921
sopts.target_triple,
925922
sopts.addl_lib_search_paths);
926-
927-
// Make the path absolute, if necessary
928-
let local_crate_source_file = local_crate_source_file.map(|path|
929-
if path.is_absolute() {
930-
path.clone()
931-
} else {
932-
os::getcwd().join(path.clone())
933-
}
934-
);
935-
936923
@Session_ {
937924
targ_cfg: target_cfg,
938925
opts: sopts,
939926
cstore: cstore,
940927
parse_sess: p_s,
941-
codemap: codemap,
928+
codemap: cm,
942929
// For a library crate, this is always none
943930
entry_fn: RefCell::new(None),
944931
entry_type: Cell::new(None),
945932
macro_registrar_fn: RefCell::new(None),
946933
span_diagnostic: span_diagnostic_handler,
947934
filesearch: filesearch,
948935
building_library: Cell::new(false),
949-
local_crate_source_file: local_crate_source_file,
950936
working_dir: os::getcwd(),
951937
lints: RefCell::new(HashMap::new()),
952938
node_id: Cell::new(1),
@@ -1178,8 +1164,13 @@ mod test {
11781164
Ok(m) => m,
11791165
Err(f) => fail!("test_switch_implies_cfg_test: {}", f.to_err_msg())
11801166
};
1181-
let sessopts = build_session_options(~"rustc", matches, @diagnostic::DefaultEmitter);
1182-
let sess = build_session(sessopts, None, @diagnostic::DefaultEmitter);
1167+
let sessopts = build_session_options(
1168+
~"rustc",
1169+
matches,
1170+
@diagnostic::DefaultEmitter as @diagnostic::Emitter);
1171+
let sess = build_session(sessopts,
1172+
@diagnostic::DefaultEmitter as
1173+
@diagnostic::Emitter);
11831174
let cfg = build_configuration(sess);
11841175
assert!((attr::contains_name(cfg, "test")));
11851176
}
@@ -1196,8 +1187,13 @@ mod test {
11961187
f.to_err_msg());
11971188
}
11981189
};
1199-
let sessopts = build_session_options(~"rustc", matches, @diagnostic::DefaultEmitter);
1200-
let sess = build_session(sessopts, None, @diagnostic::DefaultEmitter);
1190+
let sessopts = build_session_options(
1191+
~"rustc",
1192+
matches,
1193+
@diagnostic::DefaultEmitter as @diagnostic::Emitter);
1194+
let sess = build_session(sessopts,
1195+
@diagnostic::DefaultEmitter as
1196+
@diagnostic::Emitter);
12011197
let cfg = build_configuration(sess);
12021198
let mut test_items = cfg.iter().filter(|m| "test" == m.name());
12031199
assert!(test_items.next().is_some());

branches/try/src/librustc/driver/session.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,6 @@ pub struct Session_ {
211211
macro_registrar_fn: RefCell<Option<ast::DefId>>,
212212
filesearch: @filesearch::FileSearch,
213213
building_library: Cell<bool>,
214-
// The name of the root source file of the crate, in the local file system. The path is always
215-
// expected to be absolute. `None` means that there is no source file.
216-
local_crate_source_file: Option<Path>,
217214
working_dir: Path,
218215
lints: RefCell<HashMap<ast::NodeId,
219216
~[(lint::Lint, codemap::Span, ~str)]>>,

branches/try/src/librustc/front/feature_gate.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ static KNOWN_FEATURES: &'static [(&'static str, Status)] = &[
4747
("macro_registrar", Active),
4848
("log_syntax", Active),
4949
("trace_macros", Active),
50-
("simd", Active),
5150

5251
// These are used to test this portion of the compiler, they don't actually
5352
// mean anything
@@ -172,13 +171,6 @@ impl Visitor<()> for Context {
172171
}
173172
}
174173

175-
ast::ItemStruct(..) => {
176-
if attr::contains_name(i.attrs, "simd") {
177-
self.gate_feature("simd", i.span,
178-
"SIMD types are experimental and possibly buggy");
179-
}
180-
}
181-
182174
_ => {}
183175
}
184176

branches/try/src/librustc/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,22 +230,22 @@ pub fn run_compiler(args: &[~str], demitter: @diagnostic::Emitter) {
230230
version(binary);
231231
return;
232232
}
233-
let (input, input_file_path) = match matches.free.len() {
233+
let input = match matches.free.len() {
234234
0u => d::early_error(demitter, "no input filename given"),
235235
1u => {
236236
let ifile = matches.free[0].as_slice();
237237
if "-" == ifile {
238238
let src = str::from_utf8_owned(io::stdin().read_to_end()).unwrap();
239-
(d::StrInput(src.to_managed()), None)
239+
d::StrInput(src.to_managed())
240240
} else {
241-
(d::FileInput(Path::new(ifile)), Some(Path::new(ifile)))
241+
d::FileInput(Path::new(ifile))
242242
}
243243
}
244244
_ => d::early_error(demitter, "multiple input filenames provided")
245245
};
246246

247247
let sopts = d::build_session_options(binary, matches, demitter);
248-
let sess = d::build_session(sopts, input_file_path, demitter);
248+
let sess = d::build_session(sopts, demitter);
249249
let odir = matches.opt_str("out-dir").map(|o| Path::new(o));
250250
let ofile = matches.opt_str("o").map(|o| Path::new(o));
251251
let cfg = d::build_configuration(sess);

branches/try/src/librustc/lib/llvm.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1493,6 +1493,11 @@ pub mod llvm {
14931493
Dialect: c_uint)
14941494
-> ValueRef;
14951495

1496+
pub static LLVMRustDebugMetadataVersion: u32;
1497+
1498+
pub fn LLVMRustAddModuleFlag(M: ModuleRef,
1499+
name: *c_char,
1500+
value: u32);
14961501

14971502
pub fn LLVMDIBuilderCreate(M: ModuleRef) -> DIBuilderRef;
14981503

branches/try/src/librustc/metadata/encoder.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -766,8 +766,6 @@ fn encode_info_for_struct_ctor(ecx: &EncodeContext,
766766
ebml_w.start_tag(tag_items_data_item);
767767
encode_def_id(ebml_w, local_def(ctor_id));
768768
encode_family(ebml_w, 'f');
769-
encode_bounds_and_type(ebml_w, ecx,
770-
&lookup_item_type(ecx.tcx, local_def(ctor_id)));
771769
encode_name(ecx, ebml_w, name);
772770
encode_type(ecx, ebml_w, node_id_to_type(ecx.tcx, ctor_id));
773771
encode_path(ecx, ebml_w, path, ast_map::PathName(name));

branches/try/src/librustc/middle/kind.rs

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012-2014 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
//
@@ -184,6 +184,9 @@ fn with_appropriate_checker(cx: &Context,
184184
let id = ast_util::def_id_of_def(fv.def).node;
185185
let var_t = ty::node_id_to_type(cx.tcx, id);
186186

187+
// check that only immutable variables are implicitly copied in
188+
check_imm_free_var(cx, fv.def, fv.span);
189+
187190
check_freevar_bounds(cx, fv.span, var_t, bounds, None);
188191
}
189192

@@ -444,6 +447,23 @@ pub fn check_trait_cast_bounds(cx: &Context, sp: Span, ty: ty::t,
444447
});
445448
}
446449

450+
fn check_imm_free_var(cx: &Context, def: Def, sp: Span) {
451+
match def {
452+
DefLocal(_, BindByValue(MutMutable)) => {
453+
cx.tcx.sess.span_err(
454+
sp,
455+
"mutable variables cannot be implicitly captured");
456+
}
457+
DefLocal(..) | DefArg(..) | DefBinding(..) => { /* ok */ }
458+
DefUpvar(_, def1, _, _) => { check_imm_free_var(cx, *def1, sp); }
459+
_ => {
460+
cx.tcx.sess.span_bug(
461+
sp,
462+
format!("unknown def for free variable: {:?}", def));
463+
}
464+
}
465+
}
466+
447467
fn check_copy(cx: &Context, ty: ty::t, sp: Span, reason: &str) {
448468
debug!("type_contents({})={}",
449469
ty_to_str(cx.tcx, ty),

branches/try/src/librustc/middle/trans/_match.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -399,17 +399,13 @@ struct BindingInfo {
399399

400400
type BindingsMap = HashMap<Ident, BindingInfo>;
401401

402+
#[deriving(Clone)]
402403
struct ArmData<'a,'b> {
403404
bodycx: &'b Block<'b>,
404405
arm: &'a ast::Arm,
405406
bindings_map: @BindingsMap
406407
}
407408

408-
// FIXME #11820: method resolution is unreliable with &
409-
impl<'a,'b> Clone for ArmData<'a, 'b> {
410-
fn clone(&self) -> ArmData<'a, 'b> { *self }
411-
}
412-
413409
/**
414410
* Info about Match.
415411
* If all `pats` are matched then arm `data` will be executed.
@@ -2231,3 +2227,5 @@ fn bind_irrefutable_pat<'a>(
22312227
}
22322228
return bcx;
22332229
}
2230+
2231+

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2670,15 +2670,15 @@ pub fn trans_crate(sess: session::Session,
26702670
let link_meta = link::build_link_meta(sess, crate.attrs, output,
26712671
&mut symbol_hasher);
26722672

2673-
// Append ".rs" to crate name as LLVM module identifier.
2673+
// Append ".rc" to crate name as LLVM module identifier.
26742674
//
26752675
// LLVM code generator emits a ".file filename" directive
26762676
// for ELF backends. Value of the "filename" is set as the
26772677
// LLVM module identifier. Due to a LLVM MC bug[1], LLVM
26782678
// crashes if the module identifer is same as other symbols
26792679
// such as a function name in the module.
26802680
// 1. http://llvm.org/bugs/show_bug.cgi?id=11479
2681-
let llmod_id = link_meta.crateid.name.clone() + ".rs";
2681+
let llmod_id = link_meta.crateid.name.clone() + ".rc";
26822682

26832683
let ccx = @CrateContext::new(sess,
26842684
llmod_id,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ impl CrateContext {
168168

169169
let (crate_map_name, crate_map) = decl_crate_map(sess, link_meta.clone(), llmod);
170170
let dbg_cx = if sess.opts.debuginfo {
171-
Some(debuginfo::CrateDebugContext::new(llmod))
171+
Some(debuginfo::CrateDebugContext::new(llmod, name.to_owned()))
172172
} else {
173173
None
174174
};

0 commit comments

Comments
 (0)