Skip to content

Rolling up PRs in the queue #22153

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 72 commits into from
Feb 10, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
8f7c2d5
Replace `be` with `become`
ranma42 Jan 17, 2015
6f87211
Add QPath construction to ExtCtxt for UFCS support.
hugwijst Feb 4, 2015
4ef7551
Fix type inference related to upvars in closures
sanxiyn Jan 18, 2015
00d1873
Use `for` instead of `while` in ascii.rs tests
iKevinY Feb 2, 2015
d3c787a
Book Compound Data Types update
Feb 6, 2015
acaad3a
Simplify cache selection by just using the local cache whenever there
nikomatsakis Feb 7, 2015
4038694
Link to rustdoc page in the Rust book directly
caspark Feb 7, 2015
b510b90
Do not fail if --emit≠link and there’s no main fn
nagisa Feb 7, 2015
d163f1f
add missing features to libcollections tests
Gankra Feb 7, 2015
4f61e16
Fix std::ops::Range size_hint and ExactSizeIterator impls
Feb 7, 2015
bb49195
reference.md: Byte string literals start with a 'b'
geofft Feb 8, 2015
61b4823
Add a test for mainless emit targets
nagisa Feb 8, 2015
8fb4264
adapt run-make test suite for openbsd
semarie Feb 8, 2015
dca49e0
Move native thread name setting from thread_info to Thread, fixes #21911
vojtechkral Feb 4, 2015
34afe5e
Rename Show to Debug, String to Display
alkor Feb 5, 2015
89b2e9f
syntax: Fix integer underflow in diagnostic
pczarn Feb 8, 2015
6a2bad3
int/uint => isize/usize in liblibc/liballoc/libarena
petrochenkov Feb 9, 2015
97a9507
Fix links to module-level documentation in `std::cell`
mbudde Feb 9, 2015
0110f5e
syntax::fold: Allow removing attributes
kmcallister Feb 9, 2015
a6e8496
Deduplicate --crate-type arguments
nagisa Feb 9, 2015
5354317
Process cfg_attr right before stripping cfg
kmcallister Feb 9, 2015
d9393c2
Given `<expr> as Box<Trait>`, infer that `Box<_>` is expected type fo…
pnkfelix Feb 6, 2015
a1b3189
add test illustrating the feature.
pnkfelix Feb 6, 2015
45f6672
Make fallback font 'serif', rather than 'sans-serif' fonts
cllns Feb 9, 2015
0479d90
Update deprecation notice.
octplane Feb 7, 2015
1163cef
remove obsolete closure syntax from the guide
lukesteensen Feb 9, 2015
64a4dec
std: Remove typarms from IteratorExt::cloned
alexcrichton Feb 6, 2015
605225a
std: Rename IntoIterator::Iter to IntoIter
alexcrichton Feb 6, 2015
0ee95b9
std: Mark IntoIterator::into_iter as #[stable
alexcrichton Feb 10, 2015
dbccd70
Add documentation on trait objects.
steveklabnik Feb 9, 2015
e40d058
Remove incorrect docs from mem::transmute
steveklabnik Feb 10, 2015
b42c559
Remove bottom from the reference
steveklabnik Feb 10, 2015
17abb43
Set up docs for missing core types
steveklabnik Feb 10, 2015
88d8ba5
Auto merge of #22028 - nikomatsakis:issue-22019-caching, r=aturon
bors Feb 10, 2015
792dc8d
Made the `ptr::Unique` type accept unsized types, to allow for use cases
Kimundi Feb 10, 2015
3513c97
Add error message (i.e. do not ICE) when moving out of unsafe pointers.
pnkfelix Feb 10, 2015
7d2404c
Move native thread name setting from thread_info to Thread, fixes #21911
vojtechkral Feb 10, 2015
ad3be9f
parse cfgspecs passed to rustdoc
apasel422 Feb 10, 2015
6e8b873
Add a flag to skip the LLVM version check in configure
dotdash Feb 10, 2015
8ee8686
rollup merge of #21353: sanxiyn/upvar
alexcrichton Feb 10, 2015
dff8182
rollup merge of #21862: iKevinY/libstd-ascii-tests
alexcrichton Feb 10, 2015
6cf75ca
rollup merge of #21918: ranma42/replace-be
alexcrichton Feb 10, 2015
c41655b
rollup merge of #21920: vojtechkral/main-thread-name
alexcrichton Feb 10, 2015
c62906d
rollup merge of #21943: hugwijst/extctxt_ufcs
alexcrichton Feb 10, 2015
7fcc330
rollup merge of #22007: thiagooak/master
alexcrichton Feb 10, 2015
c177da6
rollup merge of #22012: pnkfelix/propagate-container-across-object-cast
alexcrichton Feb 10, 2015
91fc9f3
rollup merge of #22049: caspark/fix-link-to-rustdoc
alexcrichton Feb 10, 2015
712874e
rollup merge of #22051: nagisa/main-emission
alexcrichton Feb 10, 2015
6e6bea6
rollup merge of #22052: octplane/patch-1
alexcrichton Feb 10, 2015
24c9213
rollup merge of #22065: bluss/range-size-hint
alexcrichton Feb 10, 2015
cef623e
rollup merge of #22067: Gankro/collections-tests
alexcrichton Feb 10, 2015
577c51c
rollup merge of #22072: geofft/doc-byte-string-literal
alexcrichton Feb 10, 2015
0568422
rollup merge of #22088: semarie/openbsd-rmake
alexcrichton Feb 10, 2015
7e378ed
rollup merge of #22094: alkor/cleanup-show-string
alexcrichton Feb 10, 2015
5ad52ca
rollup merge of #22097: cllns/fix-fallback-fonts
alexcrichton Feb 10, 2015
6d55d3a
rollup merge of #22103: pczarn/fix-ice-22091
alexcrichton Feb 10, 2015
011b77b
rollup merge of #22106: steveklabnik/doc_trait_objects
alexcrichton Feb 10, 2015
6ecb011
rollup merge of #22109: petrochenkov/intuint1
alexcrichton Feb 10, 2015
b6e5f1b
rollup merge of #22112: mbudde/std-cell-doc-fix
alexcrichton Feb 10, 2015
c33acf6
rollup merge of #22115: nagisa/dedupe-cratetypes
alexcrichton Feb 10, 2015
bbc8a54
rollup merge of #22116: kmcallister/cfg_attr
alexcrichton Feb 10, 2015
637a89b
rollup merge of #22120: lukesteensen/closures_guide
alexcrichton Feb 10, 2015
d3dd389
rollup merge of #22125: alexcrichton/into-iter-stability
alexcrichton Feb 10, 2015
b0b373d
rollup merge of #22128: steveklabnik/gh22085
alexcrichton Feb 10, 2015
e630ed6
rollup merge of #22129: steveklabnik/gh22032
alexcrichton Feb 10, 2015
3161cb0
rollup merge of #22130: steveklabnik/gh20172
alexcrichton Feb 10, 2015
8b44cf2
rollup merge of #22135: apasel422/issue-22131
alexcrichton Feb 10, 2015
ba7b790
rollup merge of #22142: Kimundi/unsized_unique
alexcrichton Feb 10, 2015
df55acf
rollup merge of #22143: pnkfelix/fix-issue-20801
alexcrichton Feb 10, 2015
08cbb4a
rollup merge of #22147: dotdash/llvm_version
alexcrichton Feb 10, 2015
1138f88
rollup merge of #22144: pnkfelix/fru-privacy-rfc-736
alexcrichton Feb 10, 2015
3e10785
Test fixes and rebase conflicts
alexcrichton Feb 10, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,7 @@ opt verify-install 1 "verify installed binaries work"
opt dist-host-only 0 "only install bins for the host architecture"
opt inject-std-version 1 "inject the current compiler version of libstd into programs"
opt jemalloc 1 "build liballoc with jemalloc"
opt llvm-version-check 1 "don't check if the LLVM version is supported, build anyway"

