Skip to content

Commit a02ea6b

Browse files
committed
---
yaml --- r: 235509 b: refs/heads/stable c: 2d32a15 h: refs/heads/master i: 235507: cba0e40 v: v3
1 parent fc5152e commit a02ea6b

Some content is hidden

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

54 files changed

+965
-2555
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: 07b337ce33c6c555ce9ff1ad7f97f4acc8434c05
32+
refs/heads/stable: 2d32a15667c6d04db96938d1e3e56db34c0a9415
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/.travis.yml

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,20 @@
1-
# ccache support is disabled unless your language is a C-derivative. However
2-
# `language: C` unconditionally sets `CC=compiler`. If we just set it in our
3-
# `env` it will be overwritten by the default (gcc 4.6).
1+
# 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.
44
language: c
5-
compiler: /usr/bin/gcc-4.7
6-
cache: ccache
75
sudo: false
86

97
# The test suite is in general way too stressful for travis, especially in
108
# terms of time limit and reliability. In the past we've tried to scale things
119
# back to only build the stage1 compiler and run a subset of tests, but this
1210
# didn't end up panning out very well.
1311
#
14-
# As a result, we're just using travis to run `make tidy` and *only* build
15-
# stage1 but *not* test it for now (a strict subset of the bootstrap). This will
16-
# catch "obvious" errors like style or not even compiling.
17-
#
18-
# We need gcc4.7 or higher to build LLVM, and travis (well, Ubuntu 12.04)
19-
# currently ships with 4.6. Gotta download our own.
12+
# As a result, we're just using travis to run `make tidy` now. It'll help
13+
# everyone find out about their trailing spaces early on!
2014
before_script:
21-
- ./configure --enable-ccache
15+
- ./configure --llvm-root=path/to/nowhere
2216
script:
2317
- make tidy
24-
- make rustc-stage1 -j4
25-
26-
env:
27-
- CXX=/usr/bin/g++-4.7
28-
29-
addons:
30-
apt:
31-
sources:
32-
- ubuntu-toolchain-r-test
33-
packages:
34-
- gcc-4.7
35-
- g++-4.7
3618

3719
# Real testing happens on http://buildbot.rust-lang.org/
3820
#

branches/stable/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ Documentation improvements are very welcome. The source of `doc.rust-lang.org`
133133
is located in `src/doc` in the tree, and standard API documentation is generated
134134
from the source code itself.
135135

136-
Documentation pull requests function in the same way as other pull requests,
137-
though you may see a slightly different form of `r+`:
136+
Documentation pull requests function in the same as other pull requests, though
137+
you may see a slightly different form of `r+`:
138138

139139
@bors: r+ 38fe8d2 rollup
140140

branches/stable/RELEASES.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ Breaking Changes
2828
in, and the same value reported by clang's
2929
`alignof`. [`mem::min_align_of`] is deprecated. This is not known to
3030
break real code.
31-
* [The `#[packed]` attribute is no longer silently accepted by the
32-
compiler][packed]. This attribute did nothing and code that
33-
mentioned it likely did not work as intended.
3431

3532
Language
3633
--------
@@ -143,7 +140,7 @@ Misc
143140
[fat]: https://github.com/rust-lang/rust/pull/26411
144141
[dst]: https://github.com/rust-lang/rfcs/blob/master/text/0982-dst-coercion.md
145142
[parcodegen]: https://github.com/rust-lang/rust/pull/26018
146-
[packed]: https://github.com/rust-lang/rust/pull/25541
143+
147144

148145
Version 1.1.0 (June 2015)
149146
=========================

branches/stable/configure

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,12 +1031,15 @@ fi
10311031

10321032
if [ ! -z "$CFG_ENABLE_CCACHE" ]
10331033
then
1034-
if [ -z "$CFG_CCACHE" ]
1034+
if [ -z "$CC" ]
10351035
then
1036-
err "ccache requested but not found"
1037-
fi
1036+
if [ -z "$CFG_CCACHE" ]
1037+
then
1038+
err "ccache requested but not found"
1039+
fi
10381040

