Skip to content

Commit 8c6a4fe

Browse files
committed
---
yaml --- r: 152433 b: refs/heads/try2 c: c2c9946 h: refs/heads/master i: 152431: 7ed4ac0 v: v3
1 parent 14a3afe commit 8c6a4fe

Some content is hidden

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

91 files changed

+227
-319
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: 7f777a5ba49785a74e5365e9897ddf4c02ea8519
8+
refs/heads/try2: c2c99463720e758d5aa0bdcea19dc5b3dd67292c
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/liballoc/arc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ impl<T: Share + Send> Drop for Arc<T> {
184184

185185
// This fence is needed to prevent reordering of use of the data and
186186
// deletion of the data. Because it is marked `Release`, the
187-
// decreasing of the reference count sychronizes with this `Acquire`
187+
// decreasing of the reference count synchronizes with this `Acquire`
188188
// fence. This means that use of the data happens before decreasing
189189
// the refernce count, which happens before this fence, which
190190
// happens before the deletion of the data.

branches/try2/src/libcore/fmt/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ impl<'a> Formatter<'a> {
539539
}
540540

541541
/// Runs a callback, emitting the correct padding either before or
542-
/// afterwards depending on whether right or left alingment is requested.
542+
/// afterwards depending on whether right or left alignment is requested.
543543
fn with_padding(&mut self,
544544
padding: uint,
545545
default: rt::Alignment,

branches/try2/src/libcore/result.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
//! *Note: The actual definition of `Writer` uses `IoResult`, which
106106
//! is just a synonym for `Result<T, IoError>`.*
107107
//!
108-
//! This method doesn`t produce a value, but the write may
108+
//! This method doesn't produce a value, but the write may
109109
//! fail. It's crucial to handle the error case, and *not* write
110110
//! something like this:
111111
//!

branches/try2/src/libgetopts/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ pub struct OptGroup {
163163
pub occur: Occur
164164
}
165165

166-
/// Describes wether an option is given at all or has a value.
166+
/// Describes whether an option is given at all or has a value.
167167
#[deriving(Clone, PartialEq)]
168168
enum Optval {
169169
Val(String),

branches/try2/src/libglob/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ use std::string::String;
4444
* pattern - see the `glob` function for more details.
4545
*/
4646
pub struct Paths {
47+
root: Path,
4748
dir_patterns: Vec<Pattern>,
4849
require_dir: bool,
4950
options: MatchOptions,
@@ -107,6 +108,7 @@ pub fn glob_with(pattern: &str, options: MatchOptions) -> Paths {
107108
// FIXME: How do we want to handle verbatim paths? I'm inclined to return nothing,
108109
// since we can't very well find all UNC shares with a 1-letter server name.
109110
return Paths {
111+
root: root,
110112
dir_patterns: Vec::new(),
111113
require_dir: false,
112114
options: options,
@@ -132,6 +134,7 @@ pub fn glob_with(pattern: &str, options: MatchOptions) -> Paths {
132134
}
133135

134136
Paths {
137+
root: root,
135138
dir_patterns: dir_patterns,
136139
require_dir: require_dir,
137140
options: options,

branches/try2/src/libgreen/context.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ extern {
143143
// stacks are disabled.
144144

145145
#[cfg(target_arch = "x86")]
146-
#[repr(C)]
147146
struct Registers {
148147
eax: u32, ebx: u32, ecx: u32, edx: u32,
149148
ebp: u32, esi: u32, edi: u32, esp: u32,
@@ -227,7 +226,7 @@ fn initialize_call_frame(regs: &mut Registers, fptr: InitFn, arg: uint,
227226
regs[RUSTRT_R14] = procedure.env as uint;
228227
regs[RUSTRT_R15] = fptr as uint;
229228

230-
// These registers are picked up by the regulard context switch paths. These
229+
// These registers are picked up by the regular context switch paths. These
231230
// will put us in "mostly the right context" except for frobbing all the
232231
// arguments to the right place. We have the small trampoline code inside of
233232
// rust_bootstrap_green_task to do that.

branches/try2/src/libgreen/sched.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ pub struct Scheduler {
8282
run_anything: bool,
8383
/// A fast XorShift rng for scheduler use
8484
rng: XorShiftRng,
85-
/// A togglable idle callback
85+
/// A toggleable idle callback
8686
idle_callback: Option<Box<PausableIdleCallback:Send>>,
8787
/// A countdown that starts at a random value and is decremented
8888
/// every time a yield check is performed. When it hits 0 a task
@@ -287,7 +287,7 @@ impl Scheduler {
287287

288288
// After processing a message, we consider doing some more work on the
289289
// event loop. The "keep going" condition changes after the first
290-
// iteration becase we don't want to spin here infinitely.
290+
// iteration because we don't want to spin here infinitely.
291291
//
292292
// Once we start doing work we can keep doing work so long as the
293293
// iteration does something. Note that we don't want to starve the

branches/try2/src/liblibc/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ pub use types::os::arch::extra::{mach_timebase_info};
291291
extern {}
292292

293293
/// A wrapper for a nullable pointer. Don't use this except for interacting
294-
/// with libc. Basically Option, but without the dependance on libstd.
294+
/// with libc. Basically Option, but without the dependence on libstd.
295295
// If/when libprim happens, this can be removed in favor of that
296296
pub enum Nullable<T> {
297297
Null,
@@ -3497,7 +3497,7 @@ pub mod consts {
34973497

34983498

34993499
pub mod funcs {
3500-
// Thankfull most of c95 is universally available and does not vary by OS
3500+
// Thankfully most of c95 is universally available and does not vary by OS
35013501
// or anything. The same is not true of POSIX.
35023502

35033503
pub mod c95 {

branches/try2/src/libnative/io/c_win32.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ pub static FIONBIO: libc::c_long = 0x8004667e;
2020
static FD_SETSIZE: uint = 64;
2121
pub static MSG_DONTWAIT: libc::c_int = 0;
2222

23-
#[repr(C)]
2423
pub struct WSADATA {
2524
pub wVersion: libc::WORD,
2625
pub wHighVersion: libc::WORD,
@@ -33,7 +32,6 @@ pub struct WSADATA {
3332

3433
pub type LPWSADATA = *mut WSADATA;
3534

36-
#[repr(C)]
3735
pub struct fd_set {
3836
fd_count: libc::c_uint,
3937
fd_array: [libc::SOCKET, ..FD_SETSIZE],

branches/try2/src/libnative/io/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,13 +152,13 @@ fn keep_going(data: &[u8], f: |*u8, uint| -> i64) -> i64 {
152152
/// Implementation of rt::rtio's IoFactory trait to generate handles to the
153153
/// native I/O functionality.
154154
pub struct IoFactory {
155-
_cannot_construct_outside_of_this_module: ()
155+
cannot_construct_outside_of_this_module: ()
156156
}
157157

158158
impl IoFactory {
159159
pub fn new() -> IoFactory {
160160
net::init();
161-
IoFactory { _cannot_construct_outside_of_this_module: () }
161+
IoFactory { cannot_construct_outside_of_this_module: () }
162162
}
163163
}
164164

branches/try2/src/libnative/io/net.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,7 @@ pub struct TcpStream {
254254

255255
struct Inner {
256256
fd: sock_t,
257-
258-
// Unused on Linux, where this lock is not necessary.
259-
#[allow(dead_code)]
260-
lock: mutex::NativeMutex
257+
lock: mutex::NativeMutex,
261258
}
262259

263260
pub struct Guard<'a> {

branches/try2/src/libnative/io/pipe_unix.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,7 @@ fn addr_to_sockaddr_un(addr: &CString) -> IoResult<(libc::sockaddr_storage, uint
5858

5959
struct Inner {
6060
fd: fd_t,
61-
62-
// Unused on Linux, where this lock is not necessary.
63-
#[allow(dead_code)]
64-
lock: mutex::NativeMutex
61+
lock: mutex::NativeMutex,
6562
}
6663

6764
impl Inner {

branches/try2/src/libnative/io/pipe_win32.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
//! it sounded like named pipes just weren't built for this kind of interaction,
5151
//! and the suggested solution was to use overlapped I/O.
5252
//!
53-
//! I don't realy know what overlapped I/O is, but my basic understanding after
53+
//! I don't really know what overlapped I/O is, but my basic understanding after
5454
//! reading about it is that you have an external Event which is used to signal
5555
//! I/O completion, passed around in some OVERLAPPED structures. As to what this
5656
//! is, I'm not exactly sure.

branches/try2/src/libnative/io/process.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@ fn waitpid(pid: pid_t, deadline: u64) -> IoResult<rtio::ProcessExit> {
923923
// Register a new SIGCHLD handler, returning the reading half of the
924924
// self-pipe plus the old handler registered (return value of sigaction).
925925
//
926-
// Be sure to set up the self-pipe first because as soon as we reigster a
926+
// Be sure to set up the self-pipe first because as soon as we register a
927927
// handler we're going to start receiving signals.
928928
fn register_sigchld() -> (libc::c_int, c::sigaction) {
929929
unsafe {

branches/try2/src/libnative/task.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ impl rt::Runtime for Ops {
166166
//
167167
// On a mildly unrelated note, it should also be pointed out that OS
168168
// condition variables are susceptible to spurious wakeups, which we need to
169-
// be ready for. In order to accomodate for this fact, we have an extra
169+
// be ready for. In order to accommodate for this fact, we have an extra
170170
// `awoken` field which indicates whether we were actually woken up via some
171171
// invocation of `reawaken`. This flag is only ever accessed inside the
172172
// lock, so there's no need to make it atomic.

branches/try2/src/librand/distributions/gamma.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ struct GammaSmallShape {
8181
/// See `Gamma` for sampling from a Gamma distribution with general
8282
/// shape parameters.
8383
struct GammaLargeShape {
84+
shape: f64,
8485
scale: f64,
8586
c: f64,
8687
d: f64
@@ -117,6 +118,7 @@ impl GammaLargeShape {
117118
fn new_raw(shape: f64, scale: f64) -> GammaLargeShape {
118119
let d = shape - 1. / 3.;
119120
GammaLargeShape {
121+
shape: shape,
120122
scale: scale,
121123
c: 1. / (9. * d).sqrt(),
122124
d: d

branches/try2/src/libregex/compile.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ pub enum Inst {
3434

3535
// The CharClass instruction tries to match one input character against
3636
// the range of characters given.
37-
// The flags indicate whether to do a case insentivie match and whether
37+
// The flags indicate whether to do a case insensitive match and whether
3838
// the character class is negated or not.
3939
CharClass(Vec<(char, char)>, Flags),
4040

@@ -48,7 +48,7 @@ pub enum Inst {
4848
EmptyBegin(Flags),
4949

5050
// Matches the end of the string, consumes no characters.
51-
// The flags indicate whether it matches if the proceding character
51+
// The flags indicate whether it matches if the proceeding character
5252
// is a new line.
5353
EmptyEnd(Flags),
5454

branches/try2/src/librustc/driver/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ fn describe_codegen_flags() {
189189
}
190190
}
191191

192-
/// Process command line options. Emits messages as appropirate.If compilation
192+
/// Process command line options. Emits messages as appropriate. If compilation
193193
/// should continue, returns a getopts::Matches object parsed from args, otherwise
194194
/// returns None.
195195
pub fn handle_options(mut args: Vec<String>) -> Option<getopts::Matches> {

branches/try2/src/librustc/front/std_inject.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,9 @@ fn inject_crates_ref(sess: &Session, krate: ast::Crate) -> ast::Crate {
130130
fold.fold_crate(krate)
131131
}
132132

133-
struct PreludeInjector<'a>;
133+
struct PreludeInjector<'a> {
134+
sess: &'a Session,
135+
}
134136

135137

136138
impl<'a> fold::Folder for PreludeInjector<'a> {
@@ -221,7 +223,9 @@ impl<'a> fold::Folder for PreludeInjector<'a> {
221223
}
222224
}
223225

224-
fn inject_prelude(_: &Session, krate: ast::Crate) -> ast::Crate {
225-
let mut fold = PreludeInjector;
226+
fn inject_prelude(sess: &Session, krate: ast::Crate) -> ast::Crate {
227+
let mut fold = PreludeInjector {
228+
sess: sess,
229+
};
226230
fold.fold_crate(krate)
227231
}

branches/try2/src/librustc/metadata/loader.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ pub struct Library {
8686
}
8787

8888
pub struct ArchiveMetadata {
89-
_archive: ArchiveRO,
89+
archive: ArchiveRO,
9090
// See comments in ArchiveMetadata::new for why this is static
9191
data: &'static [u8],
9292
}
@@ -487,7 +487,7 @@ impl ArchiveMetadata {
487487
unsafe { mem::transmute(data) }
488488
};
489489
Some(ArchiveMetadata {
490-
_archive: ar,
490+
archive: ar,
491491
data: data,
492492
})
493493
}

branches/try2/src/librustc/metadata/tyencode.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ pub struct ctxt<'a> {
4242
// Extra parameters are for converting to/from def_ids in the string rep.
4343
// Whatever format you choose should not contain pipe characters.
4444
pub struct ty_abbrev {
45+
pos: uint,
46+
len: uint,
4547
s: String
4648
}
4749

@@ -66,6 +68,8 @@ pub fn enc_ty(w: &mut MemWriter, cx: &ctxt, t: ty::t) {
6668
if abbrev_len < len {
6769
// I.e. it's actually an abbreviation.
6870
cx.abbrevs.borrow_mut().insert(t, ty_abbrev {
71+
pos: pos as uint,
72+
len: len as uint,
6973
s: format!("\\#{:x}:{:x}\\#", pos, len)
7074
});
7175
}

branches/try2/src/librustc/middle/borrowck/doc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ are computed based on the kind of borrow:
551551
The reasoning here is that a mutable borrow must be the only writer,
552552
therefore it prevents other writes (`MUTATE`), mutable borrows
553553
(`CLAIM`), and immutable borrows (`FREEZE`). An immutable borrow
554-
permits other immutable borrows but forbids writes and mutable borows.
554+
permits other immutable borrows but forbids writes and mutable borrows.
555555
Finally, a const borrow just wants to be sure that the value is not
556556
moved out from under it, so no actions are forbidden.
557557

branches/try2/src/librustc/middle/borrowck/gather_loans/lifetime.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pub fn guarantee_lifetime(bccx: &BorrowckCtxt,
2929
cause: euv::LoanCause,
3030
cmt: mc::cmt,
3131
loan_region: ty::Region,
32-
_: ty::BorrowKind)
32+
loan_kind: ty::BorrowKind)
3333
-> Result<(),()> {
3434
debug!("guarantee_lifetime(cmt={}, loan_region={})",
3535
cmt.repr(bccx.tcx), loan_region.repr(bccx.tcx));
@@ -38,6 +38,7 @@ pub fn guarantee_lifetime(bccx: &BorrowckCtxt,
3838
span: span,
3939
cause: cause,
4040
loan_region: loan_region,
41+
loan_kind: loan_kind,
4142
cmt_original: cmt.clone()};
4243
ctxt.check(&cmt, None)
4344
}
@@ -54,6 +55,7 @@ struct GuaranteeLifetimeContext<'a> {
5455
span: Span,
5556
cause: euv::LoanCause,
5657
loan_region: ty::Region,
58+
loan_kind: ty::BorrowKind,
5759
cmt_original: mc::cmt
5860
}
5961

branches/try2/src/librustc/middle/borrowck/gather_loans/mod.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@ impl<'a> GatherLoanCtxt<'a> {
310310
Loan {
311311
index: self.all_loans.len(),
312312
loan_path: loan_path,
313+
cmt: cmt,
313314
kind: req_kind,
314315
gen_scope: gen_scope,
315316
kill_scope: kill_scope,
@@ -480,7 +481,8 @@ impl<'a> GatherLoanCtxt<'a> {
480481
/// This visitor walks static initializer's expressions and makes
481482
/// sure the loans being taken are sound.
482483
struct StaticInitializerCtxt<'a> {
483-
bccx: &'a BorrowckCtxt<'a>
484+
bccx: &'a BorrowckCtxt<'a>,
485+
item_ub: ast::NodeId,
484486
}
485487

486488
impl<'a> visit::Visitor<()> for StaticInitializerCtxt<'a> {
@@ -507,7 +509,8 @@ pub fn gather_loans_in_static_initializer(bccx: &mut BorrowckCtxt, expr: &ast::E
507509
debug!("gather_loans_in_static_initializer(expr={})", expr.repr(bccx.tcx));
508510

509511
let mut sicx = StaticInitializerCtxt {
510-
bccx: bccx
512+
bccx: bccx,
513+
item_ub: expr.id,
511514
};
512515

513516
sicx.visit_expr(expr, ());

branches/try2/src/librustc/middle/borrowck/gather_loans/restrictions.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ pub fn compute_restrictions(bccx: &BorrowckCtxt,
3636
bccx: bccx,
3737
span: span,
3838
cause: cause,
39+
cmt_original: cmt.clone(),
3940
loan_region: loan_region,
4041
};
4142

@@ -48,6 +49,7 @@ pub fn compute_restrictions(bccx: &BorrowckCtxt,
4849
struct RestrictionsContext<'a> {
4950
bccx: &'a BorrowckCtxt<'a>,
5051
span: Span,
52+
cmt_original: mc::cmt,
5153
loan_region: ty::Region,
5254
cause: euv::LoanCause,
5355
}

branches/try2/src/librustc/middle/borrowck/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ pub enum PartialTotal {
180180
pub struct Loan {
181181
index: uint,
182182
loan_path: Rc<LoanPath>,
183+
cmt: mc::cmt,
183184
kind: ty::BorrowKind,
184185
restrictions: Vec<Restriction>,
185186
gen_scope: ast::NodeId,

0 commit comments

Comments
 (0)