Skip to content

Commit 0d20320

Browse files
committed
---
yaml --- r: 216575 b: refs/heads/stable c: 35149bf h: refs/heads/master i: 216573: 17865f6 216571: e41e05a 216567: bc74139 216559: eba349f 216543: 9fa2ae3 216511: c39a3af 216447: 95c7a9e 216319: f42ac85 216063: 4c5ba02 v: v3
1 parent 189ebad commit 0d20320

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

+156
-751
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ refs/heads/tmp: 378a370ff2057afeb1eae86eb6e78c476866a4a6
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: a5286998df566e736b32f6795bfc3803bdaf453d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: b8fedad89b8ea7af2062a581428e1999bf3dfac7
32+
refs/heads/stable: 35149bf1cec8707c186e324bf858f7bb9f2692e8
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375

branches/stable/src/compiletest/compiletest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ pub fn test_opts(config: &Config) -> test::TestOpts {
269269
run_ignored: config.run_ignored,
270270
logfile: config.logfile.clone(),
271271
run_tests: true,
272-
bench_benchmarks: true,
272+
run_benchmarks: true,
273273
nocapture: env::var("RUST_TEST_NOCAPTURE").is_ok(),
274274
color: test::AutoColor,
275275
}

branches/stable/src/doc/reference.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2044,21 +2044,21 @@ A complete list of the built-in language items will be added in the future.
20442044

20452045
### Inline attributes
20462046

2047-
The inline attribute suggests that the compiler should place a copy of
2048-
the function or static in the caller, rather than generating code to
2049-
call the function or access the static where it is defined.
2047+
The inline attribute is used to suggest to the compiler to perform an inline
2048+
expansion and place a copy of the function or static in the caller rather than
2049+
generating code to call the function or access the static where it is defined.
20502050

20512051
The compiler automatically inlines functions based on internal heuristics.
2052-
Incorrectly inlining functions can actually make the program slower, so it
2052+
Incorrectly inlining functions can actually making the program slower, so it
20532053
should be used with care.
20542054

20552055
Immutable statics are always considered inlineable unless marked with
20562056
`#[inline(never)]`. It is undefined whether two different inlineable statics
20572057
have the same memory address. In other words, the compiler is free to collapse
20582058
duplicate inlineable statics together.
20592059

2060-
`#[inline]` and `#[inline(always)]` always cause the function to be serialized
2061-
into the crate metadata to allow cross-crate inlining.
2060+
`#[inline]` and `#[inline(always)]` always causes the function to be serialized
2061+
into crate metadata to allow cross-crate inlining.
20622062

20632063
There are three different types of inline attributes:
20642064

branches/stable/src/doc/trpl/README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,6 @@ want to dive in with a project, or ‘Syntax and Semantics’ if you prefer to
4040
start small, and learn a single concept thoroughly before moving onto the next.
4141
Copious cross-linking connects these parts together.
4242

