Skip to content

Commit 3b86775

Browse files
committed
---
yaml --- r: 136106 b: refs/heads/auto c: 3a38797 h: refs/heads/master v: v3
1 parent d815f0c commit 3b86775

36 files changed

+469
-231
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: 7a6eaea720a7e878f52c03b3298e782e50f1a074
16+
refs/heads/auto: 3a38797f495e30dec8117aa33032bbc7b6e5f17b
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/compiletest/runtest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1196,7 +1196,7 @@ fn compose_and_run_compiler(
11961196

11971197
fn ensure_dir(path: &Path) {
11981198
if path.is_dir() { return; }
1199-
fs::mkdir(path, io::UserRWX).unwrap();
1199+
fs::mkdir(path, io::USER_RWX).unwrap();
12001200
}
12011201

12021202
fn compose_and_run(config: &Config, testfile: &Path,

branches/auto/src/jemalloc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit 2dba541881fb8e35246d653bbe2e7c7088777a4a
1+
Subproject commit b001609960ca33047e5cbc5a231c1e24b6041d4b

branches/auto/src/libcollections/string.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,8 @@ impl String {
613613
///
614614
/// # Failure
615615
///
616-
/// Fails if `len` > current length.
616+
/// Fails if `new_len` > current length,
617+
/// or if `new_len` is not a character boundary.
617618
///
618619
/// # Example
619620
///
@@ -624,9 +625,9 @@ impl String {
624625
/// ```
625626
#[inline]
626627
#[unstable = "the failure conventions for strings are under development"]
627-
pub fn truncate(&mut self, len: uint) {
628-
assert!(self.as_slice().is_char_boundary(len));
629-
self.vec.truncate(len)
628+
pub fn truncate(&mut self, new_len: uint) {
629+
assert!(self.as_slice().is_char_boundary(new_len));
630+
self.vec.truncate(new_len)
630631
}
631632

632633
/// Appends a byte to this string buffer.

branches/auto/src/libnative/io/c_unix.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,9 @@ mod signal {
232232
pub static SA_SIGINFO: libc::c_int = 0x0040;
233233
pub static SIGCHLD: libc::c_int = 20;
234234

235-
#[cfg(target_os = "macos")]
236-
#[cfg(target_os = "ios")]
235+
#[cfg(any(target_os = "macos", target_os = "ios"))]
237236
pub type sigset_t = u32;
238-
#[cfg(target_os = "freebsd")]
239-
#[cfg(target_os = "dragonfly")]
237+
#[cfg(any(target_os = "freebsd", target_os = "dragonfly"))]
240238
#[repr(C)]
241239
pub struct sigset_t {
242240
bits: [u32, ..4],
@@ -254,8 +252,7 @@ mod signal {
254252
pub status: libc::c_int,
255253
}
256254

257-
#[cfg(target_os = "macos")]
258-
#[cfg(target_os = "ios")]
255+
#[cfg(any(target_os = "macos", target_os = "ios"))]
259256
#[repr(C)]
260257
pub struct sigaction {
261258
pub sa_handler: extern fn(libc::c_int),
@@ -264,8 +261,7 @@ mod signal {
264261
pub sa_flags: libc::c_int,
265262
}
266263

267-
#[cfg(target_os = "freebsd")]
268-
#[cfg(target_os = "dragonfly")]
264+
#[cfg(any(target_os = "freebsd", target_os = "dragonfly"))]
269265
#[repr(C)]
270266
pub struct sigaction {
271267
pub sa_handler: extern fn(libc::c_int),

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ pub fn invalid_output_for_target(sess: &Session,
466466
fn is_writeable(p: &Path) -> bool {
467467
match p.stat() {
468468
Err(..) => true,
469-
Ok(m) => m.perm & io::UserWrite == io::UserWrite
469+
Ok(m) => m.perm & io::USER_WRITE == io::USER_WRITE
470470
}
471471
}
472472

@@ -1025,10 +1025,10 @@ fn link_args(cmd: &mut Command,
10251025
cmd.arg("-Wl,--nxcompat");
10261026

10271027
// Mark all dynamic libraries and executables as compatible with ASLR
1028-
// FIXME #17098: ASLR breaks gdb
1029-
if sess.opts.debuginfo == NoDebugInfo {
1030-
cmd.arg("-Wl,--dynamicbase");
1031-
}
1028+
// FIXME #16514: ASLR is disabled on Windows due to MinGW-w64 bugs:
1029+
// FIXME #17098: ASLR breaks gdb on Windows
1030+
// FIXME #17684: ASLR breaks thread-local storage on Windows
1031+
//cmd.arg("-Wl,--dynamicbase");
10321032

10331033
// Mark all dynamic libraries and executables as compatible with the larger 4GiB address
10341034
// space available to x86 Windows binaries on x86_64.
@@ -1322,7 +1322,7 @@ fn add_upstream_rust_crates(cmd: &mut Command, sess: &Session,
13221322
// Fix up permissions of the copy, as fs::copy() preserves
13231323
// permissions, but the original file may have been installed
13241324
// by a package manager and may be read-only.
1325-
match fs::chmod(&dst, io::UserRead | io::UserWrite) {
1325+
match fs::chmod(&dst, io::USER_READ | io::USER_WRITE) {
13261326
Ok(..) => {}
13271327
Err(e) => {
13281328
sess.err(format!("failed to chmod {} when preparing \

branches/auto/src/librustc/diagnostics.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ register_diagnostics!(
3838
E0017,
3939
E0019,
4040
E0020,
41-
E0021,
4241
E0022,
4342
E0023,
4443
E0024,
@@ -62,7 +61,6 @@ register_diagnostics!(
6261
E0045,
6362
E0046,
6463
E0047,
65-
E0048,
6664
E0049,
6765
E0050,
6866
E0051,
@@ -117,8 +115,6 @@ register_diagnostics!(
117115
E0109,
118116
E0110,
119117
E0113,
120-
E0114,
121-
E0115,
122118
E0116,
123119
E0117,
124120
E0118,
@@ -152,5 +148,7 @@ register_diagnostics!(
152148
E0158,
153149
E0159,
154150
E0161,
155-
E0162
151+
E0162,
152+
E0163,
153+
E0164
156154
)

branches/auto/src/librustc/middle/save/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1467,7 +1467,7 @@ pub fn process_crate(sess: &Session,
14671467
},
14681468
};
14691469

1470-
match fs::mkdir_recursive(&root_path, io::UserRWX) {
1470+
match fs::mkdir_recursive(&root_path, io::USER_RWX) {
14711471
Err(e) => sess.err(format!("Could not create directory {}: {}",
14721472
root_path.display(), e).as_slice()),
14731473
_ => (),

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

Lines changed: 76 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -456,60 +456,17 @@ impl TypeMap {
456456
let return_type_id = self.get_unique_type_id_as_string(return_type_id);
457457
unique_type_id.push_str(return_type_id.as_slice());
458458
},
459-
ty::ty_closure(box ty::ClosureTy { fn_style,
460-
onceness,
461-
store,
462-
ref bounds,
463-
ref sig,
464-
abi: _ }) => {
465-
if fn_style == ast::UnsafeFn {
466-
unique_type_id.push_str("unsafe ");
467-
}
468-
469-
if onceness == ast::Once {
470-
unique_type_id.push_str("once ");
471-
}
472-
473-
match store {
474-
ty::UniqTraitStore => unique_type_id.push_str("~|"),
475-
ty::RegionTraitStore(_, ast::MutMutable) => {
476-
unique_type_id.push_str("&mut|")
477-
}
478-
ty::RegionTraitStore(_, ast::MutImmutable) => {
479-
unique_type_id.push_str("&|")
480-
}
481-
};
482-
483-
for &parameter_type in sig.inputs.iter() {
484-
let parameter_type_id =
485-
self.get_unique_type_id_of_type(cx, parameter_type);
486-
let parameter_type_id =
487-
self.get_unique_type_id_as_string(parameter_type_id);
488-
unique_type_id.push_str(parameter_type_id.as_slice());
489-
unique_type_id.push_char(',');
490-
}
491-
492-
if sig.variadic {
493-
unique_type_id.push_str("...");
494-
}
495-
496-
unique_type_id.push_str("|->");
497-
498-
let return_type_id = self.get_unique_type_id_of_type(cx, sig.output);
499-
let return_type_id = self.get_unique_type_id_as_string(return_type_id);
500-
unique_type_id.push_str(return_type_id.as_slice());
501-
502-
unique_type_id.push_char(':');
503-
504-
for bound in bounds.builtin_bounds.iter() {
505-
match bound {
506-
ty::BoundSend => unique_type_id.push_str("Send"),
507-
ty::BoundSized => unique_type_id.push_str("Sized"),
508-
ty::BoundCopy => unique_type_id.push_str("Copy"),
509-
ty::BoundSync => unique_type_id.push_str("Sync"),
510-
};
511-
unique_type_id.push_char('+');
512-
}
459+
ty::ty_closure(box ref closure_ty) => {
460+
self.get_unique_type_id_of_closure_type(cx,
461+
closure_ty.clone(),
462+
&mut unique_type_id);
463+
},
464+
ty::ty_unboxed_closure(ref def_id, _) => {
465+
let closure_ty = cx.tcx().unboxed_closures.borrow()
466+
.find(def_id).unwrap().closure_type.clone();
467+
self.get_unique_type_id_of_closure_type(cx,
468+
closure_ty,
469+
&mut unique_type_id);
513470
},
514471
_ => {
515472
cx.sess().bug(format!("get_unique_type_id_of_type() - unexpected type: {}, {:?}",
@@ -581,6 +538,66 @@ impl TypeMap {
581538
}
582539
}
583540

541+
fn get_unique_type_id_of_closure_type(&mut self,
542+
cx: &CrateContext,
543+
closure_ty: ty::ClosureTy,
544+
unique_type_id: &mut String) {
545+
let ty::ClosureTy { fn_style,
546+
onceness,
547+
store,
548+
ref bounds,
549+
ref sig,
550+
abi: _ } = closure_ty;
551+
if fn_style == ast::UnsafeFn {
552+
unique_type_id.push_str("unsafe ");
553+
}
554+
555+
if onceness == ast::Once {
556+
unique_type_id.push_str("once ");
557+
}
558+
559+
match store {
560+
ty::UniqTraitStore => unique_type_id.push_str("~|"),
561+
ty::RegionTraitStore(_, ast::MutMutable) => {
562+
unique_type_id.push_str("&mut|")
563+
}
564+
ty::RegionTraitStore(_, ast::MutImmutable) => {
565+
unique_type_id.push_str("&|")
566+
}
567+
};
568+
569+
for &parameter_type in sig.inputs.iter() {
570+
let parameter_type_id =
571+
self.get_unique_type_id_of_type(cx, parameter_type);
572+
let parameter_type_id =
573+
self.get_unique_type_id_as_string(parameter_type_id);
574+
unique_type_id.push_str(parameter_type_id.as_slice());
575+
unique_type_id.push_char(',');
576+
}
577+
578+
if sig.variadic {
579+
unique_type_id.push_str("...");
580+
}
581+
582+
unique_type_id.push_str("|->");
583+
584+
let return_type_id = self.get_unique_type_id_of_type(cx, sig.output);
585+
let return_type_id = self.get_unique_type_id_as_string(return_type_id);
586+
unique_type_id.push_str(return_type_id.as_slice());
587+
588+
unique_type_id.push_char(':');
589+
590+
for bound in bounds.builtin_bounds.iter() {
591+
match bound {
592+
ty::BoundSend => unique_type_id.push_str("Send"),
593+
ty::BoundSized => unique_type_id.push_str("Sized"),
594+
ty::BoundCopy => unique_type_id.push_str("Copy"),
595+
ty::BoundSync => unique_type_id.push_str("Sync"),
596+
};
597+
unique_type_id.push_char('+');
598+
}
599+
}
600+
584601
// Get the UniqueTypeId for an enum variant. Enum variants are not really
585602
// types of their own, so they need special handling. We still need a
586603
// UniqueTypeId for them, since to debuginfo they *are* real types.
@@ -2903,6 +2920,11 @@ fn type_metadata(cx: &CrateContext,
29032920
ty::ty_closure(ref closurety) => {
29042921
subroutine_type_metadata(cx, unique_type_id, &closurety.sig, usage_site_span)
29052922
}
2923+
ty::ty_unboxed_closure(ref def_id, _) => {
2924+
let sig = cx.tcx().unboxed_closures.borrow()
2925+
.find(def_id).unwrap().closure_type.sig.clone();
2926+
subroutine_type_metadata(cx, unique_type_id, &sig, usage_site_span)
2927+
}
29062928
ty::ty_struct(def_id, ref substs) => {
29072929
prepare_struct_metadata(cx,
29082930
t,

branches/auto/src/librustc/middle/trans/glue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ fn make_drop_glue<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, v0: ValueRef, t: ty::t)
429429
tvec::make_drop_glue_unboxed(bcx, v0, ty, true)
430430
}
431431
ty::ty_str => {
432-
let unit_ty = ty::sequence_element_type(bcx.tcx(), t);
432+
let unit_ty = ty::sequence_element_type(bcx.tcx(), content_ty);
433433
tvec::make_drop_glue_unboxed(bcx, v0, unit_ty, true)
434434
}
435435
ty::ty_trait(..) => {

0 commit comments

Comments
 (0)