valopt localstatedir "/var/lib" "local state directory"
valopt sysconfdir "/etc" "install system configuration files"
Expand Down Expand Up @@ -796,7 +797,7 @@ then
putvar CFG_ENABLE_CLANG
fi

if [ ! -z "$CFG_LLVM_ROOT" -a -e "$CFG_LLVM_ROOT/bin/llvm-config" ]
if [ ! -z "$CFG_LLVM_ROOT" -a -z "$CFG_DISABLE_LLVM_VERSION_CHECK" -a -e "$CFG_LLVM_ROOT/bin/llvm-config" ]
then
step_msg "using custom LLVM at $CFG_LLVM_ROOT"

Expand Down
1 change: 0 additions & 1 deletion src/compiletest/compiletest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

#![feature(box_syntax)]
#![feature(collections)]
#![feature(core)]
#![feature(int_uint)]
#![feature(io)]
#![feature(os)]
Expand Down
2 changes: 1 addition & 1 deletion src/doc/grammar.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ token : simple_token | ident | literal | symbol | whitespace token ;

| | | | | |
|----------|----------|----------|----------|--------|
| abstract | alignof | as | be | box |
| abstract | alignof | as | become | box |
| break | const | continue | crate | do |
| else | enum | extern | false | final |
| fn | for | if | impl | in |
Expand Down
3 changes: 1 addition & 2 deletions src/doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ tools we have are really nice.
[Cargo](http://crates.io) is Rust's package manager, and its website contains
lots of good documentation.

[The `rustdoc` manual](rustdoc.html) contains information about Rust's
documentation tool.
[`rustdoc`](book/documentation.html) is used to generate documentation for Rust code.

# FAQs

Expand Down
22 changes: 11 additions & 11 deletions src/doc/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ grammar as double-quoted strings. Other tokens have exact rules given.

| | | | | |
|----------|----------|----------|----------|---------|
| abstract | alignof | as | be | box |
| abstract | alignof | as | become | box |
| break | const | continue | crate | do |
| else | enum | extern | false | final |
| fn | for | if | impl | in |
Expand Down Expand Up @@ -381,11 +381,13 @@ character (`\`), or a single _escape_. It is equivalent to a `u8` unsigned

##### Byte string literals

A _byte string literal_ is a sequence of ASCII characters and _escapes_
enclosed within two `U+0022` (double-quote) characters, with the exception of
`U+0022` itself, which must be _escaped_ by a preceding `U+005C` character
(`\`), or a _raw byte string literal_. It is equivalent to a `&'static [u8]`
borrowed array of unsigned 8-bit integers.
A non-raw _byte string literal_ is a sequence of ASCII characters and _escapes_,
preceded by the characters `U+0062` (`b`) and `U+0022` (double-quote), and
followed by the character `U+0022`. If the character `U+0022` is present within
the literal, it must be _escaped_ by a preceding `U+005C` (`\`) character.
Alternatively, a byte string literal can be a _raw byte string literal_, defined
below. A byte string literal is equivalent to a `&'static [u8]` borrowed array
of unsigned 8-bit integers.

Some additional _escapes_ are available in either byte or non-raw byte string
literals. An escape starts with a `U+005C` (`\`) and continues with one of the
Expand Down Expand Up @@ -1253,9 +1255,7 @@ fn my_err(s: &str) -> ! {
We call such functions "diverging" because they never return a value to the
caller. Every control path in a diverging function must end with a `panic!()` or
a call to another diverging function on every control path. The `!` annotation
does *not* denote a type. Rather, the result type of a diverging function is a
special type called ⊥ ("bottom") that unifies with any type. Rust has no
syntax for ⊥.
does *not* denote a type.

It might be necessary to declare a diverging function because as mentioned
previously, the typechecker checks that every control path in a function ends
Expand Down Expand Up @@ -2354,8 +2354,8 @@ Supported traits for `derive` are:
* `FromPrimitive`, to create an instance from a numeric primitive.
* `Hash`, to iterate over the bytes in a data type.
* `Rand`, to create a random instance of a data type.
* `Show`, to format a value using the `{}` formatter.
* `Zero`, to create a zero instance of a numeric data type.
* `Debug`, to format a value using the `{:?}` formatter.
* `Copy`, for "Plain Old Data" types which can be copied by simply moving bits.

### Compiler Features

Expand Down
2 changes: 1 addition & 1 deletion src/doc/rust.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
body {
margin: 0 auto;
padding: 0 15px;
font-family: "Source Serif Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-family: "Source Serif Pro", Georgia, Times, "Times New Roman", serif;
font-size: 18px;
color: #333;
line-height: 1.428571429;
Expand Down
1 change: 1 addition & 0 deletions src/doc/trpl/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
* [Iterators](iterators.md)
* [Generics](generics.md)
* [Traits](traits.md)
* [Static and Dynamic Dispatch](static-and-dynamic-dispatch.md)
* [Concurrency](concurrency.md)
* [Error Handling](error-handling.md)
* [Documentation](documentation.md)
Expand Down
20 changes: 10 additions & 10 deletions src/doc/trpl/closures.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ arguments, really powerful things are possible.
Let's make a closure:

```{rust}
let add_one = |&: x| { 1 + x };
let add_one = |x| { 1 + x };

println!("The sum of 5 plus 1 is {}.", add_one(5));
```
Expand All @@ -21,8 +21,8 @@ binding name and two parentheses, just like we would for a named function.
Let's compare syntax. The two are pretty close:

```{rust}
let add_one = |&: x: i32| -> i32 { 1 + x };
fn add_one (x: i32) -> i32 { 1 + x }
let add_one = |x: i32| -> i32 { 1 + x };
fn add_one (x: i32) -> i32 { 1 + x }
```

As you may have noticed, closures infer their argument and return types, so you
Expand All @@ -37,7 +37,7 @@ this:
fn main() {
let x: i32 = 5;

let printer = |&:| { println!("x is: {}", x); };
let printer = || { println!("x is: {}", x); };

printer(); // prints "x is: 5"
}
Expand All @@ -53,7 +53,7 @@ defined. The closure borrows any variables it uses, so this will error:
fn main() {
let mut x: i32 = 5;

let printer = |&:| { println!("x is: {}", x); };
let printer = || { println!("x is: {}", x); };

x = 6; // error: cannot assign to `x` because it is borrowed
}
Expand All @@ -80,7 +80,7 @@ fn twice<F: Fn(i32) -> i32>(x: i32, f: F) -> i32 {
}

fn main() {
let square = |&: x: i32| { x * x };
let square = |x: i32| { x * x };

twice(5, square); // evaluates to 50
}
Expand All @@ -89,15 +89,15 @@ fn main() {
Let's break the example down, starting with `main`:

```{rust}
let square = |&: x: i32| { x * x };
let square = |x: i32| { x * x };
```

We've seen this before. We make a closure that takes an integer, and returns
its square.

```{rust}
# fn twice<F: Fn(i32) -> i32>(x: i32, f: F) -> i32 { f(x) + f(x) }
# let square = |&: x: i32| { x * x };
# let square = |x: i32| { x * x };
twice(5, square); // evaluates to 50
```

Expand Down Expand Up @@ -184,8 +184,8 @@ fn compose<F, G>(x: i32, f: F, g: G) -> i32

fn main() {
compose(5,
|&: n: i32| { n + 42 },
|&: n: i32| { n * 2 }); // evaluates to 94
|n: i32| { n + 42 },
|n: i32| { n * 2 }); // evaluates to 94
}
```

Expand Down
14 changes: 14 additions & 0 deletions src/doc/trpl/compound-data-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,20 @@ if x == y {

This will print `no`, because some of the values aren't equal.

Note that the order of the values is considered when checking for equality,
so the following example will also print `no`.

```rust
let x = (1, 2, 3);
let y = (2, 1, 3);

if x == y {
println!("yes");
} else {
println!("no");
}
```

One other use of tuples is to return multiple values from a function:

```rust
Expand Down
Loading