1039-
CFG_CC="ccache $CFG_CC"
1041+
CFG_CC="ccache $CFG_CC"
1042+
fi
10401043
fi
10411044

10421045
if [ -z "$CC" -a -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ]
@@ -1525,26 +1528,11 @@ do
15251528

15261529
(*)
15271530
msg "inferring LLVM_CXX/CC from CXX/CC = $CXX/$CC"
1528-
if [ ! -z "$CFG_ENABLE_CCACHE" ]
1529-
then
1530-
if [ -z "$CFG_CCACHE" ]
1531-
then
1532-
err "ccache requested but not found"
1533-
fi
1534-
1535-
LLVM_CXX_32="ccache $CXX"
1536-
LLVM_CC_32="ccache $CC"
1537-
1538-
LLVM_CXX_64="ccache $CXX"
1539-
LLVM_CC_64="ccache $CC"
1540-
else
1541-
LLVM_CXX_32="$CXX"
1542-
LLVM_CC_32="$CC"
1543-
1544-
LLVM_CXX_64="$CXX"
1545-
LLVM_CC_64="$CC"
1546-
fi
1531+
LLVM_CXX_32="$CXX"
1532+
LLVM_CC_32="$CC"
15471533

1534+
LLVM_CXX_64="$CXX"
1535+
LLVM_CC_64="$CC"
15481536
;;
15491537
esac
15501538

branches/stable/src/doc/reference.md

Lines changed: 51 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -343,10 +343,10 @@ The type of an _unsuffixed_ integer literal is determined by type inference:
343343
* If an integer type can be _uniquely_ determined from the surrounding
344344
program context, the unsuffixed integer literal has that type.
345345

346-
* If the program context under-constrains the type, it defaults to the
346+
* If the program context underconstrains the type, it defaults to the
347347
signed 32-bit integer `i32`.
348348

349-
* If the program context over-constrains the type, it is considered a
349+
* If the program context overconstrains the type, it is considered a
350350
static type error.
351351

352352
Examples of integer literals of various forms:
@@ -382,9 +382,9 @@ type inference:
382382
surrounding program context, the unsuffixed floating-point literal
383383
has that type.
384384

385-
* If the program context under-constrains the type, it defaults to `f64`.
385+
* If the program context underconstrains the type, it defaults to `f64`.
386386

387-
* If the program context over-constrains the type, it is considered a
387+
* If the program context overconstrains the type, it is considered a
388388
static type error.
389389

390390
Examples of floating-point literals of various forms:
@@ -1292,7 +1292,7 @@ All access to a static is safe, but there are a number of restrictions on
12921292
statics:
12931293

12941294
* Statics may not contain any destructors.
1295-
* The types of static values must ascribe to `Sync` to allow thread-safe access.
1295+
* The types of static values must ascribe to `Sync` to allow threadsafe access.
12961296
* Statics may not refer to other statics by value, only by reference.
12971297
* Constants cannot refer to statics.
12981298

@@ -1694,7 +1694,7 @@ explain, here's a few use cases and what they would entail:
16941694
* A crate needs a global available "helper module" to itself, but it doesn't
16951695
want to expose the helper module as a public API. To accomplish this, the
16961696
root of the crate's hierarchy would have a private module which then
1697-
internally has a "public API". Because the entire crate is a descendant of
1697+
internally has a "public api". Because the entire crate is a descendant of
16981698
the root, then the entire local crate can access this private module through
16991699
the second case.
17001700

@@ -1957,6 +1957,8 @@ macro scope.
19571957
object file that this item's contents will be placed into.
19581958
- `no_mangle` - on any item, do not apply the standard name mangling. Set the
19591959
symbol for this item to its identifier.
1960+
- `packed` - on structs or enums, eliminate any padding that would be used to
1961+
align fields.
19601962
- `simd` - on certain tuple structs, derive the arithmetic operators, which
19611963
lower to the target's SIMD instructions, if any; the `simd` feature gate
19621964
is necessary to use this attribute.
@@ -3661,71 +3663,47 @@ sites are:
36613663

