Skip to content

Commit e9278c9

Browse files
committed
auto merge of #17159 : brson/rust/snaps, r=alexcrichton
This switches win64 hosts to bootstrap from win64 snaps.
2 parents 22e749d + 38e7e4b commit e9278c9

File tree

3 files changed

+10
-64
lines changed

3 files changed

+10
-64
lines changed

src/etc/get-snapshot.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,7 @@ def unpack_snapshot(triple, dl_path):
5252
if len(sys.argv) == 3:
5353
dl_path = sys.argv[2]
5454
else:
55-
# There are no 64-bit Windows snapshots yet, so we'll use 32-bit ones instead, for now
56-
snap_triple = triple if triple != "x86_64-w64-mingw32" else "i686-w64-mingw32"
57-
snap = determine_curr_snapshot(snap_triple)
55+
snap = determine_curr_snapshot(triple)
5856
dl = os.path.join(download_dir_base, snap)
5957
url = download_url_base + "/" + snap
6058
print("determined most recent snapshot: " + snap)

src/libcore/fmt/mod.rs

-61
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ impl<'a> Arguments<'a> {
113113
/// Arguments structure. The compiler inserts an `unsafe` block to call this,
114114
/// which is valid because the compiler performs all necessary validation to
115115
/// ensure that the resulting call to format/write would be safe.
116-
#[cfg(not(stage0))]
117116
#[doc(hidden)] #[inline]
118117
pub unsafe fn new<'a>(pieces: &'static [&'static str],
119118
args: &'a [Argument<'a>]) -> Arguments<'a> {
@@ -127,7 +126,6 @@ impl<'a> Arguments<'a> {
127126
/// This function is used to specify nonstandard formatting parameters.
128127
/// The `pieces` array must be at least as long as `fmt` to construct
129128
/// a valid Arguments structure.
130-
#[cfg(not(stage0))]
131129
#[doc(hidden)] #[inline]
132130
pub unsafe fn with_placeholders<'a>(pieces: &'static [&'static str],
133131
fmt: &'static [rt::Argument<'static>],
@@ -138,13 +136,6 @@ impl<'a> Arguments<'a> {
138136
args: args
139137
}
140138
}
141-
142-
#[cfg(stage0)]
143-
#[doc(hidden)] #[inline]
144-
pub unsafe fn new<'a>(fmt: &'static [rt::Piece<'static>],
145-
args: &'a [Argument<'a>]) -> Arguments<'a> {
146-
Arguments{ fmt: mem::transmute(fmt), args: args }
147-
}
148139
}
149140

150141
/// This structure represents a safely precompiled version of a format string
@@ -156,7 +147,6 @@ impl<'a> Arguments<'a> {
156147
/// and pass it to a function or closure, passed as the first argument. The
157148
/// macro validates the format string at compile-time so usage of the `write`
158149
/// and `format` functions can be safely performed.
159-
#[cfg(not(stage0))]
160150
pub struct Arguments<'a> {
161151
// Format string pieces to print.
162152
pieces: &'a [&'a str],
@@ -169,12 +159,6 @@ pub struct Arguments<'a> {
169159
args: &'a [Argument<'a>],
170160
}
171161

