Skip to content

Commit ba755db

Browse files
committed
---
yaml --- r: 235970 b: refs/heads/stable c: 3c77195 h: refs/heads/master v: v3
1 parent 22ff49b commit ba755db

File tree

255 files changed

+3375
-8200
lines changed

Some content is hidden

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

255 files changed

+3375
-8200
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: e88ee957ed49e13a48306551db4b108d249626e6
32+
refs/heads/stable: 3c7719580c11a9165866ce29cffbd3b2b870cc27
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/.gitattributes

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,4 @@
66
*.rs rust
77
src/etc/pkg/rust-logo.ico binary
88
src/etc/pkg/rust-logo.png binary
9-
src/rt/msvc/* -whitespace
10-
src/rt/valgrind/* -whitespace
119
*.woff binary

branches/stable/configure

Lines changed: 39 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,9 @@ valopt llvm-root "" "set LLVM root"
601601
valopt python "" "set path to python"
602602
valopt jemalloc-root "" "set directory where libjemalloc_pic.a is located"
603603
valopt build "${DEFAULT_BUILD}" "GNUs ./configure syntax LLVM build triple"
604-
valopt android-cross-path "/opt/ndk_standalone" "Android NDK standalone path"
604+
valopt android-cross-path "/opt/ndk_standalone" "Android NDK standalone path (deprecated)"
605+
valopt arm-linux-androideabi-ndk "" "arm-linux-androideabi NDK standalone path"
606+
valopt aarch64-linux-android-ndk "" "aarch64-linux-android NDK standalone path"
605607
valopt release-channel "dev" "the name of the release channel to build"
606608
valopt musl-root "/usr/local" "MUSL root installation directory"
607609

@@ -1112,20 +1114,24 @@ do
11121114
fi
11131115

11141116
case $i in
1115-
arm-linux-androideabi)
1116-
1117-
if [ ! -f $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-gcc ]
1118-
then
1119-
err "NDK $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-gcc not found"
1120-
fi
1121-
if [ ! -f $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-g++ ]
1122-
then
1123-
err "NDK $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-g++ not found"
1124-
fi
1125-
if [ ! -f $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-ar ]
1117+
*android*)
1118+
upper_snake_target=$(echo "$i" | tr '[:lower:]' '[:upper:]' | tr '\-' '\_')
1119+
eval ndk=\$"CFG_${upper_snake_target}_NDK"
1120+
if [ -z "$ndk" ]
11261121
then
1127-
err "NDK $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-ar not found"
1122+
ndk=$CFG_ANDROID_CROSS_PATH
1123+
eval "CFG_${upper_snake_target}_NDK"=$CFG_ANDROID_CROSS_PATH
1124+
warn "generic/default Android NDK option is deprecated (use --$i-ndk option instead)"
11281125
fi
1126+
1127+
# Perform a basic sanity check of the NDK
1128+
for android_ndk_tool in "$ndk/bin/$i-gcc" "$ndk/bin/$i-g++" "$ndk/bin/$i-ar"
1129+
do
1130+
if [ ! -f $android_ndk_tool ]
1131+
then
1132+
err "NDK tool $android_ndk_tool not found (bad or missing --$i-ndk option?)"
1133+
fi
1134+
done
11291135
;;
11301136

11311137
arm-apple-darwin)
@@ -1177,8 +1183,13 @@ do
11771183
# INCLUDE and LIB variables for MSVC so we can set those in the
11781184
# build system as well.
11791185
install=$(reg QUERY \
1180-
'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0' \
1186+
'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0' \
11811187
-v InstallDir)
1188+
if [ -z "$install" ]; then
1189+
install=$(reg QUERY \
1190+
'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0' \
1191+
-v InstallDir)
1192+
fi
11821193
need_ok "couldn't find visual studio install root"
11831194
CFG_MSVC_ROOT=$(echo "$install" | grep InstallDir | sed 's/.*REG_SZ[ ]*//')
11841195
CFG_MSVC_ROOT=$(dirname "$CFG_MSVC_ROOT")
@@ -1460,12 +1471,22 @@ do
14601471

