Skip to content

Commit b88d103

Browse files
committed
auto merge of #17343 : alexcrichton/rust/rollup, r=alexcrichton
2 parents 4d2af38 + 3a54a4e commit b88d103

Some content is hidden

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

63 files changed

+560
-346
lines changed

configure

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,8 @@ valopt datadir "${CFG_PREFIX}/share" "install data"
453453
valopt infodir "${CFG_PREFIX}/share/info" "install additional info"
454454
valopt mandir "${CFG_PREFIX}/share/man" "install man pages in PATH"
455455

456+
valopt release-channel "source" "the name of the release channel to build"
457+
456458
# On windows we just store the libraries in the bin directory because
457459
# there's no rpath. This is where the build system itself puts libraries;
458460
# --libdir is used to configure the installation directory.
@@ -481,6 +483,23 @@ CFG_BUILD=`echo "${CFG_BUILD}" | sed 's/-pc-mingw32/-w64-mingw32/g'`
481483
CFG_HOST=`echo "${CFG_HOST}" | sed 's/-pc-mingw32/-w64-mingw32/g'`
482484
CFG_TARGET=`echo "${CFG_TARGET}" | sed 's/-pc-mingw32/-w64-mingw32/g'`
483485

486+
# Validate the release channel
487+
case "$CFG_RELEASE_CHANNEL" in
488+
(source | nightly | beta | stable)
489+
;;
490+
(*)
491+
err "release channel must be 'source', 'nightly', 'beta' or 'stable'"
492+
;;
493+
esac
494+
495+
# Continue supporting the old --enable-nightly flag to transition the bots
496+
# XXX Remove me
497+
if [ $CFG_ENABLE_NIGHTLY -eq 1 ]
498+
then
499+
CFG_RELEASE_CHANNEL=nightly
500+
putvar CFG_RELEASE_CHANNEL
501+
fi
502+
484503
step_msg "looking for build programs"
485504

486505
probe_need CFG_PERL perl
@@ -636,7 +655,7 @@ then
636655
# check that gcc, cc and g++ all point to the same compiler.
637656
# note that for xcode 5, g++ points to clang, not clang++
638657
if !((chk_cc gcc clang && chk_cc g++ clang) ||
639-
(chk_cc gcc gcc &&( chk_cc g++ g++ || chk g++ gcc))) then
658+
(chk_cc gcc gcc &&( chk_cc g++ g++ || chk g++ gcc))); then
640659
err "the gcc and g++ in your path point to different compilers.
641660
Check which versions are in your path with gcc --version and g++ --version.
642661
To resolve this problem, either fix your PATH or run configure with --enable-clang"

man/rustc.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH RUSTC "1" "March 2014" "rustc 0.12.0-pre" "User Commands"
1+
.TH RUSTC "1" "March 2014" "rustc 0.12.0" "User Commands"
22
.SH NAME
33
rustc \- The Rust compiler
44
.SH SYNOPSIS

man/rustdoc.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH RUSTDOC "1" "March 2014" "rustdoc 0.12.0-pre" "User Commands"
1+
.TH RUSTDOC "1" "March 2014" "rustdoc 0.12.0" "User Commands"
22
.SH NAME
33
rustdoc \- generate documentation from Rust source code
44
.SH SYNOPSIS

mk/main.mk

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,32 @@
1414

1515
# The version number
1616
CFG_RELEASE_NUM=0.12.0
17-
CFG_RELEASE_LABEL=-pre
1817

1918
CFG_FILENAME_EXTRA=4e7c5e5c
2019

21-
ifndef CFG_ENABLE_NIGHTLY
22-
# This is the normal version string
23-
CFG_RELEASE=$(CFG_RELEASE_NUM)$(CFG_RELEASE_LABEL)
24-
CFG_PACKAGE_VERS=$(CFG_RELEASE)
25-
else
26-
# Modify the version label for nightly builds
27-
CFG_RELEASE=$(CFG_RELEASE_NUM)$(CFG_RELEASE_LABEL)-nightly
28-
# When building nightly distributables just reuse the same "rust-nightly" name
29-
# so when we upload we'll always override the previous nighly. This doesn't actually
30-
# impact the version reported by rustc - it's just for file naming.
20+
ifeq ($(CFG_RELEASE_CHANNEL),stable)
21+
# This is the normal semver version string, e.g. "0.12.0", "0.12.0-nightly"
22+
CFG_RELEASE=$(CFG_RELEASE_NUM)
23+
# This is the string used in dist artifact file names, e.g. "0.12.0", "nightly"
24+
CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)
25+
endif
26+
ifeq ($(CFG_RELEASE_CHANNEL),beta)
27+
CFG_RELEASE=$(CFG_RELEASE_NUM)-beta
28+
# When building beta/nightly distributables just reuse the same "beta"
29+
# name so when we upload we'll always override the previous
30+
# nighly. This doesn't actually impact the version reported by rustc -
31+
# it's just for file naming.
32+
CFG_PACKAGE_VERS=beta
33+
endif
34+
ifeq ($(CFG_RELEASE_CHANNEL),nightly)
35+
CFG_RELEASE=$(CFG_RELEASE_NUM)-nightly
3136
CFG_PACKAGE_VERS=nightly
3237
endif
38+
ifeq ($(CFG_RELEASE_CHANNEL),source)
39+
CFG_RELEASE=$(CFG_RELEASE_NUM)-pre
40+
CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)-pre
41+
endif
42+
3343
# The name of the package to use for creating tarballs, installers etc.
3444
CFG_PACKAGE_NAME=rust-$(CFG_PACKAGE_VERS)
3545

