Skip to content

Commit 17865f6

Browse files
committed
---
yaml --- r: 216573 b: refs/heads/stable c: 75a3e29 h: refs/heads/master i: 216571: e41e05a v: v3
1 parent 70c23f1 commit 17865f6

Some content is hidden

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

53 files changed

+164
-749
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: 0be117e2733423e70bccd8b0a46e8eccd1e1d1cc
32+
refs/heads/stable: 75a3e29042059c7481358816d22f3a06aae53ba6
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::open("my_best_friends.txt").unwrap();
255+
let mut file = File::create("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::open("my_best_friends.txt"));
285+
let mut file = try!(File::create("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/bit.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,13 +210,15 @@ impl BitVec {
210210
assert_eq!(self.len(), other.len());
211211
// This could theoretically be a `debug_assert!`.
212212
assert_eq!(self.storage.len(), other.storage.len());
213-
let mut changed_bits = 0;
213+
let mut changed = false;
214214
for (a, b) in self.blocks_mut().zip(other.blocks()) {
215215
let w = op(*a, b);
216-
changed_bits |= *a ^ w;
217-
*a = w;
216+
if *a != w {
217+
changed = true;
218+
*a = w;
219+
}
218220
}
219-
changed_bits != 0
221+
changed
220222
}
221223

222224
/// Iterator over mutable refs to the underlying blocks of data.

branches/stable/src/libcollections/slice.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,7 +1004,11 @@ pub trait SliceConcatExt<T: ?Sized, U> {
10041004
/// # Examples
10051005
///
10061006
/// ```
1007-
/// assert_eq!(["hello", "world"].concat(), "helloworld");
1007+
/// let v = vec!["hello", "world"];
1008+
///
1009+
/// let s: String = v.concat();
1010+
///
1011+
/// println!("{}", s); // prints "helloworld"
10081012
/// ```
10091013
#[stable(feature = "rust1", since = "1.0.0")]
10101014
fn concat(&self) -> U;
@@ -1014,7 +1018,11 @@ pub trait SliceConcatExt<T: ?Sized, U> {
10141018
/// # Examples
10151019
///
10161020
/// ```
1017-
/// assert_eq!(["hello", "world"].connect(" "), "hello world");
1021+
/// let v = vec!["hello", "world"];
1022+
///
1023+
/// let s: String = v.connect(" ");
1024+
///
1025+
/// println!("{}", s); // prints "hello world"
10181026
/// ```
10191027
#[stable(feature = "rust1", since = "1.0.0")]
10201028
fn connect(&self, sep: &T) -> U;

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(|| {

0 commit comments

Comments
 (0)