Skip to content

Commit e222c58

Browse files
dcampbell24jooert
authored andcommitted
---
yaml --- r: 218806 b: refs/heads/snap-stage3 c: 19cb2a7 h: refs/heads/master v: v3
1 parent 745ad03 commit e222c58

Some content is hidden

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

51 files changed

+309
-869
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: c044791d80ea0dc5c4b57b6030a67b69f8510239
3-
refs/heads/snap-stage3: c7b1f37c595c73ce44ff16d8f0a6c33f27759f9a
3+
refs/heads/snap-stage3: 19cb2a77076657063768e6db342a38933f0ba874
44
refs/heads/try: b53c0f93eedcdedd4fd89bccc5a3a09d1c5cd23e
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/snap-stage3/CONTRIBUTING.md

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,7 @@ feature. We use the 'fork and pull' model described there.
8484
Please make pull requests against the `master` branch.
8585

8686
All pull requests are reviewed by another person. We have a bot,
87-
@rust-highfive, that will automatically assign a random person to review your
88-
request.
87+
@rust-highfive, that will automatically assign a random person to review your request.
8988

9089
If you want to request that a specific person reviews your pull request,
9190
you can add an `r?` to the message. For example, Steve usually reviews
@@ -125,10 +124,6 @@ To save @bors some work, and to get small changes through more quickly, when
125124
the other rollup-eligible patches too, and they'll get tested and merged at
126125
the same time.
127126

128-
To find documentation-related issues, sort by the [A-docs label][adocs].
129-
130-
[adocs]: https://github.com/rust-lang/rust/issues?q=is%3Aopen+is%3Aissue+label%3AA-docs
131-
132127
## Issue Triage
133128

134129
Sometimes, an issue will stay open, even though the bug has been fixed. And
@@ -137,40 +132,8 @@ meantime.
137132

138133
It can be helpful to go through older bug reports and make sure that they are
139134
still valid. Load up an older issue, double check that it's still true, and
140-
leave a comment letting us know if it is or is not. The [least recently
141-
updated sort][lru] is good for finding issues like this.
142-
143-
Contributors with sufficient permissions on the Rust repo can help by adding
144-
labels to triage issues:
145-
146-
* Yellow, **A**-prefixed labels state which **area** of the project an issue
147-
relates to.
148-
149-
* Magenta, **B**-prefixed labels identify bugs which **belong** elsewhere.
150-
151-
* Green, **E**-prefixed labels explain the level of **experience** necessary
152-
to fix the issue.
153-
154-
* Red, **I**-prefixed labels indicate the **importance** of the issue. The
155-
[I-nominated][inom] label indicates that an issue has been nominated for
156-
prioritizing at the next triage meeting.
157-
158-
* Orange, **P**-prefixed labels indicate a bug's **priority**. These labels
159-
are only assigned during triage meetings, and replace the [I-nominated][inom]
160-
label.
161-
162-
* Blue, **T**-prefixed bugs denote which **team** the issue belongs to.
163-
164-
* Dark blue, **beta-** labels track changes which need to be backported into
165-
the beta branches.
166-
167-
* The purple **metabug** label marks lists of bugs collected by other
168-
categories.
169-
170-
If you're looking for somewhere to start, check out the [E-easy][eeasy] tag.
135+
leave a comment letting us know if it is or is not. The [least recently updated sort][lru] is good for finding issues like this.
171136

172-
[inom]: https://github.com/rust-lang/rust/issues?q=is%3Aopen+is%3Aissue+label%3AI-nominated
173-
[eeasy]: https://github.com/rust-lang/rust/issues?q=is%3Aopen+is%3Aissue+label%3AE-easy
174137
[lru]: https://github.com/rust-lang/rust/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-asc
175138

176139
## Out-of-tree Contributions

branches/snap-stage3/src/doc/reference.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3255,8 +3255,8 @@ User-defined types have limited capabilities.
32553255
The primitive types are the following:
32563256

32573257
* The boolean type `bool` with values `true` and `false`.
3258-
* The machine types (integer and floating-point).
3259-
* The machine-dependent integer types.
3258+
* The machine types.
3259+
* The machine-dependent integer and floating-point types.
32603260