14611472
msg "configuring LLVM with:"
14621473
msg "$CMAKE_ARGS"
1474+
case "$CFG_MSVC_ROOT" in
1475+
*14.0*)
1476+
generator="Visual Studio 14 2015"
1477+
;;
1478+
*12.0*)
1479+
generator="Visual Studio 12 2013"
1480+
;;
1481+
*)
1482+
err "can't determine generator for LLVM cmake"
1483+
;;
1484+
esac
14631485
case "$t" in
14641486
x86_64-*)
1465-
generator="Visual Studio 12 2013 Win64"
1487+
generator="$generator Win64"
14661488
;;
14671489
i686-*)
1468-
generator="Visual Studio 12 2013"
14691490
;;
14701491
*)
14711492
err "can only build LLVM for x86 platforms"
@@ -1667,7 +1688,8 @@ putvar CFG_HOST
16671688
putvar CFG_TARGET
16681689
putvar CFG_LIBDIR_RELATIVE
16691690
putvar CFG_DISABLE_MANAGE_SUBMODULES
1670-
putvar CFG_ANDROID_CROSS_PATH
1691+
putvar CFG_AARCH64_LINUX_ANDROID_NDK
1692+
putvar CFG_ARM_LINUX_ANDROIDEABI_NDK
16711693
putvar CFG_MANDIR
16721694

16731695
# Avoid spurious warnings from clang by feeding it original source on

branches/stable/mk/cfg/aarch64-linux-android.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# aarch64-linux-android configuration
22
# CROSS_PREFIX_aarch64-linux-android-
3-
CC_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-gcc
4-
CXX_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-g++
5-
CPP_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-gcc -E
6-
AR_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-ar
3+
CC_aarch64-linux-android=$(CFG_AARCH64_LINUX_ANDROID_NDK)/bin/aarch64-linux-android-gcc
4+
CXX_aarch64-linux-android=$(CFG_AARCH64_LINUX_ANDROID_NDK)/bin/aarch64-linux-android-g++
5+
CPP_aarch64-linux-android=$(CFG_AARCH64_LINUX_ANDROID_NDK)/bin/aarch64-linux-android-gcc -E
6+
AR_aarch64-linux-android=$(CFG_AARCH64_LINUX_ANDROID_NDK)/bin/aarch64-linux-android-ar
77
CFG_LIB_NAME_aarch64-linux-android=lib$(1).so
88
CFG_STATIC_LIB_NAME_aarch64-linux-android=lib$(1).a
99
CFG_LIB_GLOB_aarch64-linux-android=lib$(1)-*.so

branches/stable/mk/cfg/arm-linux-androideabi.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# arm-linux-androideabi configuration
2-
CC_arm-linux-androideabi=$(CFG_ANDROID_CROSS_PATH)/bin/arm-linux-androideabi-gcc
3-
CXX_arm-linux-androideabi=$(CFG_ANDROID_CROSS_PATH)/bin/arm-linux-androideabi-g++
4-
CPP_arm-linux-androideabi=$(CFG_ANDROID_CROSS_PATH)/bin/arm-linux-androideabi-gcc -E
5-
AR_arm-linux-androideabi=$(CFG_ANDROID_CROSS_PATH)/bin/arm-linux-androideabi-ar
2+
CC_arm-linux-androideabi=$(CFG_ARM_LINUX_ANDROIDEABI_NDK)/bin/arm-linux-androideabi-gcc
3+
CXX_arm-linux-androideabi=$(CFG_ARM_LINUX_ANDROIDEABI_NDK)/bin/arm-linux-androideabi-g++
4+
CPP_arm-linux-androideabi=$(CFG_ARM_LINUX_ANDROIDEABI_NDK)/bin/arm-linux-androideabi-gcc -E
5+
AR_arm-linux-androideabi=$(CFG_ARM_LINUX_ANDROIDEABI_NDK)/bin/arm-linux-androideabi-ar
66
CFG_LIB_NAME_arm-linux-androideabi=lib$(1).so
77
CFG_STATIC_LIB_NAME_arm-linux-androideabi=lib$(1).a
88
CFG_LIB_GLOB_arm-linux-androideabi=lib$(1)-*.so

branches/stable/src/doc/trpl/choosing-your-guarantees.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ allowed to share references to this by the regular borrowing rules, checked at c
4242