43-
### Contributing
44-
45-
The source files from which this book is generated can be found on Github:
46-
[github.com/rust-lang/rust/tree/master/src/doc/trpl](https://github.com/rust-lang/rust/tree/master/src/doc/trpl)
47-
4843
## A brief introduction to Rust
4944

5045
Is Rust a language you might be interested in? Let’s examine a few small code

branches/stable/src/doc/trpl/SUMMARY.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,5 @@
6464
* [Benchmark Tests](benchmark-tests.md)
6565
* [Box Syntax and Patterns](box-syntax-and-patterns.md)
6666
* [Slice Patterns](slice-patterns.md)
67-
* [Associated Constants](associated-constants.md)
6867
* [Glossary](glossary.md)
6968
* [Academic Research](academic-research.md)

branches/stable/src/doc/trpl/associated-constants.md

Lines changed: 0 additions & 79 deletions
This file was deleted.

branches/stable/src/doc/trpl/error-handling.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ struct Info {
252252
}
253253

254254
fn write_info(info: &Info) -> io::Result<()> {
255-
let mut file = File::create("my_best_friends.txt").unwrap();
255+
let mut file = File::open("my_best_friends.txt").unwrap();
256256

257257
if let Err(e) = writeln!(&mut file, "name: {}", info.name) {
258258
return Err(e)
@@ -282,7 +282,7 @@ struct Info {
282282
}
283283

284284
fn write_info(info: &Info) -> io::Result<()> {
285-
let mut file = try!(File::create("my_best_friends.txt"));
285+
let mut file = try!(File::open("my_best_friends.txt"));
286286

287287
try!(writeln!(&mut file, "name: {}", info.name));
288288
try!(writeln!(&mut file, "age: {}", info.age));

branches/stable/src/libcollections/vec.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1777,11 +1777,6 @@ impl<T> Iterator for IntoIter<T> {
17771777
let exact = diff / (if size == 0 {1} else {size});
17781778
(exact, Some(exact))
17791779
}
1780-
1781-
#[inline]
1782-
fn count(self) -> usize {
1783-
self.size_hint().0
1784-
}
17851780
}
17861781

17871782
#[stable(feature = "rust1", since = "1.0.0")]

branches/stable/src/libcollectionstest/vec.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -542,11 +542,6 @@ fn test_split_off() {
542542
assert_eq!(vec2, [5, 6]);
543543
}
544544

545-
#[test]
546-
fn test_into_iter_count() {
547-
assert_eq!(vec![1, 2, 3].into_iter().count(), 3);
548-
}
549-
550545
#[bench]
551546
fn bench_new(b: &mut Bencher) {
552547
b.iter(|| {

branches/stable/src/libcore/cell.rs

Lines changed: 27 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144
use clone::Clone;
145145
use cmp::PartialEq;
146146
use default::Default;
147-
use marker::{Copy, Send, Sync, Sized};
147+
use marker::{Copy, Send, Sync};
148148
use ops::{Deref, DerefMut, Drop};
149149
use option::Option;
150150
use option::Option::{None, Some};
@@ -266,9 +266,9 @@ impl<T:PartialEq + Copy> PartialEq for Cell<T> {
266266
///
267267
/// See the [module-level documentation](index.html) for more.
268268
#[stable(feature = "rust1", since = "1.0.0")]
269-
pub struct RefCell<T: ?Sized> {
270-
borrow: Cell<BorrowFlag>,
269+
pub struct RefCell<T> {
271270
value: UnsafeCell<T>,
271+
borrow: Cell<BorrowFlag>,
272272
}
273273

274274
/// An enumeration of values returned from the `state` method on a `RefCell<T>`.
@@ -328,9 +328,7 @@ impl<T> RefCell<T> {
328328
debug_assert!(self.borrow.get() == UNUSED);
329329
unsafe { self.value.into_inner() }
330330
}
331-
}
332331

333-
impl<T: ?Sized> RefCell<T> {
334332
/// Query the current state of this `RefCell`
335333
///
336334
/// The returned value can be dispatched on to determine if a call to
@@ -451,7 +449,7 @@ impl<T: ?Sized> RefCell<T> {
451449
}
452450

453451
#[stable(feature = "rust1", since = "1.0.0")]
454-
unsafe impl<T: ?Sized> Send for RefCell<T> where T: Send {}
452+
unsafe impl<T> Send for RefCell<T> where T: Send {}
455453

456454
#[stable(feature = "rust1", since = "1.0.0")]
457455
impl<T: Clone> Clone for RefCell<T> {
@@ -471,7 +469,7 @@ impl<T:Default> Default for RefCell<T> {
471469
}
472470

473471
#[stable(feature = "rust1", since = "1.0.0")]
474-
impl<T: ?Sized + PartialEq> PartialEq for RefCell<T> {
472+
impl<T: PartialEq> PartialEq for RefCell<T> {
475473
#[inline]
476474
fn eq(&self, other: &RefCell<T>) -> bool {
477475
*self.borrow() == *other.borrow()
@@ -521,15 +519,15 @@ impl<'b> Clone for BorrowRef<'b> {
521519
///
522520
/// See the [module-level documentation](index.html) for more.
523521
#[stable(feature = "rust1", since = "1.0.0")]
524-
pub struct Ref<'b, T: ?Sized + 'b> {
522+
pub struct Ref<'b, T:'b> {
525523
// FIXME #12808: strange name to try to avoid interfering with
526524
// field accesses of the contained type via Deref
527525
_value: &'b T,
528526
_borrow: BorrowRef<'b>,
529527
}
530528

531529
#[stable(feature = "rust1", since = "1.0.0")]
532-
impl<'b, T: ?Sized> Deref for Ref<'b, T> {
530+
impl<'b, T> Deref for Ref<'b, T> {
533531
type Target = T;
534532

535533
#[inline]
@@ -584,15 +582,15 @@ impl<'b> BorrowRefMut<'b> {
584582
///
585583
/// See the [module-level documentation](index.html) for more.
586584
#[stable(feature = "rust1", since = "1.0.0")]
587-
pub struct RefMut<'b, T: ?Sized + 'b> {
585+
pub struct RefMut<'b, T:'b> {
588586
// FIXME #12808: strange name to try to avoid interfering with
589587
// field accesses of the contained type via Deref
590588
_value: &'b mut T,
591589
_borrow: BorrowRefMut<'b>,
592590
}
593591

594592
#[stable(feature = "rust1", since = "1.0.0")]
595-
impl<'b, T: ?Sized> Deref for RefMut<'b, T> {
593+
impl<'b, T> Deref for RefMut<'b, T> {
596594
type Target = T;
597595

598596
#[inline]
@@ -602,7 +600,7 @@ impl<'b, T: ?Sized> Deref for RefMut<'b, T> {
602600
}
603601

604602
#[stable(feature = "rust1", since = "1.0.0")]
605-
impl<'b, T: ?Sized> DerefMut for RefMut<'b, T> {
603+
impl<'b, T> DerefMut for RefMut<'b, T> {
606604
#[inline]
607605
fn deref_mut<'a>(&'a mut self) -> &'a mut T {
608606
self._value
@@ -635,7 +633,7 @@ impl<'b, T: ?Sized> DerefMut for RefMut<'b, T> {
635633
/// recommended to access its fields directly, `get` should be used instead.
636634
#[lang="unsafe_cell"]
637635
#[stable(feature = "rust1", since = "1.0.0")]
638-
pub struct UnsafeCell<T: ?Sized> {
636+
pub struct UnsafeCell<T> {
639637
/// Wrapped value
640638
///
641639
/// This field should not be accessed directly, it is made public for static
@@ -644,7 +642,7 @@ pub struct UnsafeCell<T: ?Sized> {
644642
pub value: T,
645643
}
646644

647-
impl<T: ?Sized> !Sync for UnsafeCell<T> {}
645+
impl<T> !Sync for UnsafeCell<T> {}
648646

649647
impl<T> UnsafeCell<T> {
650648
/// Constructs a new instance of `UnsafeCell` which will wrap the specified
@@ -666,12 +664,7 @@ impl<T> UnsafeCell<T> {
666664
UnsafeCell { value: value }
667665
}
668666

669-
/// Unwraps the value.
670-
///
671-
/// # Unsafety
672-
///
673-
/// This function is unsafe because there is no guarantee that this or other threads are
674-
/// currently inspecting the inner value.
667+
/// Gets a mutable pointer to the wrapped value.
675668
///
676669
/// # Examples
677670
///
@@ -680,15 +673,22 @@ impl<T> UnsafeCell<T> {
680673
///
681674
/// let uc = UnsafeCell::new(5);
682675
///
683-
/// let five = unsafe { uc.into_inner() };
676+
/// let five = uc.get();
684677
/// ```
685678
#[inline]
686679
#[stable(feature = "rust1", since = "1.0.0")]
687-
pub unsafe fn into_inner(self) -> T { self.value }
688-
}
680+
pub fn get(&self) -> *mut T {
681+
// FIXME(#23542) Replace with type ascription.
682+
#![allow(trivial_casts)]
683+
&self.value as *const T as *mut T
684+
}
689685

690-
impl<T: ?Sized> UnsafeCell<T> {
691-
/// Gets a mutable pointer to the wrapped value.
686+
/// Unwraps the value.
687+
///
688+
/// # Unsafety
689+
///
690+
/// This function is unsafe because there is no guarantee that this or other threads are
691+
/// currently inspecting the inner value.
692692
///
693693
/// # Examples
694694
///
@@ -697,14 +697,9 @@ impl<T: ?Sized> UnsafeCell<T> {
697697
///
698698
/// let uc = UnsafeCell::new(5);
699699
///
700-
/// let five = uc.get();
700+
/// let five = unsafe { uc.into_inner() };
701701
/// ```
702702
#[inline]
703703
#[stable(feature = "rust1", since = "1.0.0")]
704-
pub fn get(&self) -> *mut T {
705-
// FIXME(#23542) Replace with type ascription.
706-
#![allow(trivial_casts)]
707-
&self.value as *const T as *mut T
708-
}
709-
704+
pub unsafe fn into_inner(self) -> T { self.value }
710705
}

branches/stable/src/libcore/fmt/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,7 +1062,7 @@ impl<T: Copy + Debug> Debug for Cell<T> {
10621062
}
10631063

10641064
#[stable(feature = "rust1", since = "1.0.0")]
1065-
impl<T: ?Sized + Debug> Debug for RefCell<T> {
1065+
impl<T: Debug> Debug for RefCell<T> {
10661066
fn fmt(&self, f: &mut Formatter) -> Result {
10671067
match self.borrow_state() {
10681068
BorrowState::Unused | BorrowState::Reading => {
@@ -1074,14 +1074,14 @@ impl<T: ?Sized + Debug> Debug for RefCell<T> {
10741074
}
10751075

10761076
#[stable(feature = "rust1", since = "1.0.0")]
1077-
impl<'b, T: ?Sized + Debug> Debug for Ref<'b, T> {
1077+
impl<'b, T: Debug> Debug for Ref<'b, T> {
10781078
fn fmt(&self, f: &mut Formatter) -> Result {
10791079
Debug::fmt(&**self, f)
10801080
}
10811081
}
10821082

10831083
#[stable(feature = "rust1", since = "1.0.0")]
1084-
impl<'b, T: ?Sized + Debug> Debug for RefMut<'b, T> {
1084+
impl<'b, T: Debug> Debug for RefMut<'b, T> {
10851085
fn fmt(&self, f: &mut Formatter) -> Result {
10861086
Debug::fmt(&*(self.deref()), f)
10871087
}

0 commit comments

Comments
 (0)