Skip to content

Commit 7daa9f7

Browse files
committed
---
yaml --- r: 170326 b: refs/heads/auto c: 9dea210 h: refs/heads/master v: v3
1 parent 0e2db67 commit 7daa9f7

31 files changed

+70
-63
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: 20bce44810eb5146f609b4362990ef8835e55bb5
13+
refs/heads/auto: 9dea210730f1e5f8de32302db786deca3381f2bb
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/mk/dist.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ PKG_FILES := \
5959
rustllvm \
6060
snapshots.txt \
6161
rust-installer \
62-
rustbook \
6362
test) \
6463
$(PKG_GITMODULES) \
6564
$(filter-out config.stamp, \

branches/auto/mk/main.mk

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@
1515
# The version number
1616
CFG_RELEASE_NUM=1.0.0
1717

18-
# An optional number to put after the label, e.g. '.2' -> '-beta.2'
19-
# NB Make sure it starts with a dot to conform to semver pre-release
20-
# versions (section 9)
21-
CFG_PRERELEASE_VERSION=
18+
# An optional number to put after the label, e.g. '2' -> '-beta2'
19+
CFG_BETA_CYCLE=
2220

2321
CFG_FILENAME_EXTRA=4e7c5e5c
2422

@@ -31,8 +29,8 @@ CFG_DISABLE_UNSTABLE_FEATURES=1
3129
endif
3230
ifeq ($(CFG_RELEASE_CHANNEL),beta)
3331
# The beta channel is temporarily called 'alpha'
34-
CFG_RELEASE=$(CFG_RELEASE_NUM)-alpha$(CFG_PRERELEASE_VERSION)
35-
CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)-alpha$(CFG_PRERELEASE_VERSION)
32+
CFG_RELEASE=$(CFG_RELEASE_NUM)-alpha$(CFG_BETA_CYCLE)
33+
CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)-alpha$(CFG_BETA_CYCLE)
3634
CFG_DISABLE_UNSTABLE_FEATURES=1
3735
endif
3836
ifeq ($(CFG_RELEASE_CHANNEL),nightly)

branches/auto/src/libcollections/bit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ static FALSE: bool = false;
134134
/// # Examples
135135
///
136136
/// ```rust
137-
/// use std::collections::Bitv;
137+
/// use collections::Bitv;
138138
///
139139
/// let mut bv = Bitv::from_elem(10, false);
140140
///