32613261
#### Machine types
32623262

branches/snap-stage3/src/doc/style/features/functions-and-methods/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ for any operation that is clearly associated with a particular
2020
type.
2121

2222
Methods have numerous advantages over functions:
23+
2324
* They do not need to be imported or qualified to be used: all you
2425
need is a value of the appropriate type.
2526
* Their invocation performs autoborrowing (including mutable borrows).

branches/snap-stage3/src/doc/trpl/conditional-compilation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ These can nest arbitrarily:
3434
As for how to enable or disable these switches, if you’re using Cargo,
3535
they get set in the [`[features]` section][features] of your `Cargo.toml`:
3636

37-
[features]: http://doc.crates.io/manifest.html#the-%5Bfeatures%5D-section
37+
[features]: http://doc.crates.io/manifest.html#the-[features]-section
3838

3939
```toml
4040
[features]

branches/snap-stage3/src/doc/trpl/glossary.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ In the example above `x` and `y` have arity 2. `z` has arity 3.
1919

2020
When a compiler is compiling your program, it does a number of different
2121
things. One of the things that it does is turn the text of your program into an
22-
‘abstract syntax tree’, or ‘AST’. This tree is a representation of the
22+
‘abstract syntax tree’, or‘AST’. This tree is a representation of the
2323
structure of your program. For example, `2 + 3` can be turned into a tree:
2424

2525
```text

branches/snap-stage3/src/doc/trpl/method-syntax.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Functions are great, but if you want to call a bunch of them on some data, it
44
can be awkward. Consider this code:
55

66
```rust,ignore
7-
baz(bar(foo));
7+
baz(bar(foo)));
88
```
99

1010
We would read this left-to right, and so we see ‘baz bar foo’. But this isn’t the