36623664
* `let` statements where an explicit type is given.
36633665

3664-
For example, `128` is coerced to have type `i8` in the following:
3665-
3666-
```rust
3667-
let _: i8 = 128;
3668-
```
3666+
In `let _: U = e;`, `e` is coerced to have type `U`.
36693667

36703668
* `static` and `const` statements (similar to `let` statements).
36713669

3672-
* Arguments for function calls
3673-
3674-
The value being coerced is the actual parameter, and it is coerced to
3675-
the type of the formal parameter.
3676-
3677-
For example, `128` is coerced to have type `i8` in the following:
3678-
3679-
```rust
3680-
fn bar(_: i8) { }
3670+
* arguments for function calls.
36813671

3682-
fn main() {
3683-
bar(128);
3684-
}
3685-
```
3672+
The value being coerced is the
3673+
actual parameter and it is coerced to the type of the formal parameter. For
3674+
example, let `foo` be defined as `fn foo(x: U) { ... }` and call it as
3675+
`foo(e);`. Then `e` is coerced to have type `U`;
36863676

3687-
* Instantiations of struct or variant fields
3677+
* instantiations of struct or variant fields.
36883678

3689-
For example, `128` is coerced to have type `i8` in the following:
3679+
Assume we have a `struct
3680+
Foo { x: U }` and instantiate it as `Foo { x: e }`. Then `e` is coerced to
3681+
have type `U`.
36903682

3691-
```rust
3692-
struct Foo { x: i8 }
3683+
* function results (either the final line of a block if it is not semicolon
3684+
terminated or any expression in a `return` statement).
36933685

3694-
fn main() {
3695-
Foo { x: 128 };
3696-
}
3697-
```
3698-
3699-
* Function results, either the final line of a block if it is not
3700-
semicolon-terminated or any expression in a `return` statement
3701-
3702-
For example, `128` is coerced to have type `i8` in the following:
3703-
3704-
```rust
3705-
fn foo() -> i8 {
3706-
128
3707-
}
3708-
```
3686+
In `fn foo() -> U { e }`, `e` is coerced to to have type `U`.
37093687

37103688
If the expression in one of these coercion sites is a coercion-propagating
37113689
expression, then the relevant sub-expressions in that expression are also
37123690
coercion sites. Propagation recurses from these new coercion sites.
37133691
Propagating expressions and their relevant sub-expressions are:
37143692

3715-
* Array literals, where the array has type `[U; n]`. Each sub-expression in
3693+
* array literals, where the array has type `[U; n]`. Each sub-expression in
37163694
the array literal is a coercion site for coercion to type `U`.
37173695

3718-
* Array literals with repeating syntax, where the array has type `[U; n]`. The
3696+
* array literals with repeating syntax, where the array has type `[U; n]`. The
37193697
repeated sub-expression is a coercion site for coercion to type `U`.
37203698

3721-
* Tuples, where a tuple is a coercion site to type `(U_0, U_1, ..., U_n)`.
3699+
* tuples, where a tuple is a coercion site to type `(U_0, U_1, ..., U_n)`.
37223700
Each sub-expression is a coercion site to the respective type, e.g. the
37233701
zeroth sub-expression is a coercion site to type `U_0`.
37243702

3725-
* Parenthesised sub-expressions (`(e)`): if the expression has type `U`, then
3703+
* parenthesised sub-expressions (`(e)`). If the expression has type `U`, then
37263704
the sub-expression is a coercion site to `U`.
37273705