4343
## `&T` and `&mut T`
4444

45-
These are immutable and mutable references respectively. They follow the &lquo;read-write lock&rquo;
45+
These are immutable and mutable references respectively. They follow the “read-write lock”
4646
pattern, such that one may either have only one mutable reference to some data, or any number of
4747
immutable ones, but not both. This guarantee is enforced at compile time, and has no visible cost at
4848
runtime. In most cases these two pointer types suffice for sharing cheap references between sections
@@ -81,7 +81,7 @@ The main guarantee provided here is that the data will not be destroyed until al
8181
are out of scope.
8282

8383
This should be used when we wish to dynamically allocate and share some data (read-only) between
84-
various portions of yur program, where it is not certain which portion will finish using the pointer
84+
various portions of your program, where it is not certain which portion will finish using the pointer
8585
last. It's a viable alternative to `&T` when `&T` is either impossible to statically check for
8686
correctness, or creates extremely unergonomic code where the programmer does not wish to spend the
8787
development cost of working with.
@@ -108,7 +108,7 @@ increment the inner reference count and return a copy of the `Rc<T>`.
108108

109109
# Cell types
110110

111-
&lquo;Cell&rquo;s provide interior mutability. In other words, they contain data which can be manipulated even
111+
`Cell`s provide interior mutability. In other words, they contain data which can be manipulated even
112112
if the type cannot be obtained in a mutable form (for example, when it is behind an `&`-ptr or
113113
`Rc<T>`).
114114

@@ -127,7 +127,8 @@ If a field is wrapped in `Cell`, it's a nice indicator that the chunk of data is
127127
stay the same between the time you first read it and when you intend to use it.
128128