branches/snap-stage3/src/doc/trpl/traits.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ fn bar<T, K>(x: T, y: K) where T: Clone, K: Clone + Debug {
285285

286286
fn main() {
287287
foo("Hello", "world");
288-
bar("Hello", "world");
288+
bar("Hello", "workd");
289289
}
290290
```
291291

branches/snap-stage3/src/libcollections/vec.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -440,18 +440,14 @@ impl<T> Vec<T> {
440440
}
441441

442442
/// Extracts a slice containing the entire vector.
443-
///
444-
/// Equivalent to `&s[..]`.
445443
#[inline]
446444
#[unstable(feature = "convert",
447445
reason = "waiting on RFC revision")]
448446
pub fn as_slice(&self) -> &[T] {
449447
self
450448
}
451449

452-
/// Extracts a mutable slice of the entire vector.
453-
///
454-
/// Equivalent to `&mut s[..]`.
450+
/// Deprecated: use `&mut s[..]` instead.
455451
#[inline]
456452
#[unstable(feature = "convert",
457453
reason = "waiting on RFC revision")]

branches/snap-stage3/src/libcollectionstest/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#![feature(collections)]
1515
#![feature(collections_drain)]
1616
#![feature(core)]
17-
#![feature(const_fn)]
1817
#![feature(hash)]
1918
#![feature(rand)]
2019
#![feature(rustc_private)]

branches/snap-stage3/src/libcore/cell.rs

Lines changed: 6 additions & 160 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,10 @@
143143
#![stable(feature = "rust1", since = "1.0.0")]
144144

145145
use clone::Clone;
146-
use cmp::{PartialEq, Eq};
146+
use cmp::PartialEq;
147147
use default::Default;
148148
use marker::{Copy, Send, Sync, Sized};
149-
use ops::{Deref, DerefMut, Drop, FnOnce};
149+
use ops::{Deref, DerefMut, Drop};
150150
use option::Option;
151151
use option::Option::{None, Some};
152152

@@ -263,9 +263,6 @@ impl<T:PartialEq + Copy> PartialEq for Cell<T> {
263263
}
264264
}
265265

266-
#[stable(feature = "cell_eq", since = "1.2.0")]
267-
impl<T:Eq + Copy> Eq for Cell<T> {}
268-
269266
/// A mutable memory location with dynamically checked borrow rules
270267
///
271268
/// See the [module-level documentation](index.html) for more.
@@ -276,7 +273,7 @@ pub struct RefCell<T: ?Sized> {
276273
}
277274

278275
/// An enumeration of values returned from the `state` method on a `RefCell<T>`.
279-
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
276+
#[derive(Copy, Clone, PartialEq, Debug)]
280277
#[unstable(feature = "std_misc")]
281278
pub enum BorrowState {
282279
/// The cell is currently being read, there is at least one active `borrow`.
@@ -482,9 +479,6 @@ impl<T: ?Sized + PartialEq> PartialEq for RefCell<T> {
482479
}
483480
}
484481

485-
#[stable(feature = "cell_eq", since = "1.2.0")]
486-
impl<T: ?Sized + Eq> Eq for RefCell<T> {}
487-
488482
struct BorrowRef<'b> {
489483
_borrow: &'b Cell<BorrowFlag>,
490484
}
@@ -551,161 +545,13 @@ impl<'b, T: ?Sized> Deref for Ref<'b, T> {
551545
///
552546
/// A `Clone` implementation would interfere with the widespread
553547
/// use of `r.borrow().clone()` to clone the contents of a `RefCell`.
554-
#[deprecated(since = "1.2.0", reason = "moved to a `Ref::clone` associated function")]
555548
#[unstable(feature = "core",
556549
reason = "likely to be moved to a method, pending language changes")]
557550
#[inline]
558551
pub fn clone_ref<'b, T:Clone>(orig: &Ref<'b, T>) -> Ref<'b, T> {
559-
Ref::clone(orig)
560-
}
561-
562-
impl<'b, T: ?Sized> Ref<'b, T> {
563-
/// Copies a `Ref`.
564-
///
565-
/// The `RefCell` is already immutably borrowed, so this cannot fail.
566-
///
567-
/// This is an associated function that needs to be used as `Ref::clone(...)`.
568-
/// A `Clone` implementation or a method would interfere with the widespread
569-
/// use of `r.borrow().clone()` to clone the contents of a `RefCell`.
570-
#[unstable(feature = "cell_extras",
571-
reason = "likely to be moved to a method, pending language changes")]
572-
#[inline]
573-
pub fn clone(orig: &Ref<'b, T>) -> Ref<'b, T> {
574-
Ref {
575-
_value: orig._value,
576-
_borrow: orig._borrow.clone(),
577-
}
578-
}
579-
580-
/// Make a new `Ref` for a component of the borrowed data.
581-
///
582-
/// The `RefCell` is already immutably borrowed, so this cannot fail.
583-
///
584-
/// This is an associated function that needs to be used as `Ref::map(...)`.
585-
/// A method would interfere with methods of the same name on the contents of a `RefCell`
586-
/// used through `Deref`.
587-
///
588-
/// # Example
589-
///
590-
/// ```
591-
/// # #![feature(cell_extras)]
592-
/// use std::cell::{RefCell, Ref};
593-
///
594-
/// let c = RefCell::new((5, 'b'));
595-
/// let b1: Ref<(u32, char)> = c.borrow();
596-
/// let b2: Ref<u32> = Ref::map(b1, |t| &t.0);
597-
/// assert_eq!(*b2, 5)
598-
/// ```
599-
#[unstable(feature = "cell_extras", reason = "recently added")]
600-
#[inline]
601-
pub fn map<U: ?Sized, F>(orig: Ref<'b, T>, f: F) -> Ref<'b, U>
602-
where F: FnOnce(&T) -> &U
603-
{
604-
Ref {
605-
_value: f(orig._value),
606-
_borrow: orig._borrow,
607-
}
608-
}
609-
610-
/// Make a new `Ref` for a optional component of the borrowed data, e.g. an enum variant.
611-
///
612-
/// The `RefCell` is already immutably borrowed, so this cannot fail.
613-
///
614-
/// This is an associated function that needs to be used as `Ref::filter_map(...)`.
615-
/// A method would interfere with methods of the same name on the contents of a `RefCell`
616-
/// used through `Deref`.
617-
///
618-
/// # Example
619-
///
620-
/// ```
621-
/// # #![feature(cell_extras)]
622-
/// use std::cell::{RefCell, Ref};
623-
///
624-
/// let c = RefCell::new(Ok(5));
625-
/// let b1: Ref<Result<u32, ()>> = c.borrow();
626-
/// let b2: Ref<u32> = Ref::filter_map(b1, |o| o.as_ref().ok()).unwrap();
627-
/// assert_eq!(*b2, 5)
628-
/// ```
629-
#[unstable(feature = "cell_extras", reason = "recently added")]
630-
#[inline]
631-
pub fn filter_map<U: ?Sized, F>(orig: Ref<'b, T>, f: F) -> Option<Ref<'b, U>>
632-
where F: FnOnce(&T) -> Option<&U>
633-
{
634-
f(orig._value).map(move |new| Ref {
635-
_value: new,
636-
_borrow: orig._borrow,
637-
})
638-
}
639-
}
640-
641-
impl<'b, T: ?Sized> RefMut<'b, T> {
642-
/// Make a new `RefMut` for a component of the borrowed data, e.g. an enum variant.
643-
///
644-
/// The `RefCell` is already mutably borrowed, so this cannot fail.
645-
///
646-
/// This is an associated function that needs to be used as `RefMut::map(...)`.
647-
/// A method would interfere with methods of the same name on the contents of a `RefCell`
648-
/// used through `Deref`.
649-
///
650-
/// # Example
651-
///
652-
/// ```
653-
/// # #![feature(cell_extras)]
654-
/// use std::cell::{RefCell, RefMut};
655-
///
656-
/// let c = RefCell::new((5, 'b'));
657-
/// {
658-
/// let b1: RefMut<(u32, char)> = c.borrow_mut();
659-
/// let mut b2: RefMut<u32> = RefMut::map(b1, |t| &mut t.0);
660-
/// assert_eq!(*b2, 5);
661-
/// *b2 = 42;
662-
/// }
663-
/// assert_eq!(*c.borrow(), (42, 'b'));
664-
/// ```
665-
#[unstable(feature = "cell_extras", reason = "recently added")]
666-
#[inline]
667-
pub fn map<U: ?Sized, F>(orig: RefMut<'b, T>, f: F) -> RefMut<'b, U>
668-
where F: FnOnce(&mut T) -> &mut U
669-
{
670-
RefMut {
671-
_value: f(orig._value),
672-
_borrow: orig._borrow,
673-
}
674-
}
675-
676-
/// Make a new `RefMut` for a optional component of the borrowed data, e.g. an enum variant.
677-
///
678-
/// The `RefCell` is already mutably borrowed, so this cannot fail.
679-
///
680-
/// This is an associated function that needs to be used as `RefMut::filter_map(...)`.
681-
/// A method would interfere with methods of the same name on the contents of a `RefCell`
682-
/// used through `Deref`.
683-
///
684-
/// # Example
685-
///
686-
/// ```
687-
/// # #![feature(cell_extras)]
688-
/// use std::cell::{RefCell, RefMut};
689-
///
690-
/// let c = RefCell::new(Ok(5));
691-
/// {
692-
/// let b1: RefMut<Result<u32, ()>> = c.borrow_mut();
693-
/// let mut b2: RefMut<u32> = RefMut::filter_map(b1, |o| o.as_mut().ok()).unwrap();
694-
/// assert_eq!(*b2, 5);
695-
/// *b2 = 42;
696-
/// }
697-
/// assert_eq!(*c.borrow(), Ok(42));
698-
/// ```
699-
#[unstable(feature = "cell_extras", reason = "recently added")]
700-
#[inline]
701-
pub fn filter_map<U: ?Sized, F>(orig: RefMut<'b, T>, f: F) -> Option<RefMut<'b, U>>
702-
where F: FnOnce(&mut T) -> Option<&mut U>
703-
{
704-
let RefMut { _value, _borrow } = orig;
705-
f(_value).map(move |new| RefMut {
706-
_value: new,
707-
_borrow: _borrow,
708-
})
552+
Ref {
553+
_value: orig._value,
554+
_borrow: orig._borrow.clone(),
709555
}
710556
}
711557

0 commit comments

Comments
 (0)