branches/auto/src/librustc/metadata/creader.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,7 @@ impl<'a> CrateReader<'a> {
409409
crate_name: name,
410410
hash: hash.map(|a| &*a),
411411
filesearch: self.sess.target_filesearch(kind),
412+
target: &self.sess.target.target,
412413
triple: &self.sess.opts.target_triple[],
413414
root: root,
414415
rejected_via_hash: vec!(),
@@ -472,6 +473,7 @@ impl<'a> CrateReader<'a> {
472473
crate_name: &name[],
473474
hash: None,
474475
filesearch: self.sess.host_filesearch(PathKind::Crate),
476+
target: &self.sess.host,
475477
triple: config::host_triple(),
476478
root: &None,
477479
rejected_via_hash: vec!(),
@@ -486,6 +488,7 @@ impl<'a> CrateReader<'a> {
486488
target_only = true;
487489
should_link = info.should_link;
488490

491+
load_ctxt.target = &self.sess.target.target;
489492
load_ctxt.triple = target_triple;
490493
load_ctxt.filesearch = self.sess.target_filesearch(PathKind::Crate);
491494
load_ctxt.load_library_crate()

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ use metadata::filesearch::{FileSearch, FileMatches, FileDoesntMatch};
225225
use syntax::codemap::Span;
226226
use syntax::diagnostic::SpanHandler;
227227
use util::fs;
228+
use rustc_back::target::Target;
228229

229230
use std::ffi::CString;
230231
use std::cmp;
@@ -248,6 +249,8 @@ pub struct Context<'a> {
248249
pub ident: &'a str,
249250
pub crate_name: &'a str,
250251
pub hash: Option<&'a Svh>,
252+
// points to either self.sess.target.target or self.sess.host, must match triple
253+
pub target: &'a Target,
251254
pub triple: &'a str,
252255
pub filesearch: FileSearch<'a>,
253256
pub root: &'a Option<CratePaths>,
@@ -499,7 +502,7 @@ impl<'a> Context<'a> {
499502

500503
for lib in m.into_iter() {
501504
info!("{} reading metadata from: {}", flavor, lib.display());
502-
let metadata = match get_metadata_section(self.sess.target.target.options.is_like_osx,
505+
let metadata = match get_metadata_section(self.target.options.is_like_osx,
503506
&lib) {
504507
Ok(blob) => {
505508
if self.crate_matches(blob.as_slice(), &lib) {
@@ -588,7 +591,7 @@ impl<'a> Context<'a> {
588591
// Returns the corresponding (prefix, suffix) that files need to have for
589592
// dynamic libraries
590593
fn dylibname(&self) -> (String, String) {
591-
let t = &self.sess.target.target;
594+
let t = &self.target;
592595
(t.options.dll_prefix.clone(), t.options.dll_suffix.clone())
593596
}
594597

branches/auto/src/librustc/session/mod.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ use syntax::parse::token;
2525
use syntax::parse::ParseSess;
2626
use syntax::{ast, codemap};
2727

28+
use rustc_back::target::Target;
29+
2830
use std::os;
2931
use std::cell::{Cell, RefCell};
3032

@@ -35,6 +37,7 @@ pub mod search_paths;
3537
// session for a single crate.
3638
pub struct Session {
3739
pub target: config::Config,
40+
pub host: Target,
3841
pub opts: config::Options,
3942
pub cstore: CStore,
4043
pub parse_sess: ParseSess,
@@ -243,6 +246,13 @@ pub fn build_session_(sopts: config::Options,
243246
local_crate_source_file: Option<Path>,
244247
span_diagnostic: diagnostic::SpanHandler)
245248
-> Session {
249+
let host = match Target::search(config::host_triple()) {
250+
Ok(t) => t,
251+
Err(e) => {
252+
span_diagnostic.handler()
253+
.fatal((format!("Error loading host specification: {}", e)).as_slice());
254+
}
255+
};
246256
let target_cfg = config::build_target_config(&sopts, &span_diagnostic);
247257
let p_s = parse::new_parse_sess_special_handler(span_diagnostic);
248258
let default_sysroot = match sopts.maybe_sysroot {
@@ -268,6 +278,7 @@ pub fn build_session_(sopts: config::Options,
268278

269279
let sess = Session {
270280
target: target_cfg,
281+
host: host,
271282
opts: sopts,
272283
cstore: CStore::new(token::get_ident_interner()),
273284
parse_sess: p_s,

branches/auto/src/librustdoc/test.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ pub fn maketest(s: &str, cratename: Option<&str>, lints: bool, dont_insert_main:
215215
let mut prog = String::new();
216216
if lints {
217217
prog.push_str(r"
218+
#![deny(warnings)]
218219
#![allow(unused_variables, unused_assignments, unused_mut, unused_attributes, dead_code)]
219220
");
220221
}

branches/auto/src/libstd/ffi/c_str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ impl CString {
8484
unsafe { CString::from_vec_unchecked(v) }
8585
}
8686

87-
/// Create a C-compatible string from a byte vector without checking for
87+
/// Create a C-compatibel string from a byte vector without checking for
8888
/// interior 0 bytes.
8989
///
9090
/// This method is equivalent to `from_vec` except that no runtime assertion

branches/auto/src/libstd/sys/unix/condvar.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -76,20 +76,8 @@ impl Condvar {
7676
}
7777

7878
#[inline]
79-
#[cfg(not(target_os = "dragonfly"))]
8079
pub unsafe fn destroy(&self) {
8180
let r = ffi::pthread_cond_destroy(self.inner.get());
8281
debug_assert_eq!(r, 0);
8382
}
84-
85-
#[inline]
86-
#[cfg(target_os = "dragonfly")]
87-
pub unsafe fn destroy(&self) {
88-
let r = ffi::pthread_cond_destroy(self.inner.get());
89-
// On DragonFly pthread_cond_destroy() returns EINVAL if called on
90-
// a condvar that was just initialized with
91-
// ffi::PTHREAD_COND_INITIALIZER. Once it is used or
92-
// pthread_cond_init() is called, this behaviour no longer occurs.
93-
debug_assert!(r == 0 || r == libc::EINVAL);
94-
}
9583
}

branches/auto/src/libstd/sys/unix/mutex.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,8 @@ impl Mutex {
4848
ffi::pthread_mutex_trylock(self.inner.get()) == 0
4949
}
5050
#[inline]
51-
#[cfg(not(target_os = "dragonfly"))]
5251
pub unsafe fn destroy(&self) {
5352
let r = ffi::pthread_mutex_destroy(self.inner.get());
5453
debug_assert_eq!(r, 0);
5554
}
56-
#[inline]
57-
#[cfg(target_os = "dragonfly")]
58-
pub unsafe fn destroy(&self) {
59-
use libc;
60-
let r = ffi::pthread_mutex_destroy(self.inner.get());
61-
// On DragonFly pthread_mutex_destroy() returns EINVAL if called on a
62-
// mutex that was just initialized with ffi::PTHREAD_MUTEX_INITIALIZER.
63-
// Once it is used (locked/unlocked) or pthread_mutex_init() is called,
64-
// this behaviour no longer occurs.
65-
debug_assert!(r == 0 || r == libc::EINVAL);
66-
}
6755
}

branches/auto/src/libstd/sys/unix/rwlock.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -50,21 +50,8 @@ impl RWLock {
5050
#[inline]
5151
pub unsafe fn write_unlock(&self) { self.read_unlock() }
5252
#[inline]
53-
#[cfg(not(target_os = "dragonfly"))]
5453
pub unsafe fn destroy(&self) {
5554
let r = ffi::pthread_rwlock_destroy(self.inner.get());
5655
debug_assert_eq!(r, 0);
5756
}
58-
59-
#[inline]
60-
#[cfg(target_os = "dragonfly")]
61-
pub unsafe fn destroy(&self) {
62-
use libc;
63-
let r = ffi::pthread_rwlock_destroy(self.inner.get());
64-
// On DragonFly pthread_rwlock_destroy() returns EINVAL if called on a
65-
// rwlock that was just initialized with
66-
// ffi::PTHREAD_RWLOCK_INITIALIZER. Once it is used (locked/unlocked)
67-
// or pthread_rwlock_init() is called, this behaviour no longer occurs.
68-
debug_assert!(r == 0 || r == libc::EINVAL);
69-
}
7057
}

branches/auto/src/test/bench/core-map.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ use std::collections::{BTreeMap, HashMap, HashSet};
1414
use std::os;
1515
use std::rand::{Rng, IsaacRng, SeedableRng};
1616
use std::time::Duration;
17+
use std::uint;
1718

1819
fn timed<F>(label: &str, f: F) where F: FnMut() {
1920
println!(" {}: {}", label, Duration::span(f));

branches/auto/src/test/bench/core-set.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ use std::collections::hash_map::Hasher;
2222
use std::hash::Hash;
2323
use std::os;
2424
use std::time::Duration;
25+
use std::uint;
2526

2627
struct Results {
2728
sequential_ints: Duration,

branches/auto/src/test/bench/core-uint-to-str.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
use std::os;
12+
use std::uint;
1213

1314
fn main() {
1415
let args = os::args();

branches/auto/src/test/bench/msgsend-pipes-shared.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ use std::sync::mpsc::{channel, Sender, Receiver};
2222
use std::os;
2323
use std::thread::Thread;
2424
use std::time::Duration;
25+
use std::uint;
2526

2627
fn move_out<T>(_x: T) {}
2728

branches/auto/src/test/bench/msgsend-pipes.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ use std::sync::mpsc::{channel, Sender, Receiver};
1818
use std::os;
1919
use std::thread::Thread;
2020
use std::time::Duration;
21+
use std::uint;
22+
23+
fn move_out<T>(_x: T) {}
2124

2225
enum request {
2326
get_count,
@@ -39,7 +42,7 @@ fn server(requests: &Receiver<request>, responses: &Sender<uint>) {
3942
_ => { }
4043
}
4144
}
42-
responses.send(count).unwrap();
45+
responses.send(count);
4346
//println!("server exiting");
4447
}
4548

branches/auto/src/test/bench/msgsend-ring-mutex-arcs.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
use std::os;
2222
use std::sync::{Arc, Future, Mutex, Condvar};
2323
use std::time::Duration;
24+
use std::uint;
2425

2526
// A poor man's pipe.
2627
type pipe = Arc<(Mutex<Vec<uint>>, Condvar)>;
@@ -75,7 +76,7 @@ fn main() {
7576
let num_tasks = args[1].parse::<uint>().unwrap();
7677
let msg_per_task = args[2].parse::<uint>().unwrap();
7778

78-
let (num_chan, num_port) = init();
79+
let (mut num_chan, num_port) = init();
7980

8081
let mut p = Some((num_chan, num_port));
8182
let dur = Duration::span(|| {

branches/auto/src/test/bench/rt-parfib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,23 @@
1111
use std::sync::mpsc::channel;
1212
use std::os;
1313
use std::thread::Thread;
14+
use std::uint;
1415

1516
// A simple implementation of parfib. One subtree is found in a new
1617
// task and communicated over a oneshot pipe, the other is found
1718
// locally. There is no sequential-mode threshold.
1819

1920
fn parfib(n: uint) -> uint {
20-
if n == 0 || n == 1 {
21+
if(n == 0 || n == 1) {
2122
return 1;
2223
}
2324

2425
let (tx, rx) = channel();
2526
Thread::spawn(move|| {
26-
tx.send(parfib(n-1)).unwrap();
27+
tx.send(parfib(n-1));
2728
});
2829
let m2 = parfib(n-2);
29-
return rx.recv().unwrap() + m2;
30+
return (rx.recv().unwrap() + m2);
3031
}
3132

3233
fn main() {

branches/auto/src/test/bench/shootout-binarytrees.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ fn main() {
9292
let long_lived_arena = TypedArena::new();
9393
let long_lived_tree = bottom_up_tree(&long_lived_arena, 0, max_depth);
9494

95-
let messages = range_step(min_depth, max_depth + 1, 2).map(|depth| {
95+
let mut messages = range_step(min_depth, max_depth + 1, 2).map(|depth| {
9696
use std::num::Int;
9797
let iterations = 2i.pow((max_depth - depth + min_depth) as uint);
9898
Thread::scoped(move|| {

branches/auto/src/test/bench/shootout-chameneos-redux.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ fn rendezvous(nn: uint, set: Vec<Color>) {
182182
let (to_rendezvous_log, from_creatures_log) = channel::<String>();
183183

184184
// these channels will allow us to talk to each creature by 'name'/index
185-
let to_creature: Vec<Sender<CreatureInfo>> =
185+
let mut to_creature: Vec<Sender<CreatureInfo>> =
186186
set.iter().enumerate().map(|(ii, &col)| {
187187
// create each creature as a listener with a port, and
188188
// give us a channel to talk to each

branches/auto/src/test/bench/shootout-fannkuch-redux.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ impl Perm {
128128
}
129129

130130

131-
fn reverse(tperm: &mut [i32], k: uint) {
131+
fn reverse(tperm: &mut [i32], mut k: uint) {
132132
tperm.slice_to_mut(k).reverse()
133133
}
134134

@@ -163,7 +163,7 @@ fn fannkuch(n: i32) -> (i32, i32) {
163163
let mut futures = vec![];
164164
let k = perm.max() / N;
165165

166-
for (_, j) in range(0, N).zip(iter::count(0, k)) {
166+
for (i, j) in range(0, N).zip(iter::count(0, k)) {
167167
let max = cmp::min(j+k, perm.max());
168168

169169
futures.push(Thread::scoped(move|| {

branches/auto/src/test/bench/shootout-k-nucleotide.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#![feature(box_syntax)]
4444

4545
use std::ascii::OwnedAsciiExt;
46+
use std::iter::repeat;
4647
use std::slice;
4748
use std::sync::Arc;
4849
use std::thread::Thread;

branches/auto/src/test/bench/shootout-nbody.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,6 @@ fn shift_mut_ref<'a, T>(r: &mut &'a mut [T]) -> Option<&'a mut T> {
202202
raw.data = raw.data.offset(1);
203203
raw.len -= 1;
204204
*r = mem::transmute(raw);
205-
Some({ &mut *ret })
205+
Some(unsafe { &mut *ret })
206206
}
207207
}

branches/auto/src/test/bench/shootout-reverse-complement.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ unsafe impl<T: 'static> Send for Racy<T> {}
229229

230230
/// Executes a closure in parallel over the given iterator over mutable slice.
231231
/// The closure `f` is run in parallel with an element of `iter`.
232-
fn parallel<'a, I, T, F>(iter: I, f: F)
232+
fn parallel<'a, I, T, F>(mut iter: I, f: F)
233233
where T: 'a+Send + Sync,
234234
I: Iterator<Item=&'a mut [T]>,
235235
F: Fn(&mut [T]) + Sync {

0 commit comments

Comments
 (0)