Skip to content

Commit b3d888e

Browse files
committed
---
yaml --- r: 137153 b: refs/heads/release-prep c: 06a6ba1 h: refs/heads/master i: 137151: 2b183f3 v: v3
1 parent 9157763 commit b3d888e

File tree

453 files changed

+6169
-2563
lines changed

Some content is hidden

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

453 files changed

+6169
-2563
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2929
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
3030
refs/heads/libuv-update-temp-branch: 6ed22c618766f1f2a2e108eef8ce3f51be0f70b7
3131
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
32-
refs/heads/release-prep: 79d0e82f7386e9525e5232bf1083f74b0385838f
32+
refs/heads/release-prep: 06a6ba1d6fb37602cd3dff53491f96dc59aa3d94

branches/release-prep/.travis.yml

Lines changed: 49 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,60 @@
11
# Use something that's not 'ruby' so we don't set up things like
2-
# RVM/bundler/ruby and whatnot. Right now 'rust' as a language actually
3-
# downloads a rust/cargo snapshot, which we don't really want for building rust.
2+
# RVM/bundler/ruby and whatnot. Right now 'rust' isn't a language on travis and
3+
# it treats unknown languages as ruby-like I believe.
44
language: c
55

6-
# Make sure we've got an up-to-date g++ compiler to get past the LLVM configure
7-
# script.
6+
# Before we start doing anything, install a stock LLVM
87
install:
9-
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
8+
- sudo sh -c "echo 'deb http://llvm.org/apt/precise/ llvm-toolchain-precise-3.4 main' >> /etc/apt/sources.list"
9+
- sudo sh -c "echo 'deb http://llvm.org/apt/precise/ llvm-toolchain-precise main' >> /etc/apt/sources.list"
10+
- sudo sh -c "echo 'deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu precise main' >> /etc/apt/sources.list"
11+
- wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
1012
- sudo apt-get update -qq
11-
- sudo apt-get install g++-4.7
13+
- sudo apt-get install -qq --force-yes -y llvm-$LLVM_VERSION
14+
llvm-${LLVM_VERSION}-dev clang-$LLVM_VERSION lldb-$LLVM_VERSION
1215

13-
# The test suite is in general way too stressful for travis, especially in
14-
# terms of time limit and reliability. In the past we've tried to scale things
15-
# back to only build the stage1 compiler and run a subset of tests, but this
16-
# didn't end up panning out very well.
16+
17+
# All of the llvm tools are suffixed with "-$VERS" which we don't want, so
18+
# symlink them all into a local directory and just use that
1719
#
18-
# As a result, we're just using travis to run `make tidy` now. It'll help
19-
# everyone find out about their trailing spaces early on!
20+
# FIXME: this shouldn't update the src/llvm sub-repo, that takes about a minute
21+
# it's gotta download so much stuff.
2022
before_script:
21-
- ./configure
22-
script:
23-
- make tidy
23+
- mkdir -p local-llvm/bin
24+
- ln -nsf /usr/bin/llvm-config-$LLVM_VERSION local-llvm/bin/llvm-config
25+
- ln -nsf /usr/bin/llvm-mc-$LLVM_VERSION local-llvm/bin/llvm-mc
26+
- ln -nsf /usr/bin/llvm-as-$LLVM_VERSION local-llvm/bin/llvm-as
27+
- ln -nsf /usr/bin/llvm-dis-$LLVM_VERSION local-llvm/bin/llvm-dis
28+
- ln -nsf /usr/bin/llc-$LLVM_VERSION local-llvm/bin/llc
29+
- ln -nsf /usr/include/llvm-$LLVM_VERSION local-llvm/include
30+
- ./configure --disable-optimize-tests --llvm-root=`pwd`/local-llvm
31+
--enable-fast-make --enable-clang
32+
33+
# Tidy everything up first, then build a few things, and then run a few tests.
34+
# Note that this is meant to run in a "fairly small" amount of time, so this
35+
# isn't exhaustive at all.
36+
#
37+
# As a result of https://github.com/travis-ci/travis-ci/issues/1066, we run
38+
# everything in one large command instead of multiple commands.
39+
script: |
40+
if [[ $TRAVIS_PULL_REQUEST != 'false' ]]; then
41+
if [[ $LLVM_VERSION != '3.4' ]]; then exit 0; fi
42+
fi &&
43+
make tidy &&
44+
make -j4 rustc-stage1 RUSTFLAGS='-Z time-passes' &&
45+
make check-stage1-std check-stage1-rpass check-stage1-cfail check-stage1-rfail check-stage1-doc
46+
47+
env:
48+
global:
49+
- NO_BENCH=1
50+
matrix:
51+
- LLVM_VERSION=3.3
52+
- LLVM_VERSION=3.4
53+
54+
# We track this ourselves, and in theory we don't have to update the LLVM repo
55+
# (but sadly we do right now anyway).
56+
git:
57+
submodules: false
2458

2559
notifications:
2660
email: false

