Skip to content

Commit db5a900

Browse files
---
yaml --- r: 234861 b: refs/heads/stable c: 0770f66 h: refs/heads/master i: 234859: 41e061b v: v3
1 parent 0f5a94c commit db5a900

File tree

16 files changed

+55
-151
lines changed

16 files changed

+55
-151
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: afae2ff723393b3ab4ccffef6ac7c6d1809e2da0
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: f859507de8c410b648d934d8f5ec1c52daac971d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: d5fdb55187ba319801b60f1d8e777cebbde71715
32+
refs/heads/stable: 0770f665d98c28507746d17c46289f1f9f250f31
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/configure

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,14 +1037,6 @@ 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-
10481040
# copy host-triples to target-triples so that hosts are a subset of targets
10491041
V_TEMP=""
10501042
for i in $CFG_HOST $CFG_TARGET;

branches/stable/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.3.0
16+
CFG_RELEASE_NUM=1.2.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/stable/src/doc/trpl/documentation.md

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

102102
#### Special sections
103103

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

108113
```rust
@@ -144,7 +149,7 @@ responsible for upholding.
144149
# fn foo() {}
145150
```
146151

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

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ $ 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-
4644
Some people, and somewhat rightfully so, get very upset when we tell you to
4745
`curl | sh`. Basically, when you do this, you are trusting that the good
4846
people who maintain Rust aren't going to hack your computer and do bad things.
@@ -52,8 +50,6 @@ binary downloads][install-page].
5250

5351
[from-source]: https://github.com/rust-lang/rust#building-from-source
5452

55-
## Platform support
56-
5753
Oh, we should also mention the officially supported platforms:
5854

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

73-
## After installation
74-
7569
If you've got Rust installed, you can open up a shell, and type this:
7670

