Skip to content

Commit 61f4bbb

Browse files
committed
---
yaml --- r: 107719 b: refs/heads/dist-snap c: b3d10f4 h: refs/heads/master i: 107717: 83ea3f6 107715: 461b376 107711: 131692b v: v3
1 parent e16b342 commit 61f4bbb

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

+290
-119
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: f64fdf524a434f0e5cd0bc91d09c144723f3c90d
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: ea7b20d8f279ea8c63b9a4b8e9129fce0e3c2b5d
9+
refs/heads/dist-snap: b3d10f43833f065ec0e635ce6cdb2332f4ee5049
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,12 @@ src/.DS_Store
7575
/doc/latex
7676
/doc/std
7777
/doc/extra
78+
/doc/flate
7879
/doc/green
7980
/doc/native
8081
/doc/rustc
8182
/doc/syntax
83+
/doc/rustdoc
8284
/doc/rustuv
8385
/doc/rustpkg
8486
/nd/

branches/dist-snap/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/dist-snap/mk/tests.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,8 @@ 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
347+
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.green \
348+
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.native
348349
else
349350
STDTESTDEP_$(1)_$(2)_$(3)_$(4) =
350351
endif

branches/dist-snap/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', [], 2), ('TotalOrd', ['TotalEq'], 2)]:
121+
('TotalEq', [], 1), ('TotalOrd', ['TotalEq'], 1)]:
122122
traits[trait] = (ALL, supers, errs)
123123

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

branches/dist-snap/src/libextra/dlist.rs

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

4949
/// Double-ended DList iterator
50-
#[deriving(Clone)]
5150
pub struct Items<'a, T> {
5251
priv head: &'a Link<T>,
5352
priv tail: Rawlink<Node<T>>,
5453
priv nelem: uint,
5554
}
5655

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+
5761
/// Double-ended mutable DList iterator
5862
pub struct MutItems<'a, T> {
5963
priv list: &'a mut DList<T>,

branches/dist-snap/src/librustc/driver/driver.rs

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

900-
pub fn build_session(sopts: @session::Options, demitter: @diagnostic::Emitter)
900+
pub fn build_session(sopts: @session::Options,
901+
local_crate_source_file: Option<Path>,
902+
demitter: @diagnostic::Emitter)
901903
-> Session {
902904
let codemap = @codemap::CodeMap::new();
903905
let diagnostic_handler =
904906
diagnostic::mk_handler(Some(demitter));
905907
let span_diagnostic_handler =
906908
diagnostic::mk_span_handler(diagnostic_handler, codemap);
907-
build_session_(sopts, codemap, demitter, span_diagnostic_handler)
909+
910+
build_session_(sopts, local_crate_source_file, codemap, demitter, span_diagnostic_handler)
908911
}
909912

910913
pub fn build_session_(sopts: @session::Options,
911-
cm: @codemap::CodeMap,
914+
local_crate_source_file: Option<Path>,
915+
codemap: @codemap::CodeMap,
912916
demitter: @diagnostic::Emitter,
913917
span_diagnostic_handler: @diagnostic::SpanHandler)
914918
-> Session {
915919
let target_cfg = build_target_config(sopts, demitter);
916-
let p_s = parse::new_parse_sess_special_handler(span_diagnostic_handler,
917-
cm);
920+
let p_s = parse::new_parse_sess_special_handler(span_diagnostic_handler, codemap);
918921
let cstore = @CStore::new(token::get_ident_interner());
919922
let filesearch = @filesearch::FileSearch::new(
920923
&sopts.maybe_sysroot,
921924
sopts.target_triple,
922925
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+
923936
@Session_ {
924937
targ_cfg: target_cfg,
925938
opts: sopts,
926939
cstore: cstore,
927940
parse_sess: p_s,
928-
codemap: cm,
941+
codemap: codemap,
929942
// For a library crate, this is always none
930943
entry_fn: RefCell::new(None),
931944
entry_type: Cell::new(None),
932945
macro_registrar_fn: RefCell::new(None),
933946
span_diagnostic: span_diagnostic_handler,
934947
filesearch: filesearch,
935948
building_library: Cell::new(false),
949+
local_crate_source_file: local_crate_source_file,
936950
working_dir: os::getcwd(),
937951
lints: RefCell::new(HashMap::new()),
938952
node_id: Cell::new(1),
@@ -1164,13 +1178,8 @@ mod test {
11641178
Ok(m) => m,
11651179
Err(f) => fail!("test_switch_implies_cfg_test: {}", f.to_err_msg())
11661180
};
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);
1181+
let sessopts = build_session_options(~"rustc", matches, @diagnostic::DefaultEmitter);
1182+
let sess = build_session(sessopts, None, @diagnostic::DefaultEmitter);
11741183
let cfg = build_configuration(sess);
11751184
assert!((attr::contains_name(cfg, "test")));
11761185
}
@@ -1187,13 +1196,8 @@ mod test {
11871196
f.to_err_msg());
11881197
}
11891198
};
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);
1199+
let sessopts = build_session_options(~"rustc", matches, @diagnostic::DefaultEmitter);
1200+
let sess = build_session(sessopts, None, @diagnostic::DefaultEmitter);
11971201
let cfg = build_configuration(sess);
11981202
let mut test_items = cfg.iter().filter(|m| "test" == m.name());
11991203
assert!(test_items.next().is_some());