172-
#[cfg(stage0)] #[doc(hidden)]
173-
pub struct Arguments<'a> {
174-
fmt: &'a [rt::Piece<'a>],
175-
args: &'a [Argument<'a>],
176-
}
177-
178162
impl<'a> Show for Arguments<'a> {
179163
fn fmt(&self, fmt: &mut Formatter) -> Result {
180164
write(fmt.buf, self)
@@ -296,7 +280,6 @@ uniform_fn_call_workaround! {
296280
secret_upper_exp, UpperExp;
297281
}
298282

299-
#[cfg(not(stage0))]
300283
static DEFAULT_ARGUMENT: rt::Argument<'static> = rt::Argument {
301284
position: rt::ArgumentNext,
302285
format: rt::FormatSpec {
@@ -316,7 +299,6 @@ static DEFAULT_ARGUMENT: rt::Argument<'static> = rt::Argument {
316299
///
317300
/// * output - the buffer to write output to
318301
/// * args - the precompiled arguments generated by `format_args!`
319-
#[cfg(not(stage0))]
320302
pub fn write(output: &mut FormatWriter, args: &Arguments) -> Result {
321303
let mut formatter = Formatter {
322304
flags: 0,
@@ -360,30 +342,11 @@ pub fn write(output: &mut FormatWriter, args: &Arguments) -> Result {
360342
Ok(())
361343
}
362344

363-
#[cfg(stage0)] #[doc(hidden)]
364-
pub fn write(output: &mut FormatWriter, args: &Arguments) -> Result {
365-
let mut formatter = Formatter {
366-
flags: 0,
367-
width: None,
368-
precision: None,
369-
buf: output,
370-
align: rt::AlignUnknown,
371-
fill: ' ',
372-
args: args.args,
373-
curarg: args.args.iter(),
374-
};
375-
for piece in args.fmt.iter() {
376-
try!(formatter.run(piece));
377-
}
378-
Ok(())
379-
}
380-
381345
impl<'a> Formatter<'a> {
382346

383347
// First up is the collection of functions used to execute a format string
384348
// at runtime. This consumes all of the compile-time statics generated by
385349
// the format! syntax extension.
386-
#[cfg(not(stage0))]
387350
fn run(&mut self, arg: &rt::Argument) -> Result {
388351
// Fill in the format parameters into the formatter
389352
self.fill = arg.format.fill;
@@ -402,30 +365,6 @@ impl<'a> Formatter<'a> {
402365
(value.formatter)(value.value, self)
403366
}
404367

405-
#[cfg(stage0)] #[doc(hidden)]
406-
fn run(&mut self, piece: &rt::Piece) -> Result {
407-
match *piece {
408-
rt::String(s) => self.buf.write(s.as_bytes()),
409-
rt::Argument(ref arg) => {
410-
// Fill in the format parameters into the formatter
411-
self.fill = arg.format.fill;
412-
self.align = arg.format.align;
413-
self.flags = arg.format.flags;
414-
self.width = self.getcount(&arg.format.width);
415-
self.precision = self.getcount(&arg.format.precision);
416-
417-
// Extract the correct argument
418-
let value = match arg.position {
419-
rt::ArgumentNext => { *self.curarg.next().unwrap() }
420-
rt::ArgumentIs(i) => self.args[i],
421-
};
422-
423-
// Then actually do some printing
424-
(value.formatter)(value.value, self)
425-
}
426-
}
427-
}
428-
429368
fn getcount(&mut self, cnt: &rt::Count) -> Option<uint> {
430369
match *cnt {
431370
rt::CountIs(n) => { Some(n) }

src/snapshots.txt

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
S 2014-09-10 6faa4f3
2+
winnt-x86_64 939eb546469cb936441cff3b6f2478f562f77c46
3+
winnt-i386 cfe4f8b519bb9d62588f9310a8f94bc919d5423b
4+
linux-x86_64 72c92895fa9a1dba7880073f2b2b5d0e3e1a2ab6
5+
linux-i386 6f5464c9ab191d93bfea0894ca7c6f90c3506f2b
6+
freebsd-x86_64 648f35800ba98f1121d418b6d0c13c63b7a8951b
7+
macos-i386 545fc45a0071142714639c6be377e6d308c3a4e1
8+
macos-x86_64 8b44fbbbd1ba519d2e83d0d5ce1f6053d3cab8c6
9+
110
S 2014-09-05 67b97ab
211
freebsd-x86_64 5ed208394cb2a378ddfaa005b6298d2f142ad47f
312
linux-i386 d90866947bfa09738cf8540d17a8eedc70988fcc

0 commit comments

Comments
 (0)