7771
```bash

branches/stable/src/liblibc/lib.rs

Lines changed: 8 additions & 13 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 = "mips",
444+
#[cfg(any(target_arch = "x86",
445+
target_arch = "mips",
445446
target_arch = "mipsel",
446447
target_arch = "powerpc",
447448
target_arch = "le32",
448-
all(any(target_arch = "arm", target_arch = "x86"),
449-
not(target_os = "android"))))]
449+
all(target_arch = "arm", not(target_os = "android"))))]
450450
pub mod posix88 {
451451
pub type off_t = i32;
452452
pub type dev_t = u64;
@@ -458,8 +458,7 @@ pub mod types {
458458
pub type mode_t = u32;
459459
pub type ssize_t = i32;
460460
}
461-
#[cfg(all(any(target_arch = "arm", target_arch = "x86"),
462-
target_os = "android"))]
461+
#[cfg(all(target_arch = "arm", target_os = "android"))]
463462
pub mod posix88 {
464463
pub type off_t = i32;
465464
pub type dev_t = u32;
@@ -474,8 +473,7 @@ pub mod types {
474473
#[cfg(any(target_arch = "x86",
475474
target_arch = "le32",
476475
target_arch = "powerpc",
477-
all(any(target_arch = "arm", target_arch = "x86"),
478-
not(target_os = "android"))))]
476+
all(target_arch = "arm", not(target_os = "android"))))]
479477
pub mod posix01 {
480478
use types::os::arch::c95::{c_short, c_long, time_t};
481479
use types::os::arch::posix88::{dev_t, gid_t, ino_t};
@@ -521,8 +519,7 @@ pub mod types {
521519
pub __size: [u32; 9]
522520
}
523521
}
524-
#[cfg(all(any(target_arch = "arm", target_arch = "x86"),
525-
target_os = "android"))]
522+
#[cfg(all(target_arch = "arm", target_os = "android"))]
526523
pub mod posix01 {
527524
use types::os::arch::c95::{c_uchar, c_uint, c_ulong, time_t};
528525
use types::os::arch::c99::{c_longlong, c_ulonglong};
@@ -5919,15 +5916,13 @@ pub mod funcs {
59195916
use types::os::arch::c95::c_int;
59205917
use types::os::common::posix01::sighandler_t;
59215918

5922-
#[cfg(not(all(target_os = "android", any(target_arch = "arm",
5923-
target_arch = "x86"))))]
5919+
#[cfg(not(all(target_os = "android", target_arch = "arm")))]
59245920
extern {
59255921
pub fn signal(signum: c_int,
59265922
handler: sighandler_t) -> sighandler_t;
59275923
}
59285924

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

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

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ 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;
3433

3534
/// A stability index, giving the stability level for items and methods.
3635
pub struct Index<'tcx> {
@@ -60,57 +59,9 @@ impl<'a, 'tcx: 'a> Annotator<'a, 'tcx> {
6059
if self.index.staged_api[&ast::LOCAL_CRATE] {
6160
debug!("annotate(id = {:?}, attrs = {:?})", id, attrs);
6261
match attr::find_stability(self.tcx.sess.diagnostic(), attrs, item_sp) {
63-
Some(mut stab) => {
62+
Some(stab) => {
6463
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-
7564
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-
11465
self.index.map.insert(local_def(id), Some(stab));
11566

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

branches/stable/src/librustc_back/archive.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
//! A helper class for dealing with static archives
1212
1313
use std::env;
14-
use std::ffi::OsString;
1514
use std::fs::{self, File};
1615
use std::io::prelude::*;
1716
use std::io;
@@ -31,8 +30,7 @@ pub struct ArchiveConfig<'a> {
3130
pub lib_search_paths: Vec<PathBuf>,
3231
pub slib_prefix: String,
3332
pub slib_suffix: String,
34-
pub ar_prog: String,
35-
pub command_path: OsString,
33+
pub ar_prog: String
3634
}
3735

3836
pub struct Archive<'a> {
@@ -116,7 +114,6 @@ impl<'a> Archive<'a> {
116114
let abs_dst = env::current_dir().unwrap().join(&self.config.dst);
117115
let ar = &self.config.ar_prog;
118116
let mut cmd = Command::new(ar);
119-
cmd.env("PATH", &self.config.command_path);
120117
cmd.stdout(Stdio::piped()).stderr(Stdio::piped());
121118
self.prepare_ar_action(&mut cmd, &abs_dst, action);
122119
info!("{:?}", cmd);

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

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

3232
use std::env;
33-
use std::ffi::OsString;
3433
use std::fs::{self, PathExt};
3534
use std::io::{self, Read, Write};
3635
use std::mem;
@@ -371,17 +370,6 @@ pub fn get_ar_prog(sess: &Session) -> String {
371370
})
372371
}
373372

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-
385373
pub fn remove(sess: &Session, path: &Path) {
386374
match fs::remove_file(path) {
387375
Ok(..) => {}
@@ -566,7 +554,6 @@ fn link_rlib<'a>(sess: &'a Session,
566554
slib_prefix: sess.target.target.options.staticlib_prefix.clone(),
567555
slib_suffix: sess.target.target.options.staticlib_suffix.clone(),
568556
ar_prog: get_ar_prog(sess),
569-
command_path: command_path(sess),
570557
};
571558
let mut ab = ArchiveBuilder::create(config);
572559
ab.add_file(obj_filename).unwrap();
@@ -809,7 +796,15 @@ fn link_natively(sess: &Session, trans: &CrateTranslation, dylib: bool,
809796
// The invocations of cc share some flags across platforms
810797
let pname = get_cc_prog(sess);
811798
let mut cmd = Command::new(&pname);
812-
cmd.env("PATH", command_path(sess));
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());
813808

814809
let root = sess.target_filesearch(PathKind::Native).get_lib_path();
815810
cmd.args(&sess.target.target.options.pre_link_args);
@@ -1192,7 +1187,6 @@ fn add_upstream_rust_crates(cmd: &mut Linker, sess: &Session,
11921187
slib_prefix: sess.target.target.options.staticlib_prefix.clone(),
11931188
slib_suffix: sess.target.target.options.staticlib_suffix.clone(),
11941189
ar_prog: get_ar_prog(sess),
1195-
command_path: command_path(sess),
11961190
};
11971191
let mut archive = Archive::open(config);
11981192
archive.remove_file(&format!("{}.o", name));

branches/stable/src/librustc_typeck/diagnostics.rs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,19 @@ fn main() {
380380
```
381381
"##,
382382