src/doc/guide-tasks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ fn partial_sum(start: uint) -> f64 {
235235
}
236236
237237
fn main() {
238-
let mut futures = Vec::from_fn(1000, |ind| Future::spawn( proc() { partial_sum(ind) }));
238+
let mut futures = Vec::from_fn(200, |ind| Future::spawn( proc() { partial_sum(ind) }));
239239
240240
let mut final_res = 0f64;
241241
for ft in futures.iter_mut() {

src/doc/guide.md

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,11 @@ $ curl -s https://static.rust-lang.org/rustup.sh | sudo sh
2929
(If you're concerned about `curl | sudo sh`, please keep reading. Disclaimer
3030
below.)
3131

32-
If you're on Windows, please [download this .exe and run
33-
it](https://static.rust-lang.org/dist/rust-nightly-install.exe).
32+
If you're on Windows, please download either the [32-bit
33+
installer](https://static.rust-lang.org/dist/rust-nightly-i686-w64-mingw32.exe)
34+
or the [64-bit
35+
installer](https://static.rust-lang.org/dist/rust-nightly-x86_64-w64-mingw32.exe)
36+
and run it.
3437

3538
If you decide you don't want Rust anymore, we'll be a bit sad, but that's okay.
3639
Not every programming language is great for everyone. Just pass an argument to
@@ -185,8 +188,8 @@ Next up is this line:
185188
This line does all of the work in our little program. There are a number of
186189
details that are important here. The first is that it's indented with four
187190
spaces, not tabs. Please configure your editor of choice to insert four spaces
188-
with the tab key. We provide some sample configurations for various editors
189-
[here](https://github.com/rust-lang/rust/tree/master/src/etc).
191+
with the tab key. We provide some [sample configurations for various
192+
editors](https://github.com/rust-lang/rust/tree/master/src/etc).
190193

191194
The second point is the `println!()` part. This is calling a Rust **macro**,
192195
which is how metaprogramming is done in Rust. If it were a function instead, it
@@ -392,14 +395,10 @@ By the way, in these examples, `i` indicates that the number is an integer.
392395

393396
Rust is a statically typed language, which means that we specify our types up
394397
front. So why does our first example compile? Well, Rust has this thing called
395-
"[Hindley-Milner type
396-
inference](http://en.wikipedia.org/wiki/Hindley%E2%80%93Milner_type_system)",
397-
named after some really smart type theorists. If you clicked that link, don't
398-
be scared: what this means for you is that Rust will attempt to infer the types
399-
in your program, and it's pretty good at it. If it can infer the type, Rust
398+
"type inference." If it can figure out what the type of something is, Rust
400399
doesn't require you to actually type it out.
401400

402-
We can add the type if we want to. Types come after a colon (`:`):
401+
We can add the type if we want to, though. Types come after a colon (`:`):
403402

404403
```{rust}
405404
let x: int = 5;
@@ -1281,15 +1280,15 @@ two main looping constructs: `for` and `while`.
12811280

12821281
The `for` loop is used to loop a particular number of times. Rust's `for` loops
12831282
work a bit differently than in other systems languages, however. Rust's `for`
1284-
loop doesn't look like this C `for` loop:
1283+
loop doesn't look like this "C style" `for` loop:
12851284

1286-
```{ignore,c}
1285+
```{c}
12871286
for (x = 0; x < 10; x++) {
12881287
printf( "%d\n", x );
12891288
}
12901289
```
12911290

1292-
It looks like this:
1291+
Instead, it looks like this:
12931292

12941293
```{rust}
12951294
for x in range(0i, 10i) {
@@ -1312,10 +1311,9 @@ valid for the loop body. Once the body is over, the next value is fetched from
13121311
the iterator, and we loop another time. When there are no more values, the
13131312
`for` loop is over.
13141313

1315-
In our example, the `range` function is a function, provided by Rust, that
1316-
takes a start and an end position, and gives an iterator over those values. The
1317-
upper bound is exclusive, though, so our loop will print `0` through `9`, not
1318-
`10`.
1314+
In our example, `range` is a function that takes a start and an end position,
1315+
and gives an iterator over those values. The upper bound is exclusive, though,
1316+
so our loop will print `0` through `9`, not `10`.
13191317

13201318
Rust does not have the "C style" `for` loop on purpose. Manually controlling
13211319
each element of the loop is complicated and error prone, even for experienced C

src/doc/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ There are questions that are asked quite often, and so we've made FAQs for them:
8686

8787
# The standard library
8888

89-
You can find function-level documentation for the entire standard library
90-
[here](std/index.html). There's a list of crates on the left with more specific
91-
sections, or you can use the search bar at the top to search for something if
92-
you know its name.
89+
We have [API documentation for the entire standard
90+
library](std/index.html). There's a list of crates on the left with more
91+
specific sections, or you can use the search bar at the top to search for
92+
something if you know its name.
9393

9494
# External documentation
9595

src/etc/kate/rust.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<!ENTITY rustIdent "[a-zA-Z_][a-zA-Z_0-9]*">
88
<!ENTITY rustIntSuf "([iu](8|16|32|64)?)?">
99
]>
10-
<language name="Rust" version="0.12.0-pre" kateversion="2.4" section="Sources" extensions="*.rs" mimetype="text/x-rust" priority="15">
10+
<language name="Rust" version="0.12.0" kateversion="2.4" section="Sources" extensions="*.rs" mimetype="text/x-rust" priority="15">
1111
<highlighting>
1212
<list name="fn">
1313
<item> fn </item>

src/etc/licenseck.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
"test/bench/shootout-mandelbrot.rs", # BSD
5050
"test/bench/shootout-meteor.rs", # BSD
5151
"test/bench/shootout-nbody.rs", # BSD
52-
"test/bench/shootout-pidigits.rs", # BSD
5352
"test/bench/shootout-regex-dna.rs", # BSD
5453
"test/bench/shootout-reverse-complement.rs", # BSD
5554
"test/bench/shootout-threadring.rs", # BSD

src/liballoc/heap.rs

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010

1111
// FIXME: #13996: mark the `allocate` and `reallocate` return value as `noalias`
1212

13-
#[cfg(stage0, not(test))] use core::raw;
14-
#[cfg(stage0, not(test))] use util;
15-
1613
/// Returns a pointer to `size` bytes of memory.
1714
///
1815
/// Behavior is undefined if the requested size is 0 or the alignment is not a
@@ -111,21 +108,6 @@ unsafe fn exchange_free(ptr: *mut u8, size: uint, align: uint) {
111108
deallocate(ptr, size, align);
112109
}
113110

114-
#[cfg(stage0, not(test))]
115-
#[lang="closure_exchange_malloc"]
116-
#[inline]
117-
#[allow(deprecated)]
118-
unsafe fn closure_exchange_malloc(drop_glue: fn(*mut u8), size: uint,
119-
align: uint) -> *mut u8 {
120-
let total_size = util::get_box_size(size, align);
121-
let p = allocate(total_size, 8);
122-
123-
let alloc = p as *mut raw::Box<()>;
124-
(*alloc).drop_glue = drop_glue;
125-
126-
alloc as *mut u8
127-
}
128-
129111
// The minimum alignment guaranteed by the architecture. This value is used to
130112
// add fast paths for low alignment values. In practice, the alignment is a
131113
// constant at the call site and the branch will be optimized out.
@@ -155,9 +137,6 @@ mod imp {
155137
flags: c_int) -> *mut c_void;
156138
fn je_xallocx(ptr: *mut c_void, size: size_t, extra: size_t,
157139
flags: c_int) -> size_t;
158-
#[cfg(stage0)]
159-
fn je_dallocx(ptr: *mut c_void, flags: c_int);
160-
#[cfg(not(stage0))]
161140
fn je_sdallocx(ptr: *mut c_void, size: size_t, flags: c_int);
162141
fn je_nallocx(size: size_t, flags: c_int) -> size_t;
163142
fn je_malloc_stats_print(write_cb: Option<extern "C" fn(cbopaque: *mut c_void,
@@ -209,14 +188,6 @@ mod imp {
209188
}
210189

211190
#[inline]
212-
#[cfg(stage0)]
213-
pub unsafe fn deallocate(ptr: *mut u8, _size: uint, align: uint) {
214-
let flags = align_to_flags(align);
215-
je_dallocx(ptr as *mut c_void, flags)
216-
}
217-
218-
#[inline]
219-
#[cfg(not(stage0))]
220191
pub unsafe fn deallocate(ptr: *mut u8, size: uint, align: uint) {
221192
let flags = align_to_flags(align);
222193
je_sdallocx(ptr as *mut c_void, size as size_t, flags)

src/libcore/fmt/rt.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,6 @@
1414
//! These definitions are similar to their `ct` equivalents, but differ in that
1515
//! these can be statically allocated and are slightly optimized for the runtime
1616
17-
#[cfg(stage0)]
18-
#[doc(hidden)]
19-
pub enum Piece<'a> {
20-
String(&'a str),
21-
Argument(Argument<'a>),
22-
}
23-
2417
#[doc(hidden)]
2518
pub struct Argument<'a> {
2619
pub position: Position,

0 commit comments

Comments
 (0)