3728-
* Blocks: if a block has type `U`, then the last expression in the block (if
3706+
* blocks. If a block has type `U`, then the last expression in the block (if
37293707
it is not semicolon-terminated) is a coercion site to `U`. This includes
37303708
blocks which are part of control flow statements, such as `if`/`else`, if
37313709
the block has a known type.
@@ -3734,46 +3712,45 @@ the block has a known type.
37343712

37353713
Coercion is allowed between the following types:
37363714

3737-
* `T` to `U` if `T` is a subtype of `U` (*reflexive case*)
3715+
* `T` to `U` if `T` is a subtype of `U` (*reflexive case*).
37383716

37393717
* `T_1` to `T_3` where `T_1` coerces to `T_2` and `T_2` coerces to `T_3`
3740-
(*transitive case*)
3718+
(*transitive case*).
37413719

37423720
Note that this is not fully supported yet
37433721

3744-
* `&mut T` to `&T`
3722+
* `&mut T` to `&T`.
37453723

3746-
* `*mut T` to `*const T`
3724+
* `*mut T` to `*const T`.
37473725

3748-
* `&T` to `*const T`
3726+
* `&T` to `*const T`.
37493727

3750-
* `&mut T` to `*mut T`
3728+
* `&mut T` to `*mut T`.
37513729

37523730
* `&T` to `&U` if `T` implements `Deref<Target = U>`. For example:
37533731

3754-
```rust
3755-
use std::ops::Deref;
3756-
3757-
struct CharContainer {
3758-
value: char
3759-
}
3732+
```rust
3733+
use std::ops::Deref;
37603734

3761-
impl Deref for CharContainer {
3762-
type Target = char;
3735+
struct CharContainer {
3736+
value: char
3737+
}
37633738

3764-
fn deref<'a>(&'a self) -> &'a char {
3765-
&self.value
3766-
}
3767-
}
3739+
impl Deref for CharContainer {
3740+
type Target = char;
37683741

3769-
fn foo(arg: &char) {}
3742+
fn deref<'a>(&'a self) -> &'a char {
3743+
&self.value
3744+
}
3745+
}
37703746

3771-
fn main() {
3772-
let x = &mut CharContainer { value: 'y' };
3773-
foo(x); //&mut CharContainer is coerced to &char.
3774-
}
3775-
```
3747+
fn foo(arg: &char) {}
37763748

3749+
fn main() {
3750+
let x = &mut CharContainer { value: 'y' };
3751+
foo(x); //&mut CharContainer is coerced to &char.
3752+
}
3753+
```
37773754
* `&mut T` to `&mut U` if `T` implements `DerefMut<Target = U>`.
37783755

37793756
* TyCtor(`T`) to TyCtor(coerce_inner(`T`)), where TyCtor(`T`) is one of
@@ -3987,7 +3964,7 @@ In general, `--crate-type=bin` or `--crate-type=lib` should be sufficient for
39873964
all compilation needs, and the other options are just available if more
39883965
fine-grained control is desired over the output format of a Rust crate.
39893966

3990-
# Appendix: Rationales and design trade-offs
3967+
# Appendix: Rationales and design tradeoffs
39913968

39923969
*TODO*.
39933970

@@ -3997,7 +3974,7 @@ Rust is not a particularly original language, with design elements coming from
39973974
a wide range of sources. Some of these are listed below (including elements
39983975
that have since been removed):
39993976

4000-
* SML, OCaml: algebraic data types, pattern matching, type inference,
3977+
* SML, OCaml: algebraic datatypes, pattern matching, type inference,
40013978
semicolon statement separation
40023979
* C++: references, RAII, smart pointers, move semantics, monomorphisation,
40033980
memory model

branches/stable/src/doc/trpl/error-handling.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ is very wrong. Wrong enough that we can't continue with things in the current
5050
state. Another example is using the `unreachable!()` macro:
5151

5252
```rust,ignore
53-
use Event::NewRelease;
54-
5553
enum Event {
5654
NewRelease,
5755
}
@@ -73,7 +71,7 @@ fn descriptive_probability(event: Event) -> &'static str {
7371
}
7472
7573
fn main() {
76-
println!("{}", descriptive_probability(NewRelease));
74+
std::io::println(descriptive_probability(NewRelease));
7775
}
7876
```
7977

0 commit comments

Comments
 (0)