Skip to content

Commit 41643b6

Browse files
committed
---
yaml --- r: 235470 b: refs/heads/stable c: 31d6716 h: refs/heads/master v: v3
1 parent 0ebf9bc commit 41643b6

File tree

45 files changed

+1778
-734
lines changed

Some content is hidden

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

45 files changed

+1778
-734
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: 7954096bc8b0519164f20a3b8178efb221fb86b0
32+
refs/heads/stable: 31d6716d9c537ea6927824800a3aa6e8c90e1713
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: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,38 @@
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.
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).
44
language: c
5+
compiler: /usr/bin/gcc-4.7
6+
cache: ccache
57
sudo: false
68

79
# The test suite is in general way too stressful for travis, especially in
810
# terms of time limit and reliability. In the past we've tried to scale things
911
# back to only build the stage1 compiler and run a subset of tests, but this
1012
# didn't end up panning out very well.
1113
#
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!
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.
1420
before_script:
15-
- ./configure --llvm-root=path/to/nowhere
21+
- ./configure --enable-ccache
1622
script:
1723
- 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
1836

1937
# Real testing happens on http://buildbot.rust-lang.org/
2038
#

branches/stable/AUTHORS.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,7 @@ Santiago Rodriguez <[email protected]>
958958
Saurabh Anand <[email protected]>
959959
Scott Jenkins <[email protected]>
960960
Scott Lawrence <[email protected]>
961-
Scott Olson <scott@scott-olson.org>
961+
Scott Olson <scott@solson.me>
962962
Sean Bowe <[email protected]>
963963
Sean Chalmers <[email protected]>
964964
Sean Collins <[email protected]>

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

139139
@bors: r+ 38fe8d2 rollup
140140

branches/stable/RELEASES.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ 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.
3134

3235
Language
3336
--------
@@ -140,7 +143,7 @@ Misc
140143
[fat]: https://github.com/rust-lang/rust/pull/26411
141144
[dst]: https://github.com/rust-lang/rfcs/blob/master/text/0982-dst-coercion.md
142145
[parcodegen]: https://github.com/rust-lang/rust/pull/26018
143-
146+
[packed]: https://github.com/rust-lang/rust/pull/25541
144147

145148
Version 1.1.0 (June 2015)
146149
=========================

branches/stable/configure

Lines changed: 61 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -988,43 +988,55 @@ if [ ! -z "$CFG_ENABLE_CLANG" ]
988988
then
989989
case "$CC" in
990990
(''|*clang)
991-
CFG_CLANG_VERSION=$($CFG_CC \
992-
--version \
993-
| grep version \
994-
| sed 's/.*\(version .*\)/\1/; s/.*based on \(LLVM .*\))/\1/' \
995-
| cut -d ' ' -f 2)
996-
997-
case $CFG_CLANG_VERSION in
998-
(3.2* | 3.3* | 3.4* | 3.5* | 3.6* | 3.7*)
999-
step_msg "found ok version of CLANG: $CFG_CLANG_VERSION"
1000-
if [ -z "$CC" ]
1001-
then
1002-
CFG_CC="clang"
1003-
CFG_CXX="clang++"
1004-
fi
1005-
;;
1006-
(*)
1007-
err "bad CLANG version: $CFG_CLANG_VERSION, need >=3.0svn"
1008-
;;
1009-
esac
1010-
;;
1011-
(*)
1012-
msg "skipping CFG_ENABLE_CLANG version check; provided CC=$CC"
1013-
;;
991+
CFG_CLANG_REPORTED_VERSION=$($CFG_CC --version | grep version)
992+
993+
if [[ $CFG_CLANG_REPORTED_VERSION == *"(based on LLVM "* ]]
994+
then
995+
CFG_CLANG_VERSION=$(echo $CFG_CLANG_REPORTED_VERSION | sed 's/.*(based on LLVM \(.*\))/\1/')
996+
elif [[ $CFG_CLANG_REPORTED_VERSION == "Apple LLVM"* ]]
997+
then
998+
CFG_OSX_CLANG_VERSION=$(echo $CFG_CLANG_REPORTED_VERSION | sed 's/.*version \(.*\) .*/\1/')
999+
else
1000+
CFG_CLANG_VERSION=$(echo $CFG_CLANG_REPORTED_VERSION | sed 's/.*version \(.*\) .*/\1/')
1001+
fi
1002+
1003+
if [ ! -z "$CFG_OSX_CLANG_VERSION" ]
1004+
then
1005+
case $CFG_OSX_CLANG_VERSION in
1006+
(7.0*)
1007+
step_msg "found ok version of APPLE CLANG: $CFG_OSX_CLANG_VERSION"
1008+
;;
1009+
(*)
1010+
err "bad APPLE CLANG version: $CFG_OSX_CLANG_VERSION, need >=7.0"
1011+
;;
1012+
esac
1013+
else
1014+
case $CFG_CLANG_VERSION in
1015+
(3.2* | 3.3* | 3.4* | 3.5* | 3.6* | 3.7*)
1016+
step_msg "found ok version of CLANG: $CFG_CLANG_VERSION"
1017+
;;
1018+
(*)
1019+
err "bad CLANG version: $CFG_CLANG_VERSION, need >=3.0svn"
1020+
;;
1021+
esac
1022+
fi
1023+
1024+
if [ -z "$CC" ]
1025+
then
1026+
CFG_CC="clang"
1027+
CFG_CXX="clang++"
1028+
fi
10141029
esac
10151030
fi
10161031

