Skip to content

Commit 30e5a80

Browse files
committed
---
yaml --- r: 235478 b: refs/heads/stable c: 77d5fca h: refs/heads/master v: v3
1 parent 6be62bb commit 30e5a80

38 files changed

+1591
-694
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: 49d3a93c52e65b5b37370390dd352471c21dbaf7
32+
refs/heads/stable: 77d5fca3effd71b2270d7bd00a758fd8522c0d4b
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/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: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,15 +1031,12 @@ fi
10311031

10321032
if [ ! -z "$CFG_ENABLE_CCACHE" ]
10331033
then
1034-
if [ -z "$CC" ]
1034+
if [ -z "$CFG_CCACHE" ]
10351035
then
1036-
if [ -z "$CFG_CCACHE" ]
1037-
then
1038-
err "ccache requested but not found"
1039-
fi
1040-
1041-
CFG_CC="ccache $CFG_CC"
1036+
err "ccache requested but not found"
10421037
fi
1038+
1039+
CFG_CC="ccache $CFG_CC"
10431040
fi
10441041

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

15291526
(*)
15301527
msg "inferring LLVM_CXX/CC from CXX/CC = $CXX/$CC"
1531-
LLVM_CXX_32="$CXX"
1532-
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
15331547

1534-
LLVM_CXX_64="$CXX"
1535-
LLVM_CC_64="$CC"
15361548
;;
15371549
esac
15381550

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/librustc/diagnostics.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -972,16 +972,16 @@ Updates to the borrow checker in a future version of Rust may remove this
972972
restriction, but for now patterns must be rewritten without sub-bindings.
973973
974974
```
975-
// Code like this...
976-
match Some(5) {
977-
ref op_num @ Some(num) => ...
975+
// Before.
976+
match Some("hi".to_string()) {
977+
ref op_string_ref @ Some(ref s) => ...
978978
None => ...
979979
}
980980
981981
// After.
982982
match Some("hi".to_string()) {
983983
Some(ref s) => {
984-
let op_string_ref = &Some(&s);
984+
let op_string_ref = &Some(s);
985985
...
986986
}
987987
None => ...

branches/stable/src/librustc_borrowck/borrowck/mod.rs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -705,8 +705,19 @@ impl<'a, 'tcx> BorrowckCtxt<'a, 'tcx> {
705705
ol,
706706
moved_lp_msg,
707707
pat_ty));
708-
self.tcx.sess.fileline_help(span,
709-
"use `ref` to override");
708+
match self.tcx.sess.codemap().span_to_snippet(span) {
709+
Ok(string) => {
710+
self.tcx.sess.span_suggestion(
711+
span,
712+
&format!("if you would like to borrow the value instead, \
713+
use a `ref` binding as shown:"),
714+
format!("ref {}", string));
715+
},
716+
Err(_) => {
717+
self.tcx.sess.fileline_help(span,
718+
"use `ref` to override");
719+
},
720+
}
710721
}
711722

712723
move_data::Captured => {

branches/stable/src/librustc_resolve/build_reduced_graph.rs

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ use ParentLink::{self, ModuleParentLink, BlockParentLink};
2626
use Resolver;
2727
use resolve_imports::Shadowable;
2828
use TypeNsDef;
29+
use {resolve_error, ResolutionError};
2930

3031
use self::DuplicateCheckingMode::*;
3132
use self::NamespaceError::*;
@@ -208,10 +209,13 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
208209
// Return an error here by looking up the namespace that
209210
// had the duplicate.
210211
let ns = ns.unwrap();
211-
self.resolve_error(sp,
212-
&format!("duplicate definition of {} `{}`",
213-
namespace_error_to_string(duplicate_type),
214-
token::get_name(name)));
212+
resolve_error(
213+
self,
214+
sp,
215+
ResolutionError::DuplicateDefinition(
216+
namespace_error_to_string(duplicate_type),
217+
name)
218+
);
215219
{
216220
let r = child.span_for_namespace(ns);
217221
if let Some(sp) = r {
@@ -304,8 +308,10 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
304308
full_path.segments.last().unwrap().identifier.name;
305309
if &token::get_name(source_name)[..] == "mod" ||
306310
&token::get_name(source_name)[..] == "self" {
307-
self.resolve_error(view_path.span,
308-
"`self` imports are only allowed within a { } list");
311+
resolve_error(self,
312+
view_path.span,
313+
ResolutionError::SelfImportsOnlyAllowedWithin
314+
);
309315
}
310316

311317
let subclass = SingleImport(binding.name,
@@ -325,8 +331,11 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
325331
_ => None
326332
}).collect::<Vec<Span>>();
327333
if mod_spans.len() > 1 {
328-
self.resolve_error(mod_spans[0],
329-
"`self` import can only appear once in the list");
334+
resolve_error(
335+
self,
336+
mod_spans[0],
337+
ResolutionError::SelfImportCanOnlyAppearOnceInTheList
338+
);
330339
for other_span in mod_spans.iter().skip(1) {
331340
self.session.span_note(*other_span,
332341
"another `self` import appears here");
@@ -341,9 +350,12 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
341350
let name = match module_path.last() {
342351
Some(name) => *name,
343352
None => {
344-
self.resolve_error(source_item.span,
345-
"`self` import can only appear in an import list \
346-
with a non-empty prefix");
353+
resolve_error(
354+
self,
355+
source_item.span,
356+
ResolutionError::
357+
SelfImportOnlyInImportListWithNonEmptyPrefix
358+
);
347359
continue;
348360
}
349361
};

branches/stable/src/librustc_resolve/diagnostics.rs

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,52 @@ http://doc.rust-lang.org/reference.html#types
202202
}
203203

204204
register_diagnostics! {
205-
E0157,
206-
E0153,
205+
E0153, // called no where
206+
E0157, // called from no where
207207
E0253, // not directly importable
208208
E0254, // import conflicts with imported crate in this module
209209
E0257,
210210
E0258,
211211
E0364, // item is private
212-
E0365 // item is private
212+
E0365, // item is private
213+
E0401, // can't use type parameters from outer function
214+
E0402, // cannot use an outer type parameter in this context
215+
E0403, // the name `{}` is already used
216+
E0404, // is not a trait
217+
E0405, // use of undeclared trait name
218+
E0406, // undeclared associated type
219+
E0407, // method is not a member of trait
220+
E0408, // variable from pattern #1 is not bound in pattern #
221+
E0409, // variable is bound with different mode in pattern # than in
222+
// pattern #1
223+
E0410, // variable from pattern is not bound in pattern 1
224+
E0411, // use of `Self` outside of an impl or trait
225+
E0412, // use of undeclared
226+
E0413, // declaration of shadows an enum variant or unit-like struct in
227+
// scope
228+
E0414, // only irrefutable patterns allowed here
229+
E0415, // identifier is bound more than once in this parameter list
230+
E0416, // identifier is bound more than once in the same pattern
231+
E0417, // static variables cannot be referenced in a pattern, use a
232+
// `const` instead
233+
E0418, // is not an enum variant, struct or const
234+
E0419, // unresolved enum variant, struct or const
235+
E0420, // is not an associated const
236+
E0421, // unresolved associated const
237+
E0422, // does not name a structure
238+
E0423, // is a struct variant name, but this expression uses it like a
239+
// function name
240+
E0424, // `self` is not available in a static method.
241+
E0425, // unresolved name
242+
E0426, // use of undeclared label
243+
E0427, // cannot use `ref` binding mode with ...
244+
E0428, // duplicate definition of ...
245+
E0429, // `self` imports are only allowed within a { } list
246+
E0430, // `self` import can only appear once in the list
247+
E0431, // `self` import can only appear in an import list with a non-empty
248+
// prefix
249+
E0432, // unresolved import
250+
E0433, // failed to resolve
251+
E0434, // can't capture dynamic environment in a fn item
252+
E0435 // attempt to use a non-constant value in a constant
213253
}

0 commit comments

Comments
 (0)