Skip to content

Rollup PRs in the queue #21855

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

Closed
wants to merge 25 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
df2c3a2
copyright: update paths and entries
lucab Jan 22, 2015
0832364
std: Stabilize Atomic{Isize,Usize} methods
alexcrichton Jan 31, 2015
f9f7ad7
rustc: Make unused_features lint warn by default
brson Jan 31, 2015
e9ade48
updating the link to rustdoc
Jan 31, 2015
64ca751
Mention the type in the overflowing literal lint
nagisa Jan 31, 2015
afa526c
Update tests for overflowing literals
nagisa Jan 31, 2015
7eaa589
fix use decl code example in reference
Jan 31, 2015
cedc675
Fix end of TtDelimited span
kmcallister Jan 31, 2015
b796c1d
Updated unicode escape documentation to match current implementation.
genbattle Feb 1, 2015
0828efd
Reject syntax like `use foo::bar::;` and `use foo:: as bar;` and keyw…
Potpourri Jan 31, 2015
0e44484
std: Remove extra type params on iter adaptors
alexcrichton Feb 1, 2015
8d57f8c
Fix stale doc link (guide -> book)
Manishearth Feb 1, 2015
0187ea6
rustc: Change an unconditional `warn` to a `note`
alexcrichton Feb 1, 2015
b999ed3
Rollup merge of #21845 - Potpourri:import-syntax, r=alexcrichton
Manishearth Feb 1, 2015
715fe55
Rollup merge of #21832 - genbattle:doc-unicode-escapes, r=alexcrichton
Manishearth Feb 1, 2015
02068f0
Rollup merge of #21819 - dsyang:doc_fix, r=alexcrichton
Manishearth Feb 1, 2015
6f3aa71
Rollup merge of #21803 - madmalik:patch-1, r=steveklabnik
Manishearth Feb 1, 2015
642b498
Rollup merge of #21800 - brson:unused_features, r=alexcrichton
Manishearth Feb 1, 2015
944dbc4
Rollup merge of #21794 - alexcrichton:stabilize-atomic-usize, r=huonw
Manishearth Feb 1, 2015
8562706
Rollup merge of #21509 - lucab:lucab/copyright-update, r=brson
Manishearth Feb 1, 2015
1dbef8b
Rollup merge of #21849 - alexcrichton:warn2note, r=nikomatsakis
Manishearth Feb 1, 2015
9e42492
Rollup merge of #21842 - alexcrichton:issue-21839, r=aturon
Manishearth Feb 1, 2015
d5593ef
Rollup merge of #21815 - nagisa:overflowing-lints, r=alexcrichton
Manishearth Feb 1, 2015
ec79e4b
Rollup merge of #21825 - kmcallister:ttdelim-span, r=sanxiyn
Manishearth Feb 2, 2015
cf26c36
fix test
Manishearth Feb 2, 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
20 changes: 4 additions & 16 deletions COPYRIGHT
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ The following third party packages are included, and carry
their own copyright notices and license terms:

* Two header files that are part of the Valgrind
package. These files are found at src/rt/vg/valgrind.h and
src/rt/vg/memcheck.h, within this distribution. These files
package. These files are found at src/rt/valgrind/valgrind.h and
src/rt/valgrind/memcheck.h, within this distribution. These files
are redistributed under the following terms, as noted in
them:

for src/rt/vg/valgrind.h:
for src/rt/valgrind/valgrind.h:

This file is part of Valgrind, a dynamic binary
instrumentation framework.
Expand Down Expand Up @@ -74,7 +74,7 @@ their own copyright notices and license terms:
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.

for src/rt/vg/memcheck.h:
for src/rt/valgrind/memcheck.h:

This file is part of MemCheck, a heavyweight Valgrind
tool for detecting memory errors.
Expand Down Expand Up @@ -120,18 +120,6 @@ their own copyright notices and license terms:
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.

