Skip to content

Commit e4e0959

Browse files
committed
---
yaml --- r: 272199 b: refs/heads/auto c: 28e45bb h: refs/heads/master i: 272197: eeb8450 272195: 8465503 272191: 4b60fd2
1 parent ee715f4 commit e4e0959

File tree

35 files changed

+601
-437
lines changed

35 files changed

+601
-437
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
88
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
99
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1010
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
11-
refs/heads/auto: cf0a01a161ebbf01230f2e12b7ec8ce9544d4d5f
11+
refs/heads/auto: 28e45bb96a2d6e956cc2e8cd1a8686a3de97eb25
1212
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1313
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
1414
refs/tags/0.2: 1754d02027f2924bed83b0160ee340c7f41d5ea1

branches/auto/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,10 @@ To contribute to Rust, please see [CONTRIBUTING](CONTRIBUTING.md).
177177
Rust has an [IRC] culture and most real-time collaboration happens in a
178178
variety of channels on Mozilla's IRC network, irc.mozilla.org. The
179179
most popular channel is [#rust], a venue for general discussion about
180-
Rust. And a good place to ask for help would be [#rust-beginners].
180+
Rust, and a good place to ask for help.
181181
182182
[IRC]: https://en.wikipedia.org/wiki/Internet_Relay_Chat
183183
[#rust]: irc://irc.mozilla.org/rust
184-
[#rust-beginners]: irc://irc.mozilla.org/rust-beginners
185184
186185
## License
187186

branches/auto/src/doc/book/getting-started.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -164,15 +164,13 @@ installed. Doing so will depend on your specific system, consult its
164164
documentation for more details.
165165

166166
If not, there are a number of places where we can get help. The easiest is
167-
[the #rust-beginners IRC channel on irc.mozilla.org][irc-beginners] and for
168-
general discussion [the #rust IRC channel on irc.mozilla.org][irc], which we
169-
can access through [Mibbit][mibbit]. Then we'll be chatting with other
170-
Rustaceans (a silly nickname we call ourselves) who can help us out. Other great
171-
resources include [the user’s forum][users] and [Stack Overflow][stackoverflow].
167+
[the #rust IRC channel on irc.mozilla.org][irc], which we can access through
168+
[Mibbit][mibbit]. Click that link, and we'll be chatting with other Rustaceans
169+
(a silly nickname we call ourselves) who can help us out. Other great resources
170+
include [the user’s forum][users], and [Stack Overflow][stackoverflow].
172171

173-
[irc-beginners]: irc://irc.mozilla.org/#rust-beginners
174172
[irc]: irc://irc.mozilla.org/#rust
175-
[mibbit]: http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust-beginners,%23rust
173+
[mibbit]: http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust
176174
[users]: https://users.rust-lang.org/
177175
[stackoverflow]: http://stackoverflow.com/questions/tagged/rust
178176

branches/auto/src/doc/nomicon/vec.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
To bring everything together, we're going to write `std::Vec` from scratch.
44
Because all the best tools for writing unsafe code are unstable, this
5-
project will only work on nightly (as of Rust 1.9.0). With the exception of the
5+
project will only work on nightly (as of Rust 1.2.0). With the exception of the
66
allocator API, much of the unstable code we'll use is expected to be stabilized
77
in a similar form as it is today.
88

branches/auto/src/libcollections/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
#![feature(placement_new_protocol)]
4949
#![feature(shared)]
5050
#![feature(slice_patterns)]
51-
#![feature(specialization)]
5251
#![feature(staged_api)]
5352
#![feature(step_by)]
5453
#![feature(str_char)]

branches/auto/src/libcollections/string.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1755,7 +1755,7 @@ pub trait ToString {
17551755
#[stable(feature = "rust1", since = "1.0.0")]
17561756
impl<T: fmt::Display + ?Sized> ToString for T {
17571757
#[inline]
1758-
default fn to_string(&self) -> String {
1758+
fn to_string(&self) -> String {
17591759
use core::fmt::Write;
17601760
let mut buf = String::new();
17611761
let _ = buf.write_fmt(format_args!("{}", self));
@@ -1764,14 +1764,6 @@ impl<T: fmt::Display + ?Sized> ToString for T {
17641764
}
17651765
}
17661766

1767-
#[stable(feature = "str_to_string_specialization", since = "1.9.0")]
1768-
impl ToString for str {
1769-
#[inline]
1770-
fn to_string(&self) -> String {
1771-
String::from(self)
1772-
}
1773-
}
1774-
17751767
#[stable(feature = "rust1", since = "1.0.0")]
17761768
impl AsRef<str> for String {
17771769
#[inline]

branches/auto/src/libcore/cell.rs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@
147147
use clone::Clone;
148148
use cmp::{PartialEq, Eq};
149149
use default::Default;
150-
use marker::{Copy, Send, Sync, Sized, Unsize};
151-
use ops::{Deref, DerefMut, Drop, FnOnce, CoerceUnsized};
150+
use marker::{Copy, Send, Sync, Sized};
151+
use ops::{Deref, DerefMut, Drop, FnOnce};
152152
use option::Option;
153153
use option::Option::{None, Some};
154154

@@ -216,6 +216,10 @@ impl<T:Copy> Cell<T> {
216216

217217
/// Returns a reference to the underlying `UnsafeCell`.
218218
///
219+
/// # Safety
220+
///
221+
/// This function is `unsafe` because `UnsafeCell`'s field is public.
222+
///
219223
/// # Examples
220224
///
221225
/// ```
@@ -225,11 +229,11 @@ impl<T:Copy> Cell<T> {
225229
///
226230
/// let c = Cell::new(5);
227231
///
228-
/// let uc = c.as_unsafe_cell();
232+
/// let uc = unsafe { c.as_unsafe_cell() };
229233
/// ```
230234
#[inline]
231235
#[unstable(feature = "as_unsafe_cell", issue = "27708")]
232-
pub fn as_unsafe_cell(&self) -> &UnsafeCell<T> {
236+
pub unsafe fn as_unsafe_cell(&self) -> &UnsafeCell<T> {
233237
&self.value
234238
}
235239
}
@@ -634,9 +638,6 @@ impl<'b, T: ?Sized> Ref<'b, T> {
634638
}
635639
}
636640

637-
#[unstable(feature = "coerce_unsized", issue = "27732")]
638-
impl<'b, T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Ref<'b, U>> for Ref<'b, T> {}
639-
640641
impl<'b, T: ?Sized> RefMut<'b, T> {
641642
/// Make a new `RefMut` for a component of the borrowed data, e.g. an enum
642643
/// variant.
@@ -769,9 +770,6 @@ impl<'b, T: ?Sized> DerefMut for RefMut<'b, T> {
769770
}
770771
}
771772

772-
#[unstable(feature = "coerce_unsized", issue = "27732")]
773-
impl<'b, T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<RefMut<'b, U>> for RefMut<'b, T> {}
774-
775773
/// The core primitive for interior mutability in Rust.
776774
///
777775
/// `UnsafeCell<T>` is a type that wraps some `T` and indicates unsafe interior operations on the

branches/auto/src/libcore/sync/atomic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ impl AtomicIsize {
695695
unsafe { atomic_compare_exchange(self.v.get(), current, new, success, failure) }
696696
}
697697

698-
/// Stores a value into the `isize` if the current value is the same as the `current` value.
698+
/// Stores a value into the `isize if the current value is the same as the `current` value.
699699
///
700700
/// Unlike `compare_exchange`, this function is allowed to spuriously fail even when the
701701
/// comparison succeeds, which can result in more efficient code on some platforms. The

branches/auto/src/libcoretest/cell.rs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -261,23 +261,3 @@ fn refcell_unsized() {
261261
let comp: &mut [i32] = &mut [4, 2, 5];
262262
assert_eq!(&*cell.borrow(), comp);
263263
}
264-
265-
#[test]
266-
fn refcell_ref_coercion() {
267-
let cell: RefCell<[i32; 3]> = RefCell::new([1, 2, 3]);
268-
{
269-
let mut cellref: RefMut<[i32; 3]> = cell.borrow_mut();
270-
cellref[0] = 4;
271-
let mut coerced: RefMut<[i32]> = cellref;
272-
coerced[2] = 5;
273-
}
274-
{
275-
let comp: &mut [i32] = &mut [4, 2, 5];
276-
let cellref: Ref<[i32; 3]> = cell.borrow();
277-
assert_eq!(&*cellref, comp);
278-
let coerced: Ref<[i32]> = cellref;
279-
assert_eq!(&*coerced, comp);
280-
}
281-
}
282-
283-

branches/auto/src/librustc/diagnostics.rs

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,47 +1033,6 @@ fn main() {
10331033
some_func(5i32); // ok!
10341034
}
10351035
```
1036-
1037-
Or in a generic context, an erroneous code example would look like:
1038-
```compile_fail
1039-
fn some_func<T>(foo: T) {
1040-
println!("{:?}", foo); // error: the trait `core::fmt::Debug` is not
1041-
// implemented for the type `T`
1042-
}
1043-
1044-
fn main() {
1045-
// We now call the method with the i32 type,
1046-
// which *does* implement the Debug trait.
1047-
some_func(5i32);
1048-
}
1049-
```
1050-
1051-
Note that the error here is in the definition of the generic function: Although
1052-
we only call it with a parameter that does implement `Debug`, the compiler
1053-
still rejects the function: It must work with all possible input types. In
1054-
order to make this example compile, we need to restrict the generic type we're
1055-
accepting:
1056-
```
1057-
use std::fmt;
1058-
1059-
// Restrict the input type to types that implement Debug.
1060-
fn some_func<T: fmt::Debug>(foo: T) {
1061-
println!("{:?}", foo);
1062-
}
1063-
1064-
fn main() {
1065-
// Calling the method is still fine, as i32 implements Debug.
1066-
some_func(5i32);
1067-
1068-
// This would fail to compile now:
1069-
// struct WithoutDebug;
1070-
// some_func(WithoutDebug);
1071-
}
1072-
1073-
Rust only looks at the signature of the called function, as such it must
1074-
already specify all requirements that will be used for every type parameter.
1075-
```
1076-
10771036
"##,
10781037

10791038
E0281: r##"

branches/auto/src/librustc/front/map/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,14 @@ impl<'ast> Map<'ast> {
581581
}
582582
}
583583

584+
pub fn get_foreign_vis(&self, id: NodeId) -> Visibility {
585+
let vis = self.expect_foreign_item(id).vis; // read recorded by `expect_foreign_item`
586+
match self.find(self.get_parent(id)) { // read recorded by `find`
587+
Some(NodeItem(i)) => vis.inherit_from(i.vis),
588+
_ => vis
589+
}
590+
}
591+
584592
pub fn expect_item(&self, id: NodeId) -> &'ast Item {
585593
match self.find(id) { // read recorded by `find`
586594
Some(NodeItem(item)) => item,

0 commit comments

Comments
 (0)