Skip to content

Commit abd2b9a

Browse files
committed
---
yaml --- r: 274915 b: refs/heads/stable c: 58eed92 h: refs/heads/master i: 274913: 785bf13 274911: adf895e
1 parent 80eee7a commit abd2b9a

Some content is hidden

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

89 files changed

+2520
-695
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: c0221c8897db309a79990367476177b1230bb264
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 14e8af410023a7de0ac46249f01288297c88388b
32+
refs/heads/stable: 58eed9266a63456016602092f9dc37d8869bfd94
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
*.elc
1818
*.epub
1919
*.exe
20+
*.pdb
2021
*.fn
2122
*.html
2223
*.kdev4
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# i586-unknown-linux-gnu configuration
2+
CC_i586-unknown-linux-gnu=$(CC)
3+
CXX_i586-unknown-linux-gnu=$(CXX)
4+
CPP_i586-unknown-linux-gnu=$(CPP)
5+
AR_i586-unknown-linux-gnu=$(AR)
6+
CFG_LIB_NAME_i586-unknown-linux-gnu=lib$(1).so
7+
CFG_STATIC_LIB_NAME_i586-unknown-linux-gnu=lib$(1).a
8+
CFG_LIB_GLOB_i586-unknown-linux-gnu=lib$(1)-*.so
9+
CFG_LIB_DSYM_GLOB_i586-unknown-linux-gnu=lib$(1)-*.dylib.dSYM
10+
CFG_JEMALLOC_CFLAGS_i586-unknown-linux-gnu := -m32 $(CFLAGS)
11+
CFG_GCCISH_CFLAGS_i586-unknown-linux-gnu := -Wall -Werror -g -fPIC -m32 $(CFLAGS)
12+
CFG_GCCISH_CXXFLAGS_i586-unknown-linux-gnu := -fno-rtti $(CXXFLAGS)
13+
CFG_GCCISH_LINK_FLAGS_i586-unknown-linux-gnu := -shared -fPIC -ldl -pthread -lrt -g -m32
14+
CFG_GCCISH_DEF_FLAG_i586-unknown-linux-gnu := -Wl,--export-dynamic,--dynamic-list=
15+
CFG_LLC_FLAGS_i586-unknown-linux-gnu :=
16+
CFG_INSTALL_NAME_i586-unknown-linux-gnu =
17+
CFG_EXE_SUFFIX_i586-unknown-linux-gnu =
18+
CFG_WINDOWSY_i586-unknown-linux-gnu :=
19+
CFG_UNIXY_i586-unknown-linux-gnu := 1
20+
CFG_LDPATH_i586-unknown-linux-gnu :=
21+
CFG_RUN_i586-unknown-linux-gnu=$(2)
22+
CFG_RUN_TARG_i586-unknown-linux-gnu=$(call CFG_RUN_i586-unknown-linux-gnu,,$(2))
23+
CFG_GNU_TRIPLE_i586-unknown-linux-gnu := i586-unknown-linux-gnu