129129
```rust
130-
# use std::cell::Cell;
130+
use std::cell::Cell;
131+
131132
let x = Cell::new(1);
132133
let y = &x;
133134
let z = &x;
@@ -185,7 +186,8 @@ any other borrows active when a mutable borrow is active. If the programmer atte
185186
borrow, the thread will panic.
186187

187188
```rust
188-
# use std::cell::RefCell;
189+
use std::cell::RefCell;
190+
189191
let x = RefCell::new(vec![1,2,3,4]);
190192
{
191193
println!("{:?}", *x.borrow())

branches/stable/src/doc/trpl/compiler-plugins.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ fn expand_rn(cx: &mut ExtCtxt, sp: Span, args: &[TokenTree])
6161
("I", 1)];
6262
6363
let text = match args {
64-
[TtToken(_, token::Ident(s, _))] => token::get_ident(s).to_string(),
64+
[TtToken(_, token::Ident(s, _))] => s.to_string(),
6565
_ => {
6666
cx.span_err(sp, "argument should be a single identifier");
6767
return DummyResult::any(sp);
@@ -186,8 +186,7 @@ impl LintPass for Pass {
186186
}
187187
188188
fn check_item(&mut self, cx: &Context, it: &ast::Item) {
189-
let name = token::get_ident(it.ident);
190-
if name.get() == "lintme" {
189+
if it.ident.name == "lintme" {
191190
cx.span_lint(TEST_LINT, it.span, "item is named 'lintme'");
192191
}
193192
}

branches/stable/src/doc/trpl/crates-and-modules.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,10 @@ Hello in English: Hello!
355355
Goodbye in English: Goodbye.
356356
```
357357
358+
`pub` also applies to `struct`s and their member fields. In keeping with Rust’s
359+
tendency toward safety, simply making a `struct` public won't automatically
360+
make its members public: you must mark the fields individually with `pub`.
361+
358362
Now that our functions are public, we can use them. Great! However, typing out
359363
`phrases::english::greetings::hello()` is very long and repetitive. Rust has
360364
another keyword for importing names into the current scope, so that you can

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ perform efficient pointer arithmetic, one would import those functions
1111
via a declaration like
1212

1313
```rust
14-
# #![feature(intrinsics)]
14+
#![feature(intrinsics)]
1515
# fn main() {}
1616

1717
extern "rust-intrinsic" {

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

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -347,40 +347,50 @@ easiest just to show an example:
347347

348348
```rust
349349
trait Foo {
350-
fn bar(&self);
350+
fn is_valid(&self) -> bool;
351351

352-
fn baz(&self) { println!("We called baz."); }
352+
fn is_invalid(&self) -> bool { !self.is_valid() }
353353
}
354354
```
355355

356-
Implementors of the `Foo` trait need to implement `bar()`, but they don’t
357-
need to implement `baz()`. They’ll get this default behavior. They can
356+
Implementors of the `Foo` trait need to implement `is_valid()`, but they don’t
357+
need to implement `is_invalid()`. They’ll get this default behavior. They can
358358
override the default if they so choose:
359359

360360
```rust
361361
# trait Foo {
362-
# fn bar(&self);
363-
# fn baz(&self) { println!("We called baz."); }
362+
# fn is_valid(&self) -> bool;
363+
#
364+
# fn is_invalid(&self) -> bool { !self.is_valid() }
364365
# }
365366
struct UseDefault;
366367

367368
impl Foo for UseDefault {
368-
fn bar(&self) { println!("We called bar."); }
369+
fn is_valid(&self) -> bool {
370+
println!("Called UseDefault.is_valid.");
371+
true
372+
}
369373
}
370374

371375
struct OverrideDefault;
372376

373377
impl Foo for OverrideDefault {
374-
fn bar(&self) { println!("We called bar."); }
378+
fn is_valid(&self) -> bool {
379+
println!("Called OverrideDefault.is_valid.");
380+
true
381+
}
375382

376-
fn baz(&self) { println!("Override baz!"); }
383+
fn is_invalid(&self) -> bool {
384+
println!("Called OverrideDefault.is_invalid!");
385+
true // this implementation is a self-contradiction!
386+
}
377387
}
378388

379389
let default = UseDefault;
380-
default.baz(); // prints "We called baz."
390+
assert!(!default.is_invalid()); // prints "Called UseDefault.is_valid."
381391

382392
let over = OverrideDefault;
383-
over.baz(); // prints "Override baz!"
393+
assert!(over.is_invalid()); // prints "Called OverrideDefault.is_invalid!"
384394
```
385395

386396
# Inheritance

branches/stable/src/liballoc/arc.rs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,8 @@ impl<T: ?Sized> Arc<T> {
200200
/// # Examples
201201
///
202202
/// ```
203-
/// # #![feature(arc_weak)]
203+
/// #![feature(arc_weak)]
204+
///
204205
/// use std::sync::Arc;
205206
///
206207
/// let five = Arc::new(5);
@@ -337,7 +338,8 @@ impl<T: Clone> Arc<T> {
337338
/// # Examples
338339
///
339340
/// ```
340-
/// # #![feature(arc_unique)]
341+
/// #![feature(arc_unique)]
342+
///
341343
/// use std::sync::Arc;
342344
///
343345
/// let mut five = Arc::new(5);
@@ -408,7 +410,8 @@ impl<T: ?Sized> Arc<T> {
408410
/// # Examples
409411
///
410412
/// ```
411-
/// # #![feature(arc_unique, alloc)]
413+
/// #![feature(arc_unique, alloc)]
414+
///
412415
/// extern crate alloc;
413416
/// # fn main() {
414417
/// use alloc::arc::Arc;
@@ -555,7 +558,8 @@ impl<T: ?Sized> Weak<T> {
555558
/// # Examples
556559
///
557560
/// ```
558-
/// # #![feature(arc_weak)]
561+
/// #![feature(arc_weak)]
562+
///
559563
/// use std::sync::Arc;
560564
///
561565
/// let five = Arc::new(5);
@@ -599,7 +603,8 @@ impl<T: ?Sized> Clone for Weak<T> {
599603
/// # Examples
600604
///
601605
/// ```
602-
/// # #![feature(arc_weak)]
606+
/// #![feature(arc_weak)]
607+
///
603608
/// use std::sync::Arc;
604609
///
605610
/// let weak_five = Arc::new(5).downgrade();
@@ -626,7 +631,8 @@ impl<T: ?Sized> Drop for Weak<T> {
626631
/// # Examples
627632
///
628633
/// ```
629-
/// # #![feature(arc_weak)]
634+
/// #![feature(arc_weak)]
635+
///
630636
/// use std::sync::Arc;
631637
///
632638
/// {

0 commit comments

Comments
 (0)