383+
E0044: r##"
384+
You can't use type parameters on foreign items. Example of erroneous code:
385+
386+
```
387+
extern { fn some_func<T>(); }
388+
```
389+
390+
Just remove the type parameter to make this code works:
391+
392+
```
393+
extern { fn some_func(); }
394+
```
395+
383396
E0045: r##"
384397
Rust only supports variadic parameters for interoperability with C code in its
385398
FFI. As such, variadic parameters can only be used with functions which are
@@ -1488,7 +1501,9 @@ For more information see the [opt-in builtin traits RFC](https://github.com/rust
14881501
}
14891502

14901503
register_diagnostics! {
1491-
E0044, // foreign items may not have type parameters
1504+
E0034, // multiple applicable methods in scope
1505+
E0035, // does not take type parameters
1506+
E0036, // incorrect number of type parameters given for this method
14921507
E0068,
14931508
E0071,
14941509
E0074,

branches/stable/src/libstd/sys/windows/os.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,6 @@ impl ExactSizeIterator for Args {
311311

312312
impl Drop for Args {
313313
fn drop(&mut self) {
314-
// self.cur can be null if CommandLineToArgvW previously failed,
315-
// but LocalFree ignores NULL pointers
316314
unsafe { c::LocalFree(self.cur as *mut c_void); }
317315
}
318316
}
@@ -323,9 +321,6 @@ pub fn args() -> Args {
323321
let lpCmdLine = c::GetCommandLineW();
324322
let szArgList = c::CommandLineToArgvW(lpCmdLine, &mut nArgs);
325323

326-
// szArcList can be NULL if CommandLinToArgvW failed,
327-
// but in that case nArgs is 0 so we won't actually
328-
// try to read a null pointer
329324
Args { cur: szArgList, range: 0..(nArgs as isize) }
330325
}
331326
}

branches/stable/src/libstd/tuple.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@
2525
//! * `Eq`
2626
//! * `PartialOrd`
2727
//! * `Ord`
28-
//! * `Debug`
2928
//! * `Default`
30-
//! * `Hash`
3129
//!
3230
//! # Examples
3331
//!

branches/stable/src/libsyntax/attr.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ fn find_stability_generic<'a,
397397
-> (Option<Stability>, Vec<&'a AM>) {
398398

399399
let mut stab: Option<Stability> = None;
400-
let mut deprecated: Option<(Option<InternedString>, Option<InternedString>)> = None;
400+
let mut deprecated: Option<(InternedString, Option<InternedString>)> = None;
401401
let mut used_attrs: Vec<&'a AM> = vec![];
402402

403403
'outer: for attr in attrs {
@@ -484,7 +484,7 @@ fn find_stability_generic<'a,
484484
diagnostic.span_err(item_sp, "multiple deprecated attributes");
485485
}
486486

487-
deprecated = Some((since, reason));
487+
deprecated = Some((since.unwrap_or(intern_and_get_ident("bogus")), reason));
488488
}
489489
}
490490

@@ -493,7 +493,7 @@ fn find_stability_generic<'a,
493493
match stab {
494494
Some(ref mut s) => {
495495
let (since, reason) = deprecated.unwrap();
496-
s.deprecated_since = since;
496+
s.deprecated_since = Some(since);
497497
s.reason = reason;
498498
}
499499
None => {

0 commit comments

Comments
 (0)