branches/stable/mk/tests.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,8 @@ $(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok: \
10711071
$$(S) \
10721072
$(3) \
10731073
"$$(LLVM_LIBDIR_RUSTFLAGS_$(3))" \
1074-
"$$(LLVM_ALL_COMPONENTS_$(3))"
1074+
"$$(LLVM_ALL_COMPONENTS_$(3))" \
1075+
"$$(LLVM_CXXFLAGS_$(3))"
10751076
@touch -r $$@.start_time $$@ && rm $$@.start_time
10761077
else
10771078
# FIXME #11094 - The above rule doesn't work right for multiple targets

branches/stable/src/doc/book/concurrency.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,8 @@ use std::sync::mpsc;
286286
fn main() {
287287
let data = Arc::new(Mutex::new(0));
288288

289+
// `tx` is the "transmitter" or "sender"
290+
// `rx` is the "receiver"
289291
let (tx, rx) = mpsc::channel();
290292

291293
for _ in 0..10 {

branches/stable/src/doc/book/documentation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,23 +319,23 @@ our source code:
319319
```text
320320
First, we set `x` to five:
321321
322-
```text
322+
```rust
323323
let x = 5;
324324
# let y = 6;
325325
# println!("{}", x + y);
326326
```
327327
328328
Next, we set `y` to six:
329329
330-
```text
330+
```rust
331331
# let x = 5;
332332
let y = 6;
333333
# println!("{}", x + y);
334334
```
335335
336336
Finally, we print the sum of `x` and `y`:
337337
338-
```text
338+
```rust
339339
# let x = 5;
340340
# let y = 6;
341341
println!("{}", x + y);

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,11 @@ fn foo() {
5151
}
5252
```
5353

54-
When `v` comes into scope, a new [vector] is created, and it allocates space on
55-
[the heap][heap] for each of its elements. When `v` goes out of scope at the
56-
end of `foo()`, Rust will clean up everything related to the vector, even the
57-
heap-allocated memory. This happens deterministically, at the end of the scope.
54+
When `v` comes into scope, a new [vector] is created on [the stack][stack],
55+
and it allocates space on [the heap][heap] for its elements. When `v` goes out
56+
of scope at the end of `foo()`, Rust will clean up everything related to the
57+
vector, even the heap-allocated memory. This happens deterministically, at the
58+
end of the scope.
5859

5960
We'll cover [vectors] in detail later in this chapter; we only use them
6061
here as an example of a type that allocates space on the heap at runtime. They
@@ -67,6 +68,7 @@ Vectors have a [generic type][generics] `Vec<T>`, so in this example `v` will ha
6768
[arrays]: primitive-types.html#arrays
6869
[vectors]: vectors.html
6970
[heap]: the-stack-and-the-heap.html
71+
[stack]: the-stack-and-the-heap.html#the-stack
7072
[bindings]: variable-bindings.html
7173
[generics]: generics.html
7274

branches/stable/src/doc/book/using-rust-without-the-standard-library.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ don’t want to use the standard library via an attribute: `#![no_std]`.
1111
> For details on binaries without the standard library, see [the nightly
1212
> chapter on `#![no_std]`](no-stdlib.html)
1313
14-
To use `#![no_std]`, add a it to your crate root:
14+
To use `#![no_std]`, add it to your crate root:
1515

1616
```rust
1717
#![no_std]

branches/stable/src/doc/uptack.tex

Lines changed: 0 additions & 2 deletions
This file was deleted.

branches/stable/src/etc/maketest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def convert_path_spec(name, value):
4646
putenv('RUSTC', os.path.abspath(sys.argv[3]))
4747
putenv('TMPDIR', os.path.abspath(sys.argv[4]))
4848
putenv('CC', sys.argv[5] + ' ' + sys.argv[6])
49+
putenv('CFLAGS', sys.argv[6])
4950
putenv('RUSTDOC', os.path.abspath(sys.argv[7]))
5051
filt = sys.argv[8]
5152
putenv('LD_LIB_PATH_ENVVAR', sys.argv[9])
@@ -55,6 +56,7 @@ def convert_path_spec(name, value):
5556
putenv('S', os.path.abspath(sys.argv[13]))
5657
putenv('RUSTFLAGS', sys.argv[15])
5758
putenv('LLVM_COMPONENTS', sys.argv[16])
59+
putenv('LLVM_CXXFLAGS', sys.argv[17])
5860
putenv('PYTHON', sys.executable)
5961
os.putenv('TARGET', target_triple)
6062

branches/stable/src/libcollections/vec.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ impl<T> Vec<T> {
528528
}
529529

530530
/// Inserts an element at position `index` within the vector, shifting all
531-
/// elements after position `i` one position to the right.
531+
/// elements after it to the right.
532532
///
533533
/// # Panics
534534
///
@@ -570,7 +570,7 @@ impl<T> Vec<T> {
570570
}
571571

572572
/// Removes and returns the element at position `index` within the vector,
573-
/// shifting all elements after position `index` one position to the left.
573+
/// shifting all elements after it to the left.
574574
///
575575
/// # Panics
576576
///

branches/stable/src/libcore/num/mod.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,13 @@ macro_rules! int_impl {
741741
/// where `mask` removes any high-order bits of `rhs` that
742742
/// would cause the shift to exceed the bitwidth of the type.
743743
///
744+
/// Note that this is *not* the same as a rotate-left; the
745+
/// RHS of a wrapping shift-left is restricted to the range
746+
/// of the type, rather than the bits shifted out of the LHS
747+
/// being returned to the other end. The primitive integer
748+
/// types all implement a `rotate_left` function, which may
749+
/// be what you want instead.
750+
///
744751
/// # Examples
745752
///
746753
/// Basic usage:
@@ -759,6 +766,13 @@ macro_rules! int_impl {
759766
/// where `mask` removes any high-order bits of `rhs` that
760767
/// would cause the shift to exceed the bitwidth of the type.
761768
///
769+
/// Note that this is *not* the same as a rotate-right; the
770+
/// RHS of a wrapping shift-right is restricted to the range
771+
/// of the type, rather than the bits shifted out of the LHS
772+
/// being returned to the other end. The primitive integer
773+
/// types all implement a `rotate_right` function, which may
774+
/// be what you want instead.
775+
///
762776
/// # Examples
763777
///
764778
/// Basic usage:
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
use target::Target;
12+
13+
pub fn target() -> Target {
14+
let mut base = super::linux_base::opts();
15+
base.cpu = "pentium".to_string();
16+
base.pre_link_args.push("-m32".to_string());
17+
18+
Target {
19+
llvm_target: "i586-unknown-linux-gnu".to_string(),
20+
target_endian: "little".to_string(),
21+
target_pointer_width: "32".to_string(),
22+
arch: "x86".to_string(),
23+
target_os: "linux".to_string(),
24+
target_env: "gnu".to_string(),
25+
target_vendor: "unknown".to_string(),
26+
options: base,
27+
}
28+
}

branches/stable/src/librustc_back/target/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ macro_rules! supported_targets {
8989
supported_targets! {
9090
("x86_64-unknown-linux-gnu", x86_64_unknown_linux_gnu),
9191
("i686-unknown-linux-gnu", i686_unknown_linux_gnu),
92+
("i586-unknown-linux-gnu", i586_unknown_linux_gnu),
9293
("mips-unknown-linux-gnu", mips_unknown_linux_gnu),
9394
("mipsel-unknown-linux-gnu", mipsel_unknown_linux_gnu),
9495
("powerpc-unknown-linux-gnu", powerpc_unknown_linux_gnu),

branches/stable/src/librustc_front/lowering.rs

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -913,26 +913,29 @@ pub fn lower_pat(lctx: &LoweringContext, p: &Pat) -> P<hir::Pat> {
913913
P(hir::Pat {
914914
id: p.id,
915915
node: match p.node {
916-
PatWild => hir::PatWild,
917-
PatIdent(ref binding_mode, pth1, ref sub) => {
916+
PatKind::Wild => hir::PatWild,
917+
PatKind::Ident(ref binding_mode, pth1, ref sub) => {
918918
hir::PatIdent(lower_binding_mode(lctx, binding_mode),
919919
respan(pth1.span, lower_ident(lctx, pth1.node)),
920920
sub.as_ref().map(|x| lower_pat(lctx, x)))
921921
}
922-
PatLit(ref e) => hir::PatLit(lower_expr(lctx, e)),
923-
PatEnum(ref pth, ref pats) => {
922+
PatKind::Lit(ref e) => hir::PatLit(lower_expr(lctx, e)),
923+
PatKind::TupleStruct(ref pth, ref pats) => {
924924
hir::PatEnum(lower_path(lctx, pth),
925925
pats.as_ref()
926926
.map(|pats| pats.iter().map(|x| lower_pat(lctx, x)).collect()))
927927
}
928-
PatQPath(ref qself, ref pth) => {
928+
PatKind::Path(ref pth) => {
929+
hir::PatEnum(lower_path(lctx, pth), Some(hir::HirVec::new()))
930+
}
931+
PatKind::QPath(ref qself, ref pth) => {
929932
let qself = hir::QSelf {
930933
ty: lower_ty(lctx, &qself.ty),
931934
position: qself.position,
932935
};
933936
hir::PatQPath(qself, lower_path(lctx, pth))
934937
}
935-
PatStruct(ref pth, ref fields, etc) => {
938+
PatKind::Struct(ref pth, ref fields, etc) => {
936939
let pth = lower_path(lctx, pth);
937940
let fs = fields.iter()
938941
.map(|f| {
@@ -948,20 +951,22 @@ pub fn lower_pat(lctx: &LoweringContext, p: &Pat) -> P<hir::Pat> {
948951
.collect();
949952
hir::PatStruct(pth, fs, etc)
950953
}
951-
PatTup(ref elts) => hir::PatTup(elts.iter().map(|x| lower_pat(lctx, x)).collect()),
952-
PatBox(ref inner) => hir::PatBox(lower_pat(lctx, inner)),
953-
PatRegion(ref inner, mutbl) => {
954+
PatKind::Tup(ref elts) => {
955+
hir::PatTup(elts.iter().map(|x| lower_pat(lctx, x)).collect())
956+
}
957+
PatKind::Box(ref inner) => hir::PatBox(lower_pat(lctx, inner)),
958+
PatKind::Ref(ref inner, mutbl) => {
954959
hir::PatRegion(lower_pat(lctx, inner), lower_mutability(lctx, mutbl))
955960
}
956-
PatRange(ref e1, ref e2) => {
961+
PatKind::Range(ref e1, ref e2) => {
957962
hir::PatRange(lower_expr(lctx, e1), lower_expr(lctx, e2))
958963
}
959-
PatVec(ref before, ref slice, ref after) => {
964+
PatKind::Vec(ref before, ref slice, ref after) => {
960965
hir::PatVec(before.iter().map(|x| lower_pat(lctx, x)).collect(),
961966
slice.as_ref().map(|x| lower_pat(lctx, x)),
962967
after.iter().map(|x| lower_pat(lctx, x)).collect())
963968
}
964-
PatMac(_) => panic!("Shouldn't exist here"),
969+
PatKind::Mac(_) => panic!("Shouldn't exist here"),
965970
},
966971
span: p.span,
967972
})

branches/stable/src/librustc_passes/const_fn.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
1414
use rustc::session::{Session, CompileResult};
1515

16-
use syntax::ast;
16+
use syntax::ast::{self, PatKind};
1717
use syntax::visit::{self, Visitor, FnKind};
1818
use syntax::codemap::Span;
1919

@@ -104,8 +104,8 @@ impl<'a, 'v> Visitor<'v> for CheckConstFn<'a> {
104104
// Ensure the arguments are simple, not mutable/by-ref or patterns.
105105
for arg in &fd.inputs {
106106
match arg.pat.node {
107-
ast::PatWild => {}
108-
ast::PatIdent(ast::BindingMode::ByValue(ast::Mutability::Immutable), _, None) => {}
107+
PatKind::Wild => {}
108+
PatKind::Ident(ast::BindingMode::ByValue(ast::Mutability::Immutable), _, None) => {}
109109
_ => {
110110
span_err!(self.sess, arg.pat.span, E0022,
111111
"arguments of constant functions can only \

branches/stable/src/librustc_trans/save/dump_csv.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ use std::fs::File;
4040
use std::hash::*;
4141
use std::collections::HashSet;
4242

43-
use syntax::ast::{self, NodeId};
43+
use syntax::ast::{self, NodeId, PatKind};
4444
use syntax::codemap::*;
4545
use syntax::parse::token::{self, keywords};
4646
use syntax::visit::{self, Visitor};
@@ -780,7 +780,7 @@ impl <'l, 'tcx> DumpCsvVisitor<'l, 'tcx> {
780780

781781
fn process_pat(&mut self, p: &ast::Pat) {
782782
match p.node {
783-
ast::PatStruct(ref path, ref fields, _) => {
783+
PatKind::Struct(ref path, ref fields, _) => {
784784
visit::walk_path(self, path);
785785
let adt = self.tcx.node_id_to_type(p.id).ty_adt_def().unwrap();
786786
let def = self.tcx.def_map.borrow()[&p.id].full_def();

branches/stable/src/librustc_trans/save/mod.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use rustc_front::{hir, lowering};
2121
use rustc::front::map::NodeItem;
2222
use rustc::session::config::CrateType::CrateTypeExecutable;
2323

24-
use syntax::ast::{self, NodeId};
24+
use syntax::ast::{self, NodeId, PatKind};
2525
use syntax::ast_util;
2626
use syntax::codemap::*;
2727
use syntax::parse::token::{self, keywords};
@@ -758,16 +758,17 @@ impl PathCollector {
758758
impl<'v> Visitor<'v> for PathCollector {
759759
fn visit_pat(&mut self, p: &ast::Pat) {
760760
match p.node {
761-
ast::PatStruct(ref path, _, _) => {
761+
PatKind::Struct(ref path, _, _) => {
762762
self.collected_paths.push((p.id, path.clone(),
763763
ast::Mutability::Mutable, recorder::TypeRef));
764764
}
765-
ast::PatEnum(ref path, _) |
766-
ast::PatQPath(_, ref path) => {
765+
PatKind::TupleStruct(ref path, _) |
766+
PatKind::Path(ref path) |
767+
PatKind::QPath(_, ref path) => {
767768
self.collected_paths.push((p.id, path.clone(),
768769
ast::Mutability::Mutable, recorder::VarRef));
769770
}
770-
ast::PatIdent(bm, ref path1, _) => {
771+
PatKind::Ident(bm, ref path1, _) => {
771772
debug!("PathCollector, visit ident in pat {}: {:?} {:?}",
772773
path1.node,
773774
p.span,

branches/stable/src/librustc_typeck/check/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3828,7 +3828,7 @@ impl<'tcx> Expectation<'tcx> {
38283828
/// for examples of where this comes up,.
38293829
fn rvalue_hint(tcx: &ty::ctxt<'tcx>, ty: Ty<'tcx>) -> Expectation<'tcx> {
38303830
match tcx.struct_tail(ty).sty {
3831-
ty::TySlice(_) | ty::TyTrait(..) => {
3831+
ty::TySlice(_) | ty::TyStr | ty::TyTrait(..) => {
38323832
ExpectRvalueLikeUnsized(ty)
38333833
}
38343834
_ => ExpectHasType(ty)

branches/stable/src/librustdoc/clean/mod.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1281,10 +1281,8 @@ impl Clean<Item> for hir::ImplItem {
12811281
fn clean(&self, cx: &DocContext) -> Item {
12821282
let inner = match self.node {
12831283
hir::ImplItemKind::Const(ref ty, ref expr) => {
1284-
ConstantItem(Constant{
1285-
type_: ty.clean(cx),
1286-
expr: expr.span.to_src(cx),
1287-
})
1284+
AssociatedConstItem(ty.clean(cx),
1285+
Some(expr.span.to_src(cx)))
12881286
}
12891287
hir::ImplItemKind::Method(ref sig, _) => {
12901288
MethodItem(sig.clean(cx))

0 commit comments

Comments
 (0)