* The auxiliary file src/etc/pkg/modpath.iss contains a
library routine compiled, by Inno Setup, into the Windows
installer binary. This file is licensed under the LGPL,
version 3, but, in our legal interpretation, this does not
affect the aggregate "collected work" license of the Rust
distribution (MIT/ASL2) nor any other components of it. We
believe that the terms governing distribution of the
binary Windows installer built from modpath.iss are
therefore LGPL, but not the terms governing distribution
of any of the files installed by such an installer (such
as the Rust compiler or runtime libraries themselves).

* The src/rt/miniz.c file, carrying an implementation of
RFC1950/RFC1951 DEFLATE, by Rich Geldreich
<[email protected]>. All uses of this file are
Expand Down
3 changes: 1 addition & 2 deletions src/doc/grammar.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,7 @@ raw_string : '"' raw_string_body '"' | '#' raw_string '#' ;
common_escape : '\x5c'
| 'n' | 'r' | 't' | '0'
| 'x' hex_digit 2
unicode_escape : 'u' hex_digit 4
| 'U' hex_digit 8 ;
unicode_escape : 'u' '{' hex_digit+ 6 '}';

hex_digit : 'a' | 'b' | 'c' | 'd' | 'e' | 'f'
| 'A' | 'B' | 'C' | 'D' | 'E' | 'F'
Expand Down
18 changes: 7 additions & 11 deletions src/doc/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,7 @@ cases mentioned in [Number literals](#number-literals) below.
##### Unicode escapes
| | Name |
|---|------|
| `\u7FFF` | 16-bit character code (exactly 4 digits) |
| `\U7EEEFFFF` | 32-bit character code (exactly 8 digits) |
| `\u{7FFF}` | 24-bit Unicode character code (up to 6 digits) |

##### Numbers

Expand Down Expand Up @@ -286,8 +285,8 @@ raw_string : '"' raw_string_body '"' | '#' raw_string '#' ;
common_escape : '\x5c'
| 'n' | 'r' | 't' | '0'
| 'x' hex_digit 2
unicode_escape : 'u' hex_digit 4
| 'U' hex_digit 8 ;

unicode_escape : 'u' '{' hex_digit+ 6 '}';

hex_digit : 'a' | 'b' | 'c' | 'd' | 'e' | 'f'
| 'A' | 'B' | 'C' | 'D' | 'E' | 'F'
Expand Down Expand Up @@ -320,12 +319,9 @@ following forms:
* An _8-bit codepoint escape_ escape starts with `U+0078` (`x`) and is
followed by exactly two _hex digits_. It denotes the Unicode codepoint
equal to the provided hex value.
* A _16-bit codepoint escape_ starts with `U+0075` (`u`) and is followed
by exactly four _hex digits_. It denotes the Unicode codepoint equal to
the provided hex value.
* A _32-bit codepoint escape_ starts with `U+0055` (`U`) and is followed
by exactly eight _hex digits_. It denotes the Unicode codepoint equal to
the provided hex value.
* A _24-bit codepoint escape_ starts with `U+0075` (`u`) and is followed
by up to six _hex digits_ surrounded by braces `U+007B` (`{`) and `U+007D`
(`}`). It denotes the Unicode codepoint equal to the provided hex value.
* A _whitespace escape_ is one of the characters `U+006E` (`n`), `U+0072`
(`r`), or `U+0074` (`t`), denoting the unicode values `U+000A` (LF),
`U+000D` (CR) or `U+0009` (HT) respectively.
Expand Down Expand Up @@ -1063,7 +1059,7 @@ mod foo {
extern crate core;

use foo::core::iter; // good: foo is at crate root
// use core::iter; // bad: native is not at the crate root
// use core::iter; // bad: core is not at the crate root
use self::baz::foobaz; // good: self refers to module 'foo'
use foo::bar::foobar; // good: foo is at crate root

Expand Down
2 changes: 1 addition & 1 deletion src/doc/trpl/comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ When writing doc comments, adding sections for any arguments, return values,
and providing some examples of usage is very, very helpful. Don't worry about
the `&str`, we'll get to it soon.

You can use the [`rustdoc`](../rustdoc.html) tool to generate HTML documentation
You can use the [`rustdoc`](documentation.html) tool to generate HTML documentation
from these doc comments.
4 changes: 2 additions & 2 deletions src/libcollections/btree/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,13 @@ pub struct IntoIter<K, V> {
/// An iterator over a BTreeMap's keys.
#[stable(feature = "rust1", since = "1.0.0")]
pub struct Keys<'a, K: 'a, V: 'a> {
inner: Map<(&'a K, &'a V), &'a K, Iter<'a, K, V>, fn((&'a K, &'a V)) -> &'a K>
inner: Map<Iter<'a, K, V>, fn((&'a K, &'a V)) -> &'a K>
}

/// An iterator over a BTreeMap's values.
#[stable(feature = "rust1", since = "1.0.0")]
pub struct Values<'a, K: 'a, V: 'a> {
inner: Map<(&'a K, &'a V), &'a V, Iter<'a, K, V>, fn((&'a K, &'a V)) -> &'a V>
inner: Map<Iter<'a, K, V>, fn((&'a K, &'a V)) -> &'a V>
}

/// An iterator over a sub-range of BTreeMap's entries.
Expand Down
20 changes: 10 additions & 10 deletions src/libcollections/btree/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,40 +45,40 @@ pub struct Iter<'a, T: 'a> {
/// An owning iterator over a BTreeSet's items.
#[stable(feature = "rust1", since = "1.0.0")]
pub struct IntoIter<T> {
iter: Map<(T, ()), T, ::btree_map::IntoIter<T, ()>, fn((T, ())) -> T>
iter: Map<::btree_map::IntoIter<T, ()>, fn((T, ())) -> T>
}

/// An iterator over a sub-range of BTreeSet's items.
pub struct Range<'a, T: 'a> {
iter: Map<(&'a T, &'a ()), &'a T, ::btree_map::Range<'a, T, ()>, fn((&'a T, &'a ())) -> &'a T>
iter: Map<::btree_map::Range<'a, T, ()>, fn((&'a T, &'a ())) -> &'a T>
}

/// A lazy iterator producing elements in the set difference (in-order).
#[stable(feature = "rust1", since = "1.0.0")]
pub struct Difference<'a, T:'a> {
a: Peekable<&'a T, Iter<'a, T>>,
b: Peekable<&'a T, Iter<'a, T>>,
a: Peekable<Iter<'a, T>>,
b: Peekable<Iter<'a, T>>,
}

/// A lazy iterator producing elements in the set symmetric difference (in-order).
#[stable(feature = "rust1", since = "1.0.0")]
pub struct SymmetricDifference<'a, T:'a> {
a: Peekable<&'a T, Iter<'a, T>>,
b: Peekable<&'a T, Iter<'a, T>>,
a: Peekable<Iter<'a, T>>,
b: Peekable<Iter<'a, T>>,
}

/// A lazy iterator producing elements in the set intersection (in-order).
#[stable(feature = "rust1", since = "1.0.0")]
pub struct Intersection<'a, T:'a> {
a: Peekable<&'a T, Iter<'a, T>>,
b: Peekable<&'a T, Iter<'a, T>>,
a: Peekable<Iter<'a, T>>,
b: Peekable<Iter<'a, T>>,
}

/// A lazy iterator producing elements in the set union (in-order).
#[stable(feature = "rust1", since = "1.0.0")]
pub struct Union<'a, T:'a> {
a: Peekable<&'a T, Iter<'a, T>>,
b: Peekable<&'a T, Iter<'a, T>>,
a: Peekable<Iter<'a, T>>,
b: Peekable<Iter<'a, T>>,
}

impl<T: Ord> BTreeSet<T> {
Expand Down
8 changes: 2 additions & 6 deletions src/libcollections/vec_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ double_ended_iterator! { impl IterMut -> (uint, &'a mut V), as_mut }
/// An iterator over the keys of a map.
#[stable(feature = "rust1", since = "1.0.0")]
pub struct Keys<'a, V: 'a> {
iter: Map<(uint, &'a V), uint, Iter<'a, V>, fn((uint, &'a V)) -> uint>
iter: Map<Iter<'a, V>, fn((uint, &'a V)) -> uint>
}

// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
Expand All @@ -702,7 +702,7 @@ impl<'a, V> Clone for Keys<'a, V> {
/// An iterator over the values of a map.
#[stable(feature = "rust1", since = "1.0.0")]
pub struct Values<'a, V: 'a> {
iter: Map<(uint, &'a V), &'a V, Iter<'a, V>, fn((uint, &'a V)) -> &'a V>
iter: Map<Iter<'a, V>, fn((uint, &'a V)) -> &'a V>
}

// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
Expand All @@ -718,17 +718,13 @@ impl<'a, V> Clone for Values<'a, V> {
#[stable(feature = "rust1", since = "1.0.0")]
pub struct IntoIter<V> {
iter: FilterMap<
(uint, Option<V>),
(uint, V),
Enumerate<vec::IntoIter<Option<V>>>,
fn((uint, Option<V>)) -> Option<(uint, V)>>
}

#[unstable(feature = "collections")]
pub struct Drain<'a, V> {
iter: FilterMap<
(uint, Option<V>),
(uint, V),
Enumerate<vec::Drain<'a, Option<V>>>,
fn((uint, Option<V>)) -> Option<(uint, V)>>
}
Expand Down
20 changes: 20 additions & 0 deletions src/libcore/atomic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ impl AtomicIsize {
/// let atomic_forty_two = AtomicIsize::new(42);
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
pub fn new(v: isize) -> AtomicIsize {
AtomicIsize {v: UnsafeCell::new(v)}
}
Expand All @@ -437,6 +438,7 @@ impl AtomicIsize {
/// let value = some_isize.load(Ordering::Relaxed);
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
pub fn load(&self, order: Ordering) -> isize {
unsafe { atomic_load(self.v.get(), order) }
}
Expand All @@ -459,6 +461,7 @@ impl AtomicIsize {
///
/// Panics if `order` is `Acquire` or `AcqRel`.
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
pub fn store(&self, val: isize, order: Ordering) {
unsafe { atomic_store(self.v.get(), val, order); }
}
Expand All @@ -477,6 +480,7 @@ impl AtomicIsize {
/// let value = some_isize.swap(10, Ordering::Relaxed);
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
pub fn swap(&self, val: isize, order: Ordering) -> isize {
unsafe { atomic_swap(self.v.get(), val, order) }
}
Expand All @@ -498,6 +502,7 @@ impl AtomicIsize {
/// let value = some_isize.compare_and_swap(5, 10, Ordering::Relaxed);
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
pub fn compare_and_swap(&self, old: isize, new: isize, order: Ordering) -> isize {
unsafe { atomic_compare_and_swap(self.v.get(), old, new, order) }
}
Expand All @@ -514,6 +519,7 @@ impl AtomicIsize {
/// assert_eq!(10, foo.load(Ordering::SeqCst));
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
pub fn fetch_add(&self, val: isize, order: Ordering) -> isize {
unsafe { atomic_add(self.v.get(), val, order) }
}
Expand All @@ -530,6 +536,7 @@ impl AtomicIsize {
/// assert_eq!(-10, foo.load(Ordering::SeqCst));
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
pub fn fetch_sub(&self, val: isize, order: Ordering) -> isize {
unsafe { atomic_sub(self.v.get(), val, order) }
}
Expand All @@ -545,6 +552,7 @@ impl AtomicIsize {
/// assert_eq!(0b101101, foo.fetch_and(0b110011, Ordering::SeqCst));
/// assert_eq!(0b100001, foo.load(Ordering::SeqCst));
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
pub fn fetch_and(&self, val: isize, order: Ordering) -> isize {
unsafe { atomic_and(self.v.get(), val, order) }
}
Expand All @@ -560,6 +568,7 @@ impl AtomicIsize {
/// assert_eq!(0b101101, foo.fetch_or(0b110011, Ordering::SeqCst));
/// assert_eq!(0b111111, foo.load(Ordering::SeqCst));
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
pub fn fetch_or(&self, val: isize, order: Ordering) -> isize {
unsafe { atomic_or(self.v.get(), val, order) }
}
Expand All @@ -575,6 +584,7 @@ impl AtomicIsize {
/// assert_eq!(0b101101, foo.fetch_xor(0b110011, Ordering::SeqCst));
/// assert_eq!(0b011110, foo.load(Ordering::SeqCst));
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
pub fn fetch_xor(&self, val: isize, order: Ordering) -> isize {
unsafe { atomic_xor(self.v.get(), val, order) }
}
Expand All @@ -592,6 +602,7 @@ impl AtomicUsize {
/// let atomic_forty_two = AtomicUsize::new(42);
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
pub fn new(v: usize) -> AtomicUsize {
AtomicUsize { v: UnsafeCell::new(v) }
}
Expand All @@ -614,6 +625,7 @@ impl AtomicUsize {
/// let value = some_usize.load(Ordering::Relaxed);
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
pub fn load(&self, order: Ordering) -> usize {
unsafe { atomic_load(self.v.get(), order) }
}
Expand All @@ -636,6 +648,7 @@ impl AtomicUsize {
///
/// Panics if `order` is `Acquire` or `AcqRel`.
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
pub fn store(&self, val: usize, order: Ordering) {
unsafe { atomic_store(self.v.get(), val, order); }
}
Expand All @@ -654,6 +667,7 @@ impl AtomicUsize {
/// let value = some_usize.swap(10, Ordering::Relaxed);
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
pub fn swap(&self, val: usize, order: Ordering) -> usize {
unsafe { atomic_swap(self.v.get(), val, order) }
}
Expand All @@ -675,6 +689,7 @@ impl AtomicUsize {
/// let value = some_usize.compare_and_swap(5, 10, Ordering::Relaxed);
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
pub fn compare_and_swap(&self, old: usize, new: usize, order: Ordering) -> usize {
unsafe { atomic_compare_and_swap(self.v.get(), old, new, order) }
}
Expand All @@ -691,6 +706,7 @@ impl AtomicUsize {
/// assert_eq!(10, foo.load(Ordering::SeqCst));
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
pub fn fetch_add(&self, val: usize, order: Ordering) -> usize {
unsafe { atomic_add(self.v.get(), val, order) }
}
Expand All @@ -707,6 +723,7 @@ impl AtomicUsize {
/// assert_eq!(0, foo.load(Ordering::SeqCst));
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
pub fn fetch_sub(&self, val: usize, order: Ordering) -> usize {
unsafe { atomic_sub(self.v.get(), val, order) }
}
Expand All @@ -722,6 +739,7 @@ impl AtomicUsize {
/// assert_eq!(0b101101, foo.fetch_and(0b110011, Ordering::SeqCst));
/// assert_eq!(0b100001, foo.load(Ordering::SeqCst));
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
pub fn fetch_and(&self, val: usize, order: Ordering) -> usize {
unsafe { atomic_and(self.v.get(), val, order) }
}
Expand All @@ -737,6 +755,7 @@ impl AtomicUsize {
/// assert_eq!(0b101101, foo.fetch_or(0b110011, Ordering::SeqCst));
/// assert_eq!(0b111111, foo.load(Ordering::SeqCst));
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
pub fn fetch_or(&self, val: usize, order: Ordering) -> usize {
unsafe { atomic_or(self.v.get(), val, order) }
}
Expand All @@ -752,6 +771,7 @@ impl AtomicUsize {
/// assert_eq!(0b101101, foo.fetch_xor(0b110011, Ordering::SeqCst));
/// assert_eq!(0b011110, foo.load(Ordering::SeqCst));
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
pub fn fetch_xor(&self, val: usize, order: Ordering) -> usize {
unsafe { atomic_xor(self.v.get(), val, order) }
}
Expand Down
Loading