Skip to content

Commit 06fed1a

Browse files
committed
---
yaml --- r: 227801 b: refs/heads/try c: 52f6318 h: refs/heads/master i: 227799: fe7aa86 v: v3
1 parent 6dcd496 commit 06fed1a

File tree

18 files changed

+234
-44
lines changed

18 files changed

+234
-44
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: aca2057ed5fb7af3f8905b2bc01f72fa001c35c8
33
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4-
refs/heads/try: c6944fa9d78b59ed44e95fd8a25a80944adf2b4b
4+
refs/heads/try: 52f6318700b3132c1450595810d020a47485115a
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/configure

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,6 +1037,14 @@ for target_file in ${CFG_SRC_DIR}mk/cfg/*.mk; do
10371037
CFG_SUPPORTED_TARGET="${CFG_SUPPORTED_TARGET} $(basename "$target_file" .mk)"
10381038
done
10391039

1040+
# copy build-triples to host-triples so that builds are a subset of hosts
1041+
V_TEMP=""
1042+
for i in $CFG_BUILD $CFG_HOST;
1043+
do
1044+
echo "$V_TEMP" | grep -qF $i || V_TEMP="$V_TEMP${V_TEMP:+ }$i"
1045+
done
1046+
CFG_HOST=$V_TEMP
1047+
10401048
# copy host-triples to target-triples so that hosts are a subset of targets
10411049
V_TEMP=""
10421050
for i in $CFG_HOST $CFG_TARGET;

branches/try/mk/main.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
######################################################################
1414

1515
# The version number
16-
CFG_RELEASE_NUM=1.2.0
16+
CFG_RELEASE_NUM=1.3.0
1717

1818
# An optional number to put after the label, e.g. '.2' -> '-beta.2'
1919
# NB Make sure it starts with a dot to conform to semver pre-release

branches/try/src/doc/style/features/traits/generics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ explicitly implement to be used by this generic function.
2929
explicit conversions or other method calls would usually be necessary. See the
3030
[overloading/implicits use case](#use-case:-limited-overloading-and/or-implicit-conversions)
3131
below.
32-
* _Precise types_. Because generic give a _name_ to the specific type
32+
* _Precise types_. Because generics give a _name_ to the specific type
3333
implementing a trait, it is possible to be precise about places where that
3434
exact type is required or produced. For example, a function
3535

branches/try/src/doc/trpl/academic-research.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,32 @@ Recommended for inspiration and a better understanding of Rust's background.
4242

4343
### Papers *about* Rust
4444

45-
* [GPU programming in Rust](http://www.cs.indiana.edu/~eholk/papers/hips2013.pdf)
46-
* [Parallel closures: a new twist on an old idea](https://www.usenix.org/conference/hotpar12/parallel-closures-new-twist-old-idea) - not exactly about rust, but by nmatsakis
45+
* [GPU Programming in Rust: Implementing High Level Abstractions in a
46+
Systems Level
47+
Language](http://www.cs.indiana.edu/~eholk/papers/hips2013.pdf). Early GPU work by Eric Holk.
48+
* [Parallel closures: a new twist on an old
49+
idea](https://www.usenix.org/conference/hotpar12/parallel-closures-new-twist-old-idea)
50+
- not exactly about rust, but by nmatsakis
51+
* [Patina: A Formalization of the Rust Programming
52+
Language](ftp://ftp.cs.washington.edu/tr/2015/03/UW-CSE-15-03-02.pdf). Early
53+
formalization of a subset of the type system, by Eric Reed.
54+
* [Experience Report: Developing the Servo Web Browser Engine using
55+
Rust](http://arxiv.org/abs/1505.07383). By Lars Bergstrom.
56+
* [Implementing a Generic Radix Trie in
57+
Rust](https://michaelsproul.github.io/rust_radix_paper/rust-radix-sproul.pdf). Undergrad
58+
paper by Michael Sproul.
59+
* [Reenix: Implementing a Unix-Like Operating System in
60+
Rust](http://scialex.github.io/reenix.pdf). Undergrad paper by Alex
61+
Light.
62+
* [Evaluation of performance and productivity metrics of potential
63+
programming languages in the HPC environment](). Bachelor's thesis by
64+
Florian Wilkens. Compares C, Go and Rust.
65+
* [Nom, a byte oriented, streaming, zero copy, parser combinators library
66+
in Rust](http://spw15.langsec.org/papers/couprie-nom.pdf). By
67+
Geoffroy Couprie, research for VLC.
68+
* [Graph-Based Higher-Order Intermediate
69+
Representation](http://compilers.cs.uni-saarland.de/papers/lkh15_cgo.pdf). An
70+
experimental IR implemented in Impala, a Rust-like language.
71+
* [Code Refinement of Stencil
72+
Codes](http://compilers.cs.uni-saarland.de/papers/ppl14_web.pdf). Another
73+
paper using Impala.

branches/try/src/doc/trpl/documentation.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,8 @@ we could have added more explanation in a new paragraph.
101101

102102
#### Special sections
103103

104-
```rust
105-
/// # Examples
106-
# fn foo() {}
107-
```
108-
109104
Next, are special sections. These are indicated with a header, `#`. There
110-
are three kinds of headers that are commonly used. They aren't special syntax,
105+
are four kinds of headers that are commonly used. They aren't special syntax,
111106
just convention, for now.
112107

113108
```rust
@@ -149,7 +144,7 @@ responsible for upholding.
149144
# fn foo() {}
150145
```
151146

152-
Third, `Examples`. Include one or more examples of using your function or
147+
Fourth, `Examples`. Include one or more examples of using your function or
153148
method, and your users will love you for it. These examples go inside of
154149
code block annotations, which we'll talk about in a moment, and can have
155150
more than one section:

branches/try/src/doc/trpl/installing-rust.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ $ sudo /usr/local/lib/rustlib/uninstall.sh
4141
If you used the Windows installer, just re-run the `.msi` and it will give you
4242
an uninstall option.
4343

44+
## That disclaimer we promised
45+
4446
Some people, and somewhat rightfully so, get very upset when we tell you to
4547
`curl | sh`. Basically, when you do this, you are trusting that the good
4648
people who maintain Rust aren't going to hack your computer and do bad things.
@@ -50,6 +52,8 @@ binary downloads][install-page].
5052

5153
[from-source]: https://github.com/rust-lang/rust#building-from-source
5254

55+
## Platform support
56+
5357
Oh, we should also mention the officially supported platforms:
5458

5559
* Windows (7, 8, Server 2008 R2)
@@ -66,6 +70,8 @@ integrated as the Linux/OS X experience is. We're working on it! If anything
6670
does not work, it is a bug. Please let us know if that happens. Each and every
6771
commit is tested against Windows just like any other platform.
6872

73+
## After installation
74+
6975
If you've got Rust installed, you can open up a shell, and type this:
7076

7177
```bash

branches/try/src/liblibc/lib.rs

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -441,12 +441,12 @@ pub mod types {
441441
pub type intmax_t = i64;
442442
pub type uintmax_t = u64;
443443
}
444-
#[cfg(any(target_arch = "x86",
445-
target_arch = "mips",
444+
#[cfg(any(target_arch = "mips",
446445
target_arch = "mipsel",
447446
target_arch = "powerpc",
448447
target_arch = "le32",
449-
all(target_arch = "arm", not(target_os = "android"))))]
448+
all(any(target_arch = "arm", target_arch = "x86"),
449+
not(target_os = "android"))))]
450450
pub mod posix88 {
451451
pub type off_t = i32;
452452
pub type dev_t = u64;
@@ -458,7 +458,8 @@ pub mod types {
458458
pub type mode_t = u32;
459459
pub type ssize_t = i32;
460460
}
461-
#[cfg(all(target_arch = "arm", target_os = "android"))]
461+
#[cfg(all(any(target_arch = "arm", target_arch = "x86"),
462+
target_os = "android"))]
462463
pub mod posix88 {
463464
pub type off_t = i32;
464465
pub type dev_t = u32;
@@ -473,7 +474,8 @@ pub mod types {
473474
#[cfg(any(target_arch = "x86",
474475
target_arch = "le32",
475476
target_arch = "powerpc",
476-
all(target_arch = "arm", not(target_os = "android"))))]
477+
all(any(target_arch = "arm", target_arch = "x86"),
478+
not(target_os = "android"))))]
477479
pub mod posix01 {
478480
use types::os::arch::c95::{c_short, c_long, time_t};
479481
use types::os::arch::posix88::{dev_t, gid_t, ino_t};
@@ -519,7 +521,8 @@ pub mod types {
519521
pub __size: [u32; 9]
520522
}
521523
}
522-
#[cfg(all(target_arch = "arm", target_os = "android"))]
524+
#[cfg(all(any(target_arch = "arm", target_arch = "x86"),
525+
target_os = "android"))]
523526
pub mod posix01 {
524527
use types::os::arch::c95::{c_uchar, c_uint, c_ulong, time_t};
525528
use types::os::arch::c99::{c_longlong, c_ulonglong};
@@ -5916,13 +5919,15 @@ pub mod funcs {
59165919
use types::os::arch::c95::c_int;
59175920
use types::os::common::posix01::sighandler_t;
59185921

5919-
#[cfg(not(all(target_os = "android", target_arch = "arm")))]
5922+
#[cfg(not(all(target_os = "android", any(target_arch = "arm",
5923+
target_arch = "x86"))))]
59205924
extern {
59215925
pub fn signal(signum: c_int,
59225926
handler: sighandler_t) -> sighandler_t;
59235927
}
59245928

5925-
#[cfg(all(target_os = "android", target_arch = "arm"))]
5929+
#[cfg(all(target_os = "android", any(target_arch = "arm",
5930+
target_arch = "x86")))]
59265931
extern {
59275932
#[link_name = "bsd_signal"]
59285933
pub fn signal(signum: c_int,

branches/try/src/librustc/middle/stability.rs

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ use syntax::feature_gate::emit_feature_err;
3030
use util::nodemap::{DefIdMap, FnvHashSet, FnvHashMap};
3131

3232
use std::mem::replace;
33+
use std::cmp::Ordering;
3334

3435
/// A stability index, giving the stability level for items and methods.
3536
pub struct Index<'tcx> {
@@ -59,9 +60,57 @@ impl<'a, 'tcx: 'a> Annotator<'a, 'tcx> {
5960
if self.index.staged_api[&ast::LOCAL_CRATE] {
6061
debug!("annotate(id = {:?}, attrs = {:?})", id, attrs);
6162
match attr::find_stability(self.tcx.sess.diagnostic(), attrs, item_sp) {
62-
Some(stab) => {
63+
Some(mut stab) => {
6364
debug!("annotate: found {:?}", stab);
65+
// if parent is deprecated and we're not, inherit this by merging
66+
// deprecated_since and its reason.
67+
if let Some(parent_stab) = self.parent {
68+
if parent_stab.deprecated_since.is_some()
69+
&& stab.deprecated_since.is_none() {
70+
stab.deprecated_since = parent_stab.deprecated_since.clone();
71+
stab.reason = parent_stab.reason.clone();
72+
}
73+
}
74+
6475
let stab = self.tcx.intern_stability(stab);
76+
77+
// Check if deprecated_since < stable_since. If it is,
78+
// this is *almost surely* an accident.
79+
let deprecated_predates_stable = match (stab.deprecated_since.as_ref(),
80+
stab.since.as_ref()) {
81+
(Some(dep_since), Some(stab_since)) => {
82+
// explicit version of iter::order::lt to handle parse errors properly
83+
let mut is_less = false;
84+
for (dep_v, stab_v) in dep_since.split(".").zip(stab_since.split(".")) {
85+
match (dep_v.parse::<u64>(), stab_v.parse::<u64>()) {
86+
(Ok(dep_v), Ok(stab_v)) => match dep_v.cmp(&stab_v) {
87+
Ordering::Less => {
88+
is_less = true;
89+
break;
90+
}
91+
Ordering::Equal => { continue; }
92+
Ordering::Greater => { break; }
93+
},
94+
_ => {
95+
self.tcx.sess.span_err(item_sp,
96+
"Invalid stability or deprecation version found");
97+
// act like it isn't less because the question is now
98+
// nonsensical, and this makes us not do anything else
99+
// interesting.
100+
break;
101+
}
102+
}
103+
}
104+
is_less
105+
},
106+
_ => false,
107+
};
108+
109+
if deprecated_predates_stable {
110+
self.tcx.sess.span_err(item_sp,
111+
"An API can't be stabilized after it is deprecated");
112+
}
113+
65114
self.index.map.insert(local_def(id), Some(stab));
66115

67116
// Don't inherit #[stable(feature = "rust1", since = "1.0.0")]

branches/try/src/librustc_back/archive.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
//! A helper class for dealing with static archives
1212
1313
use std::env;
14+
use std::ffi::OsString;
1415
use std::fs::{self, File};
1516
use std::io::prelude::*;
1617
use std::io;
@@ -30,7 +31,8 @@ pub struct ArchiveConfig<'a> {
3031
pub lib_search_paths: Vec<PathBuf>,
3132
pub slib_prefix: String,
3233
pub slib_suffix: String,
33-
pub ar_prog: String
34+
pub ar_prog: String,
35+
pub command_path: OsString,
3436
}
3537

3638
pub struct Archive<'a> {
@@ -114,6 +116,7 @@ impl<'a> Archive<'a> {
114116
let abs_dst = env::current_dir().unwrap().join(&self.config.dst);
115117
let ar = &self.config.ar_prog;
116118
let mut cmd = Command::new(ar);
119+
cmd.env("PATH", &self.config.command_path);
117120
cmd.stdout(Stdio::piped()).stderr(Stdio::piped());
118121
self.prepare_ar_action(&mut cmd, &abs_dst, action);
119122
info!("{:?}", cmd);

branches/try/src/librustc_trans/back/link.rs

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ use util::fs::fix_windows_verbatim_for_gcc;
3030
use rustc_back::tempdir::TempDir;
3131

3232
use std::env;
33+
use std::ffi::OsString;
3334
use std::fs::{self, PathExt};
3435
use std::io::{self, Read, Write};
3536
use std::mem;
@@ -370,6 +371,17 @@ pub fn get_ar_prog(sess: &Session) -> String {
370371
})
371372
}
372373

374+
fn command_path(sess: &Session) -> OsString {
375+
// The compiler's sysroot often has some bundled tools, so add it to the
376+
// PATH for the child.
377+
let mut new_path = sess.host_filesearch(PathKind::All)
378+
.get_tools_search_paths();
379+
if let Some(path) = env::var_os("PATH") {
380+
new_path.extend(env::split_paths(&path));
381+
}
382+
env::join_paths(new_path).unwrap()
383+
}
384+
373385
pub fn remove(sess: &Session, path: &Path) {
374386
match fs::remove_file(path) {
375387
Ok(..) => {}
@@ -554,6 +566,7 @@ fn link_rlib<'a>(sess: &'a Session,
554566
slib_prefix: sess.target.target.options.staticlib_prefix.clone(),
555567
slib_suffix: sess.target.target.options.staticlib_suffix.clone(),
556568
ar_prog: get_ar_prog(sess),
569+
command_path: command_path(sess),
557570
};
558571
let mut ab = ArchiveBuilder::create(config);
559572
ab.add_file(obj_filename).unwrap();
@@ -796,15 +809,7 @@ fn link_natively(sess: &Session, trans: &CrateTranslation, dylib: bool,
796809
// The invocations of cc share some flags across platforms
797810
let pname = get_cc_prog(sess);
798811
let mut cmd = Command::new(&pname);
799-
800-
// The compiler's sysroot often has some bundled tools, so add it to the
801-
// PATH for the child.
802-
let mut new_path = sess.host_filesearch(PathKind::All)
803-
.get_tools_search_paths();
804-
if let Some(path) = env::var_os("PATH") {
805-
new_path.extend(env::split_paths(&path));
806-
}
807-
cmd.env("PATH", env::join_paths(new_path).unwrap());
812+
cmd.env("PATH", command_path(sess));
808813

809814
let root = sess.target_filesearch(PathKind::Native).get_lib_path();
810815
cmd.args(&sess.target.target.options.pre_link_args);
@@ -1187,6 +1192,7 @@ fn add_upstream_rust_crates(cmd: &mut Linker, sess: &Session,
11871192
slib_prefix: sess.target.target.options.staticlib_prefix.clone(),
11881193
slib_suffix: sess.target.target.options.staticlib_suffix.clone(),
11891194
ar_prog: get_ar_prog(sess),
1195+
command_path: command_path(sess),
11901196
};
11911197
let mut archive = Archive::open(config);
11921198
archive.remove_file(&format!("{}.o", name));

0 commit comments

Comments
 (0)