Skip to content

Rollup of 17 pull requests #31643

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 32 commits into from
Feb 14, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
8d5dcf9
Note rotate_{left,right} in wrapping_sh{lr} docs
ketsuban Feb 10, 2016
cff81d7
Fix documentation example in the book
ollie27 Feb 10, 2016
cec158b
doc: concat_idents! macro: more on its limitations.
nodakai Feb 10, 2016
c640885
mod.rs: fix typo
scottrobertwhittaker Feb 11, 2016
8f61a4b
Added a few words to indicate where the vector object is created.
sandeep-datta Feb 11, 2016
583f638
doc: add missing words
tshepang Feb 11, 2016
2f20d5a
doc: assert_eq on 2 boolean values is redundant
tshepang Feb 11, 2016
0352bdf
doc: skipping (obvious) details here is worth making this more nice t…
tshepang Feb 11, 2016
8bbb70c
Remove unnecessary bounds on Error and Display implementations for Tr…
reem Feb 12, 2016
e56cb87
syntax: Replace unstable `vec.as_slice().get()` with `vec.get()`
erickt Feb 12, 2016
9ec1127
Clarify what tx/rx mean in concurrency docs
Manishearth Feb 12, 2016
eb0f9f8
Remove unnecessary article
raindev Feb 12, 2016
d3ca33f
Add a new i586 Linux target
Feb 13, 2016
15e5cf3
use a compatible syntax for grep GNU/BSD
semarie Feb 13, 2016
e4ef60c
Add *.pdb to .gitignore
Feb 13, 2016
3e34519
Remove the last remaining .tex file
Feb 13, 2016
3c845fe
Rollup merge of #31535 - Ketsuban:more-detail-in-wrapping-shift-docum…
Manishearth Feb 13, 2016
1c5c2f5
Rollup merge of #31537 - ollie27:book_doc_example, r=steveklabnik
Manishearth Feb 13, 2016
42d17cc
Rollup merge of #31542 - nodakai:concat_idents-desc, r=steveklabnik
Manishearth Feb 13, 2016
302e5cb
Rollup merge of #31559 - scottrobertwhittaker:fix-typo, r=steveklabnik
Manishearth Feb 13, 2016
1598995
Rollup merge of #31563 - SDX2000:docfixes1, r=steveklabnik
Manishearth Feb 13, 2016
d5dddb4
Rollup merge of #31582 - tshepang:missing-words, r=steveklabnik
Manishearth Feb 13, 2016
a40f2b6
Rollup merge of #31584 - tshepang:shorten, r=steveklabnik
Manishearth Feb 13, 2016
f1f6db6
Rollup merge of #31585 - tshepang:over-explanation, r=brson
Manishearth Feb 13, 2016
8a5ec51
Rollup merge of #31589 - reem:remove-unnecessary-poison-bounds, r=sfa…
Manishearth Feb 13, 2016
1407645
Rollup merge of #31609 - erickt:nit, r=sfackler
Manishearth Feb 13, 2016
8873732
Rollup merge of #31610 - Manishearth:doc-clarify-txrx, r=steveklabnik
Manishearth Feb 13, 2016
34d95f4
Rollup merge of #31612 - raindev:grammar, r=steveklabnik
Manishearth Feb 13, 2016
6d0d608
Rollup merge of #31629 - petevine:master, r=alexcrichton
Manishearth Feb 13, 2016
97a87ef
Rollup merge of #31635 - semarie:grep-e, r=alexcrichton
Manishearth Feb 13, 2016
5c835e9
Rollup merge of #31637 - rkruppe:ignore-pdb, r=alexcrichton
Manishearth Feb 13, 2016
b34e625
Rollup merge of #31638 - rkruppe:rm-tex, r=alexcrichton
Manishearth Feb 13, 2016
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*.elc
*.epub
*.exe
*.pdb
*.fn
*.html
*.kdev4
Expand Down
23 changes: 23 additions & 0 deletions mk/cfg/i586-unknown-linux-gnu.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# i586-unknown-linux-gnu configuration
CC_i586-unknown-linux-gnu=$(CC)
CXX_i586-unknown-linux-gnu=$(CXX)
CPP_i586-unknown-linux-gnu=$(CPP)
AR_i586-unknown-linux-gnu=$(AR)
CFG_LIB_NAME_i586-unknown-linux-gnu=lib$(1).so
CFG_STATIC_LIB_NAME_i586-unknown-linux-gnu=lib$(1).a
CFG_LIB_GLOB_i586-unknown-linux-gnu=lib$(1)-*.so
CFG_LIB_DSYM_GLOB_i586-unknown-linux-gnu=lib$(1)-*.dylib.dSYM
CFG_JEMALLOC_CFLAGS_i586-unknown-linux-gnu := -m32 $(CFLAGS)
CFG_GCCISH_CFLAGS_i586-unknown-linux-gnu := -Wall -Werror -g -fPIC -m32 $(CFLAGS)
CFG_GCCISH_CXXFLAGS_i586-unknown-linux-gnu := -fno-rtti $(CXXFLAGS)
CFG_GCCISH_LINK_FLAGS_i586-unknown-linux-gnu := -shared -fPIC -ldl -pthread -lrt -g -m32
CFG_GCCISH_DEF_FLAG_i586-unknown-linux-gnu := -Wl,--export-dynamic,--dynamic-list=
CFG_LLC_FLAGS_i586-unknown-linux-gnu :=
CFG_INSTALL_NAME_i586-unknown-linux-gnu =
CFG_EXE_SUFFIX_i586-unknown-linux-gnu =
CFG_WINDOWSY_i586-unknown-linux-gnu :=
CFG_UNIXY_i586-unknown-linux-gnu := 1
CFG_LDPATH_i586-unknown-linux-gnu :=
CFG_RUN_i586-unknown-linux-gnu=$(2)
CFG_RUN_TARG_i586-unknown-linux-gnu=$(call CFG_RUN_i586-unknown-linux-gnu,,$(2))
CFG_GNU_TRIPLE_i586-unknown-linux-gnu := i586-unknown-linux-gnu
2 changes: 2 additions & 0 deletions src/doc/book/concurrency.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,8 @@ use std::sync::mpsc;
fn main() {
let data = Arc::new(Mutex::new(0));

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

for _ in 0..10 {
Expand Down
6 changes: 3 additions & 3 deletions src/doc/book/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -319,23 +319,23 @@ our source code:
```text
First, we set `x` to five:

```text
```rust
let x = 5;
# let y = 6;
# println!("{}", x + y);
```

Next, we set `y` to six:

```text
```rust
# let x = 5;
let y = 6;
# println!("{}", x + y);
```

Finally, we print the sum of `x` and `y`:

```text
```rust
# let x = 5;
# let y = 6;
println!("{}", x + y);
Expand Down
10 changes: 6 additions & 4 deletions src/doc/book/ownership.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,11 @@ fn foo() {
}
```

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

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

Expand Down
2 changes: 1 addition & 1 deletion src/doc/book/using-rust-without-the-standard-library.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ don’t want to use the standard library via an attribute: `#![no_std]`.
> For details on binaries without the standard library, see [the nightly
> chapter on `#![no_std]`](no-stdlib.html)

To use `#![no_std]`, add a it to your crate root:
To use `#![no_std]`, add it to your crate root:

```rust
#![no_std]
Expand Down
2 changes: 0 additions & 2 deletions src/doc/uptack.tex

This file was deleted.

4 changes: 2 additions & 2 deletions src/libcollections/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ impl<T> Vec<T> {
}

/// Inserts an element at position `index` within the vector, shifting all
/// elements after position `i` one position to the right.
/// elements after it to the right.
///
/// # Panics
///
Expand Down Expand Up @@ -570,7 +570,7 @@ impl<T> Vec<T> {
}

/// Removes and returns the element at position `index` within the vector,
/// shifting all elements after position `index` one position to the left.
/// shifting all elements after it to the left.
///
/// # Panics
///
Expand Down
14 changes: 14 additions & 0 deletions src/libcore/num/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,13 @@ macro_rules! int_impl {
/// where `mask` removes any high-order bits of `rhs` that
/// would cause the shift to exceed the bitwidth of the type.
///
/// Note that this is *not* the same as a rotate-left; the
/// RHS of a wrapping shift-left is restricted to the range
/// of the type, rather than the bits shifted out of the LHS
/// being returned to the other end. The primitive integer
/// types all implement a `rotate_left` function, which may
/// be what you want instead.
///
/// # Examples
///
/// Basic usage:
Expand All @@ -759,6 +766,13 @@ macro_rules! int_impl {
/// where `mask` removes any high-order bits of `rhs` that
/// would cause the shift to exceed the bitwidth of the type.
///
/// Note that this is *not* the same as a rotate-right; the
/// RHS of a wrapping shift-right is restricted to the range
/// of the type, rather than the bits shifted out of the LHS
/// being returned to the other end. The primitive integer
/// types all implement a `rotate_right` function, which may
/// be what you want instead.
///
/// # Examples
///
/// Basic usage:
Expand Down
28 changes: 28 additions & 0 deletions src/librustc_back/target/i586_unknown_linux_gnu.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use target::Target;

pub fn target() -> Target {
let mut base = super::linux_base::opts();
base.cpu = "pentium".to_string();
base.pre_link_args.push("-m32".to_string());

Target {
llvm_target: "i586-unknown-linux-gnu".to_string(),
target_endian: "little".to_string(),
target_pointer_width: "32".to_string(),
arch: "x86".to_string(),
target_os: "linux".to_string(),
target_env: "gnu".to_string(),
target_vendor: "unknown".to_string(),
options: base,
}
}
1 change: 1 addition & 0 deletions src/librustc_back/target/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ macro_rules! supported_targets {
supported_targets! {
("x86_64-unknown-linux-gnu", x86_64_unknown_linux_gnu),
("i686-unknown-linux-gnu", i686_unknown_linux_gnu),
("i586-unknown-linux-gnu", i586_unknown_linux_gnu),
("mips-unknown-linux-gnu", mips_unknown_linux_gnu),
("mipsel-unknown-linux-gnu", mipsel_unknown_linux_gnu),
("powerpc-unknown-linux-gnu", powerpc_unknown_linux_gnu),
Expand Down
12 changes: 6 additions & 6 deletions src/libstd/ascii.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub trait AsciiExt {
#[stable(feature = "rust1", since = "1.0.0")]
type Owned;

/// Checks if within the ASCII range.
/// Checks if the value is within the ASCII range.
///
/// # Examples
///
Expand All @@ -55,8 +55,8 @@ pub trait AsciiExt {
/// let ascii = 'a';
/// let utf8 = '❤';
///
/// assert_eq!(true, ascii.is_ascii());
/// assert_eq!(false, utf8.is_ascii())
/// assert!(ascii.is_ascii());
/// assert!(!utf8.is_ascii());
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
fn is_ascii(&self) -> bool;
Expand Down Expand Up @@ -114,9 +114,9 @@ pub trait AsciiExt {
/// let ascii3 = 'A';
/// let ascii4 = 'z';
///
/// assert_eq!(true, ascii1.eq_ignore_ascii_case(&ascii2));
/// assert_eq!(true, ascii1.eq_ignore_ascii_case(&ascii3));
/// assert_eq!(false, ascii1.eq_ignore_ascii_case(&ascii4));
/// assert!(ascii1.eq_ignore_ascii_case(&ascii2));
/// assert!(ascii1.eq_ignore_ascii_case(&ascii3));
/// assert!(!ascii1.eq_ignore_ascii_case(&ascii4));
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
fn eq_ignore_ascii_case(&self, other: &Self) -> bool;
Expand Down
9 changes: 6 additions & 3 deletions src/libstd/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,10 @@ pub mod builtin {
/// This macro takes any number of comma-separated identifiers, and
/// concatenates them all into one, yielding an expression which is a new
/// identifier. Note that hygiene makes it such that this macro cannot
/// capture local variables, and macros are only allowed in item,
/// statement or expression position, meaning this macro may be difficult to
/// use in some situations.
/// capture local variables. Also, as a general rule, macros are only
/// allowed in item, statement or expression position. That means while
/// you may use this macro for referring to existing variables, functions or
/// modules etc, you cannot define a new one with it.
///
/// # Examples
///
Expand All @@ -283,6 +284,8 @@ pub mod builtin {
///
/// let f = concat_idents!(foo, bar);
/// println!("{}", f());
///
/// // fn concat_idents!(new, fun, name) { } // not usable in this way!
/// # }
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/prelude/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
//! * [`std::marker`]::{[`Copy`], [`Send`], [`Sized`], [`Sync`]}. The marker
//! traits indicate fundamental properties of types.
//! * [`std::ops`]::{[`Drop`], [`Fn`], [`FnMut`], [`FnOnce`]}. Various
//! operations for both destuctors and overloading `()`.
//! operations for both destructors and overloading `()`.
//! * [`std::mem`]::[`drop`], a convenience function for explicitly dropping a
//! value.
//! * [`std::boxed`]::[`Box`], a way to allocate values on the heap.
Expand Down
11 changes: 7 additions & 4 deletions src/libstd/sys/common/poison.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ impl<T> fmt::Display for PoisonError<T> {
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<T: Send + Reflect> Error for PoisonError<T> {
impl<T: Reflect> Error for PoisonError<T> {
fn description(&self) -> &str {
"poisoned lock: another task failed inside"
}
Expand Down Expand Up @@ -158,14 +158,17 @@ impl<T> fmt::Debug for TryLockError<T> {
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<T: Send + Reflect> fmt::Display for TryLockError<T> {
impl<T> fmt::Display for TryLockError<T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
self.description().fmt(f)
match *self {
TryLockError::Poisoned(..) => "poisoned lock: another task failed inside",
TryLockError::WouldBlock => "try_lock failed because the operation would block"
}.fmt(f)
}
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<T: Send + Reflect> Error for TryLockError<T> {
impl<T: Reflect> Error for TryLockError<T> {
fn description(&self) -> &str {
match *self {
TryLockError::Poisoned(ref p) => p.description(),
Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax/codemap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ impl MultiSpan {
for idx in 0.. {
if let Some(sp_trim) = sp.trim_start(prev) {
// Implies `sp.hi > prev.hi`
let cur = match self.spans.as_slice().get(idx) {
let cur = match self.spans.get(idx) {
Some(s) => *s,
None => {
sp = sp_trim;
Expand Down
4 changes: 2 additions & 2 deletions src/test/run-make/codegen-options-parsing/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ all:

# Should not link dead code...
$(RUSTC) -Z print-link-args dummy.rs 2>&1 | \
grep -e '--gc-sections\|-dead_strip\|/OPT:REF,ICF'
grep -e '--gc-sections' -e '-dead_strip' -e '/OPT:REF,ICF'
# ... unless you specifically ask to keep it
$(RUSTC) -Z print-link-args -C link-dead-code dummy.rs 2>&1 | \
(! grep -e '--gc-sections\|-dead_strip\|/OPT:REF,ICF')
(! grep -e '--gc-sections' -e '-dead_strip' -e '/OPT:REF,ICF')