branches/release-prep/configure

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,6 @@ do
921921
make_dir $h/test/doc-guide-pointers
922922
make_dir $h/test/doc-guide-container
923923
make_dir $h/test/doc-guide-tasks
924-
make_dir $h/test/doc-guide-plugin
925924
make_dir $h/test/doc-rust
926925
done
927926

branches/release-prep/mk/ctags.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ CTAGS_LOCATIONS=$(patsubst ${CFG_SRC_DIR}src/llvm,, \
2828
$(patsubst ${CFG_SRC_DIR}src/rt/sundown,, \
2929
$(patsubst ${CFG_SRC_DIR}src/rt/vg,, \
3030
$(wildcard ${CFG_SRC_DIR}src/*) $(wildcard ${CFG_SRC_DIR}src/rt/*) \
31-
)))))))))
31+
)))))))))))
3232
CTAGS_OPTS=--options="${CFG_SRC_DIR}src/etc/ctags.rust" --languages=-javascript --recurse ${CTAGS_LOCATIONS}
3333
# We could use `--languages=Rust`, but there is value in producing tags for the
3434
# C++ parts of the code base too (at the time of writing, those are .h and .cpp

branches/release-prep/mk/docs.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
######################################################################
2828
DOCS := index intro tutorial guide guide-ffi guide-macros guide-lifetimes \
2929
guide-tasks guide-container guide-pointers guide-testing \
30-
guide-runtime guide-plugin complement-bugreport \
30+
guide-runtime complement-bugreport \
3131
complement-lang-faq complement-design-faq complement-project-faq rust \
3232
rustdoc guide-unsafe guide-strings reference
3333

branches/release-prep/mk/rt.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
# that's per-target so you're allowed to conditionally add files based on the
3636
# target.
3737
################################################################################
38-
NATIVE_LIBS := rust_builtin hoedown morestack miniz context_switch \
38+
NATIVE_LIBS := rust_builtin hoedown uv_support morestack miniz context_switch \
3939
rustrt_native rust_test_helpers
4040

4141
# $(1) is the target triple
@@ -50,6 +50,7 @@ NATIVE_DEPS_hoedown_$(1) := hoedown/src/autolink.c \
5050
hoedown/src/html_smartypants.c \
5151
hoedown/src/stack.c \
5252
hoedown/src/version.c
53+
NATIVE_DEPS_uv_support_$(1) := rust_uv.c
5354
NATIVE_DEPS_miniz_$(1) = miniz.c
5455
NATIVE_DEPS_rust_builtin_$(1) := rust_builtin.c \
5556
rust_android_dummy.c

branches/release-prep/src/compiletest/compiletest.rs

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

1111
#![crate_type = "bin"]
12-
#![feature(phase)]
12+
#![feature(phase, slicing_syntax)]
1313

1414
#![deny(warnings)]
1515

branches/release-prep/src/compiletest/runtest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ fn check_error_patterns(props: &TestProps,
874874
if done { return; }
875875

876876
let missing_patterns =
877-
props.error_patterns.slice(next_err_idx, props.error_patterns.len());
877+
props.error_patterns[next_err_idx..];
878878
if missing_patterns.len() == 1u {
879879
fatal_proc_rec(format!("error pattern '{}' not found!",
880880
missing_patterns[0]).as_slice(),

branches/release-prep/src/doc/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ something like:
3333
pandoc --from=markdown --to=html5 --number-sections -o reference.html reference.md
3434
~~~~
3535

36-
(reference.md being the Rust Reference Manual.)
36+
(rust.md being the Rust Reference Manual.)
3737

3838
The syntax for pandoc flavored markdown can be found at:
3939
http://johnmacfarlane.net/pandoc/README.html#pandocs-markdown

branches/release-prep/src/doc/complement-design-faq.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ representation as a primitive. This allows using Rust `enum`s in FFI where C
3939
`enum`s are also used, for most use cases. The attribute can also be applied
4040
to `struct`s to get the same layout as a C struct would.
4141

42-
[repr]: reference.html#miscellaneous-attributes
42+
[repr]: http://doc.rust-lang.org/rust.html#miscellaneous-attributes
4343

4444
## There is no GC
4545

@@ -56,7 +56,7 @@ Types which are [`Sync`][sync] are thread-safe when multiple shared
5656
references to them are used concurrently. Types which are not `Sync` are not
5757
thread-safe, and thus when used in a global require unsafe code to use.
5858

59-
[sync]: core/kinds/trait.Sync.html
59+
[sync]: http://doc.rust-lang.org/core/kinds/trait.Sync.html
6060

6161
### If mutable static items that implement `Sync` are safe, why is taking &mut SHARABLE unsafe?
6262

@@ -139,8 +139,8 @@ and explicitly calling the `clone` method. Making user-defined copy operators
139139
explicit surfaces the underlying complexity, forcing the developer to opt-in
140140
to potentially expensive operations.
141141

142-
[copy]: core/kinds/trait.Copy.html
143-
[clone]: core/clone/trait.Clone.html
142+
[copy]: http://doc.rust-lang.org/core/kinds/trait.Copy.html
143+
[clone]: http://doc.rust-lang.org/core/clone/trait.Clone.html
144144

145145
## No move constructors
146146

branches/release-prep/src/doc/guide-lifetimes.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,17 +305,21 @@ copying.
305305
# Circle(Point, f64), // origin, radius
306306
# Rectangle(Point, Size) // upper-left, dimensions
307307
# }
308+
# static tau: f64 = 6.28;
308309
fn compute_area(shape: &Shape) -> f64 {
309310
match *shape {
310-
Circle(_, radius) => std::f64::consts::PI * radius * radius,
311+
Circle(_, radius) => 0.5 * tau * radius * radius,
311312
Rectangle(_, ref size) => size.w * size.h
312313
}
313314
}
314315
~~~
315316

316317
The first case matches against circles. Here, the pattern extracts the
317318
radius from the shape variant and the action uses it to compute the
318-
area of the circle.
319+
area of the circle. (Like any up-to-date engineer, we use the [tau
320+
circle constant][tau] and not that dreadfully outdated notion of pi).
321+
322+
[tau]: http://www.math.utah.edu/~palais/pi.html
319323

320324
The second match is more interesting. Here we match against a
321325
rectangle and extract its size: but rather than copy the `size`

branches/release-prep/src/doc/guide-macros.md

Lines changed: 0 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
% The Rust Macros Guide
22

3-
<div class="unstable-feature">
4-
<b>Warning:</b> There are currently various problems with invoking macros, how
5-
they interact with their environment, and how they are used outside of the
6-
location in which they are defined. Macro definitions are likely to change
7-
slightly in the future. For this reason, they are hidden behind the
8-
<code>macro_rules</code> <a href="reference.html#compiler-features">feature
9-
attribute</a>.
10-
</div>
11-
123
# Introduction
134

145
Functions are the primary tool that programmers can use to build abstractions.
@@ -457,66 +448,6 @@ fn main() {
457448
The two `'x` names did not clash, which would have caused the loop
458449
to print "I am never printed" and to run forever.
459450

460-
# Scoping and macro import/export
461-
462-
Macros occupy a single global namespace. The interaction with Rust's system of
463-
modules and crates is somewhat complex.
464-
465-
Definition and expansion of macros both happen in a single depth-first,
466-
lexical-order traversal of a crate's source. So a macro defined at module scope
467-
is visible to any subsequent code in the same module, which includes the body
468-
of any subsequent child `mod` items.
469-
470-
If a module has the `macro_escape` attribute, its macros are also visible in
471-
its parent module after the child's `mod` item. If the parent also has
472-
`macro_escape` then the macros will be visible in the grandparent after the
473-
parent's `mod` item, and so forth.
474-
475-
Independent of `macro_escape`, the `macro_export` attribute controls visibility
476-
between crates. Any `macro_rules!` definition with the `macro_export`
477-
attribute will be visible to other crates that have loaded this crate with
478-
`phase(plugin)`. There is currently no way for the importing crate to control
479-
which macros are imported.
480-
481-
An example:
482-
483-
```rust
484-
# #![feature(macro_rules)]
485-
macro_rules! m1 (() => (()))
486-
487-
// visible here: m1
488-
489-
mod foo {
490-
// visible here: m1
491-
492-
#[macro_export]
493-
macro_rules! m2 (() => (()))
494-
495-
// visible here: m1, m2
496-
}
497-
498-
// visible here: m1
499-
500-
macro_rules! m3 (() => (()))
501-
502-
// visible here: m1, m3
503-
504-
#[macro_escape]
505-
mod bar {
506-
// visible here: m1, m3
507-
508-
macro_rules! m4 (() => (()))
509-
510-
// visible here: m1, m3, m4
511-
}
512-
513-
// visible here: m1, m3, m4
514-
# fn main() { }
515-
```
516-
517-
When this library is loaded with `#[phase(plugin)] extern crate`, only `m2`
518-
will be imported.
519-
520451
# A final note
521452

522453
Macros, as currently implemented, are not for the faint of heart. Even
@@ -526,10 +457,3 @@ tricky. Invoking the `log_syntax!` macro can help elucidate intermediate
526457
states, invoking `trace_macros!(true)` will automatically print those
527458
intermediate states out, and passing the flag `--pretty expanded` as a
528459
command-line argument to the compiler will show the result of expansion.
529-
530-
If Rust's macro system can't do what you need, you may want to write a
531-
[compiler plugin](guide-plugin.html) instead. Compared to `macro_rules!`
532-
macros, this is significantly more work, the interfaces are much less stable,
533-
and the warnings about debugging apply ten-fold. In exchange you get the
534-
flexibility of running arbitrary Rust code within the compiler. Syntax
535-
extension plugins are sometimes called "procedural macros" for this reason.

0 commit comments

Comments
 (0)