10171032
if [ ! -z "$CFG_ENABLE_CCACHE" ]
10181033
then
1019-
if [ -z "$CC" ]
1034+
if [ -z "$CFG_CCACHE" ]
10201035
then
1021-
if [ -z "$CFG_CCACHE" ]
1022-
then
1023-
err "ccache requested but not found"
1024-
fi
1025-
1026-
CFG_CC="ccache $CFG_CC"
1036+
err "ccache requested but not found"
10271037
fi
1038+
1039+
CFG_CC="ccache $CFG_CC"
10281040
fi
10291041

10301042
if [ -z "$CC" -a -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ]
@@ -1513,11 +1525,26 @@ do
15131525

15141526
(*)
15151527
msg "inferring LLVM_CXX/CC from CXX/CC = $CXX/$CC"
1516-
LLVM_CXX_32="$CXX"
1517-
LLVM_CC_32="$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
15181547

1519-
LLVM_CXX_64="$CXX"
1520-
LLVM_CC_64="$CC"
15211548
;;
15221549
esac
15231550

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ 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+
5355
enum Event {
5456
NewRelease,
5557
}
@@ -71,7 +73,7 @@ fn descriptive_probability(event: Event) -> &'static str {
7173
}
7274
7375
fn main() {
74-
std::io::println(descriptive_probability(NewRelease));
76+
println!("{}", descriptive_probability(NewRelease));
7577
}
7678
```
7779

branches/stable/src/doc/trpl/inline-assembly.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ fn main() {
103103
If you would like to use real operands in this position, however,
104104
you are required to put curly braces `{}` around the register that
105105
you want, and you are required to put the specific size of the
106-
operand. This is useful for very low level programming, where
106+
operand. This is useful for very low level programming, where
107107
which register you use is important:
108108

109109
```rust
@@ -166,3 +166,12 @@ unsafe {
166166
println!("eax is currently {}", result);
167167
# }
168168
```
169+
170+
## More Information
171+
172+
The current implementation of the `asm!` macro is a direct binding to [LLVM's
173+
inline assembler expressions][llvm-docs], so be sure to check out [their
174+
documentation as well][llvm-docs] for more information about clobbers,
175+
constraints, etc.
176+
177+
[llvm-docs]: http://llvm.org/docs/LangRef.html#inline-assembler-expressions

branches/stable/src/doc/trpl/ownership.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ With that in mind, let’s learn about ownership.
4242
# Ownership
4343

4444
[Variable bindings][bindings] have a property in Rust: they ‘have ownership’
45-
of what they’re bound to. This means that when a binding goes out of scope, the
46-
resource that they’re bound to are freed. For example:
45+
of what they’re bound to. This means that when a binding goes out of scope,
46+
Rust will free the bound resources. For example:
4747

4848
```rust
4949
fn foo() {

branches/stable/src/doc/trpl/the-stack-and-the-heap.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ After `bar()` is over, its frame is deallocated, leaving just `foo()` and
176176
| 1 | a | 5 |
177177
| 0 | x | 42 |
178178

179-
And then `foo()` ends, leaving just `main()`
179+
And then `foo()` ends, leaving just `main()`:
180180

181181
| Address | Name | Value |
182182
|---------|------|-------|
@@ -537,7 +537,7 @@ Generally, you should prefer stack allocation, and so, Rust stack-allocates by
537537
default. The LIFO model of the stack is simpler, at a fundamental level. This
538538
has two big impacts: runtime efficiency and semantic impact.
539539

540-
## Runtime Efficiency.
540+
## Runtime Efficiency
541541

542542
Managing the memory for the stack is trivial: The machine just
543543
increments or decrements a single value, the so-called “stack pointer”.

branches/stable/src/etc/errorck.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,18 @@
2323
errcode_map = {}
2424
error_re = re.compile("(E\d\d\d\d)")
2525

26+
# In the register_long_diagnostics! macro, entries look like this:
27+
#
28+
# EXXXX: r##"
29+
# <Long diagnostic message>
30+
# "##,
31+
#
32+
# These two variables are for detecting the beginning and end of diagnostic
33+
# messages so that duplicate error codes are not reported when a code occurs
34+
# inside a diagnostic message
35+
long_diag_begin = "r##\""
36+
long_diag_end = "\"##"
37+
2638
for (dirpath, dirnames, filenames) in os.walk(src_dir):
2739
if "src/test" in dirpath or "src/llvm" in dirpath:
2840
# Short circuit for fast
@@ -35,7 +47,14 @@
3547
path = os.path.join(dirpath, filename)
3648

3749
with open(path, 'r') as f:
50+
inside_long_diag = False
3851
for line_num, line in enumerate(f, start=1):
52+
if inside_long_diag:
53+
# Skip duplicate error code checking for this line
54+
if long_diag_end in line:
55+
inside_long_diag = False
56+
continue
57+
3958
match = error_re.search(line)
4059
if match:
4160
errcode = match.group(1)
@@ -47,6 +66,9 @@
4766
else:
4867
errcode_map[errcode] = new_record
4968

69+
if long_diag_begin in line:
70+
inside_long_diag = True
71+
5072
errors = False
5173
all_errors = []
5274

branches/stable/src/libcollections/str.rs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,14 @@ impl str {
550550
core_str::StrExt::slice_unchecked(self, begin, end)
551551
}
552552

553+
/// Takes a bytewise mutable slice from a string.
554+
///
555+
/// Same as `slice_unchecked`, but works with `&mut str` instead of `&str`.
556+
#[unstable(feature = "str_slice_mut", reason = "recently added")]
557+
pub unsafe fn slice_mut_unchecked(&mut self, begin: usize, end: usize) -> &mut str {
558+
core_str::StrExt::slice_mut_unchecked(self, begin, end)
559+
}
560+
553561
/// Returns a slice of the string from the character range [`begin`..`end`).
554562
///
555563
/// That is, start at the `begin`-th code point of the string and continue
@@ -776,7 +784,7 @@ impl str {
776784
///
777785
/// # Examples
778786
/// ```
779-
/// # #![feature(collections)]
787+
/// # #![feature(str_split_at)]
780788
/// let s = "Löwe 老虎 Léopard";
781789
/// let first_space = s.find(' ').unwrap_or(s.len());
782790
/// let (a, b) = s.split_at(first_space);
@@ -785,10 +793,18 @@ impl str {
785793
/// assert_eq!(b, " 老虎 Léopard");
786794
/// ```
787795
#[inline]
796+
#[unstable(feature = "str_split_at", reason = "recently added")]
788797
pub fn split_at(&self, mid: usize) -> (&str, &str) {
789798
core_str::StrExt::split_at(self, mid)
790799
}
791800

801+
/// Divide one mutable string slice into two at an index.
802+
#[inline]
803+
#[unstable(feature = "str_split_at", reason = "recently added")]
804+
pub fn split_at_mut(&mut self, mid: usize) -> (&mut str, &mut str) {
805+
core_str::StrExt::split_at_mut(self, mid)
806+
}
807+
792808
/// An iterator over the codepoints of `self`.
793809
///
794810
/// # Examples

0 commit comments

Comments
 (0)