branches/dist-snap/src/librustc/driver/session.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,9 @@ 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>,
214217
working_dir: Path,
215218
lints: RefCell<HashMap<ast::NodeId,
216219
~[(lint::Lint, codemap::Span, ~str)]>>,

branches/dist-snap/src/librustc/front/feature_gate.rs

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

5152
// These are used to test this portion of the compiler, they don't actually
5253
// mean anything
@@ -171,6 +172,13 @@ impl Visitor<()> for Context {
171172
}
172173
}
173174

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+
174182
_ => {}
175183
}
176184

branches/dist-snap/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 = match matches.free.len() {
233+
let (input, input_file_path) = 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())
239+
(d::StrInput(src.to_managed()), None)
240240
} else {
241-
d::FileInput(Path::new(ifile))
241+
(d::FileInput(Path::new(ifile)), Some(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, demitter);
248+
let sess = d::build_session(sopts, input_file_path, 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/dist-snap/src/librustc/metadata/encoder.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,8 @@ 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)));
769771
encode_name(ecx, ebml_w, name);
770772
encode_type(ecx, ebml_w, node_id_to_type(ecx.tcx, ctor_id));
771773
encode_path(ecx, ebml_w, path, ast_map::PathName(name));

branches/dist-snap/src/librustc/middle/kind.rs

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2014 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,9 +184,6 @@ 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-
190187
check_freevar_bounds(cx, fv.span, var_t, bounds, None);
191188
}
192189

@@ -447,23 +444,6 @@ pub fn check_trait_cast_bounds(cx: &Context, sp: Span, ty: ty::t,
447444
});
448445
}
449446

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-
467447
fn check_copy(cx: &Context, ty: ty::t, sp: Span, reason: &str) {
468448
debug!("type_contents({})={}",
469449
ty_to_str(cx.tcx, ty),

branches/dist-snap/src/librustc/middle/trans/_match.rs

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

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

402-
#[deriving(Clone)]
403402
struct ArmData<'a,'b> {
404403
bodycx: &'b Block<'b>,
405404
arm: &'a ast::Arm,
406405
bindings_map: @BindingsMap
407406
}
408407

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+
409413
/**
410414
* Info about Match.
411415
* If all `pats` are matched then arm `data` will be executed.
@@ -2227,5 +2231,3 @@ fn bind_irrefutable_pat<'a>(
22272231
}
22282232
return bcx;
22292233
}
2230-
2231-

branches/dist-snap/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 ".rc" to crate name as LLVM module identifier.
2673+
// Append ".rs" 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() + ".rc";
2681+
let llmod_id = link_meta.crateid.name.clone() + ".rs";
26822682

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

branches/dist-snap/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, name.to_owned()))
171+
Some(debuginfo::CrateDebugContext::new(llmod))
172172
} else {
173173
None
174174
};

0 commit comments

Comments
 (0)