Skip to content
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

Rollup of 19 pull requests #35834

Closed
wants to merge 41 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
377ae44
explicitly show how iterating over `..` fails
matthew-piziak Aug 15, 2016
c186da7
RangeFull for-loop iteration fails because of IntoIterator
matthew-piziak Aug 16, 2016
95c53b1
accumulate vector and assert for RangeFrom and RangeInclusive examples
matthew-piziak Aug 17, 2016
dcee93a
replace Add example with something more evocative of addition
matthew-piziak Aug 16, 2016
0dc13ee
updated E0395 to new error format
clementmiao Aug 18, 2016
dae1406
updated E0396 to new error format
clementmiao Aug 18, 2016
6976991
Fix tiny spelling mistake in book
ErikUggeldahl Aug 18, 2016
c2b6f72
Add a few doc examples for `std::ffi::OsStr`.
frewsxcv Aug 18, 2016
06302cb
Fix minor typo
cantino Aug 18, 2016
9563f14
demonstrate `RHS != Self` use cases for `Mul` and `Div`
matthew-piziak Aug 18, 2016
469b7fd
split example into three sections with explanation
matthew-piziak Aug 18, 2016
161cb36
Update error message for E0084
pliniker Aug 18, 2016
a516dbb
note that calling drop() explicitly is a compiler error
matthew-piziak Aug 16, 2016
6c66eaa
replace `AddAssign` example with something more evocative of addition
matthew-piziak Aug 18, 2016
ffbb860
Add workaround to detect correct compiler version
Aug 18, 2016
39f318b
Update error format for E0232
mlayne Aug 18, 2016
2128d31
Fix label messages for E0133
wdv4758h Aug 19, 2016
2c190ad
Update block codes' flags
GuillaumeGomez Aug 19, 2016
f551674
Add new error code tests
GuillaumeGomez Aug 19, 2016
06147ac
replace `Not` example with something more evocative
matthew-piziak Aug 19, 2016
c0eccb1
replace `Neg` example with something more evocative of negation
matthew-piziak Aug 19, 2016
3b64cf6
Update E0428 to new format
trixnz Aug 19, 2016
05fb19c
Rollup merge of #35701 - matthew-piziak:rangefull-example-error, r=st…
Aug 19, 2016
cf4432a
Rollup merge of #35709 - matthew-piziak:add-trait-example, r=Guillaum…
Aug 19, 2016
f60a669
Rollup merge of #35710 - matthew-piziak:explicit-drop, r=steveklabnik
Aug 19, 2016
c0c2f33
Rollup merge of #35758 - matthew-piziak:vec-assert-over-println-remai…
Aug 19, 2016
6479cf7
Rollup merge of #35775 - frewsxcv:os-str-doc-examples, r=GuillaumeGomez
Aug 19, 2016
d9e0472
Rollup merge of #35778 - clementmiao:E0395_new_error_format, r=jonath…
Aug 19, 2016
f412ce0
Rollup merge of #35780 - clementmiao:E0396_new_err_format, r=jonathan…
Aug 19, 2016
e687461
Rollup merge of #35781 - ErikUggeldahl:spellingfix, r=apasel422
Aug 19, 2016
598ebb8
Rollup merge of #35794 - cantino:fix-typo, r=apasel422
Aug 19, 2016
d6ab6ed
Rollup merge of #35800 - matthew-piziak:mul-div-examples, r=steveklabnik
Aug 19, 2016
1136f42
Rollup merge of #35804 - pliniker:master, r=jonathandturner
Aug 19, 2016
f21dcbe
Rollup merge of #35806 - matthew-piziak:addassign-example, r=stevekla…
Aug 19, 2016
c63ed55
Rollup merge of #35811 - jonathandturner:fix_rustbuild_version_test, …
Aug 19, 2016
36708fd
Rollup merge of #35812 - mlayne:E0232, r=jonathandturner
Aug 19, 2016
570165e
Rollup merge of #35818 - wdv4758h:E0133-label, r=Aatch
Aug 19, 2016
6e184cc
Rollup merge of #35824 - GuillaumeGomez:err_codes, r=jonathandturner
Aug 19, 2016
063e01c
Rollup merge of #35827 - matthew-piziak:neg-example, r=steveklabnik
Aug 19, 2016
2afa054
Rollup merge of #35830 - matthew-piziak:not-example, r=steveklabnik
Aug 19, 2016
7f75382
Rollup merge of #35831 - trixnz:error-428, r=jonathandturner
Aug 19, 2016
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
8 changes: 7 additions & 1 deletion src/bootstrap/bin/rustc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,19 @@ fn main() {
// is passed (a bit janky...)
let target = args.windows(2).find(|w| &*w[0] == "--target")
.and_then(|w| w[1].to_str());
let version = args.iter().find(|w| &**w == "-vV");

// Build scripts always use the snapshot compiler which is guaranteed to be
// able to produce an executable, whereas intermediate compilers may not
// have the standard library built yet and may not be able to produce an
// executable. Otherwise we just use the standard compiler we're
// bootstrapping with.
let (rustc, libdir) = if target.is_none() {
//
// Also note that cargo will detect the version of the compiler to trigger
// a rebuild when the compiler changes. If this happens, we want to make
// sure to use the actual compiler instead of the snapshot compiler becase
// that's the one that's actually changing.
let (rustc, libdir) = if target.is_none() && version.is_none() {
("RUSTC_SNAPSHOT", "RUSTC_SNAPSHOT_LIBDIR")
} else {
("RUSTC_REAL", "RUSTC_LIBDIR")
Expand Down
4 changes: 2 additions & 2 deletions src/doc/book/borrow-and-asref.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ different. Here’s a quick refresher on what these two traits mean.

# Borrow

The `Borrow` trait is used when you’re writing a datastructure, and you want to
The `Borrow` trait is used when you’re writing a data structure, and you want to
use either an owned or borrowed type as synonymous for some purpose.

For example, [`HashMap`][hashmap] has a [`get` method][get] which uses `Borrow`:
Expand Down Expand Up @@ -86,7 +86,7 @@ We can see how they’re kind of the same: they both deal with owned and borrowe
versions of some type. However, they’re a bit different.

Choose `Borrow` when you want to abstract over different kinds of borrowing, or
when you’re building a datastructure that treats owned and borrowed values in
when you’re building a data structure that treats owned and borrowed values in
equivalent ways, such as hashing and comparison.

Choose `AsRef` when you want to convert something to a reference directly, and
Expand Down
2 changes: 1 addition & 1 deletion src/doc/book/closures.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ fn call_with_ref<'a, F>(some_closure:F) -> i32
where F: Fn(&'a i32) -> i32 {
```

However this presents a problem with in our case. When you specify the explicit
However this presents a problem in our case. When you specify the explicit
lifetime on a function it binds that lifetime to the *entire* scope of the function
instead of just the invocation scope of our closure. This means that the borrow checker
will see a mutable reference in the same lifetime as our immutable reference and fail
Expand Down
25 changes: 5 additions & 20 deletions src/libcore/iter/range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,14 +267,11 @@ impl<A: Step> ops::RangeFrom<A> {
/// # Examples
///
/// ```
/// # #![feature(step_by)]
/// #![feature(step_by)]
///
/// for i in (0u8..).step_by(2).take(10) {
/// println!("{}", i);
/// }
/// let result: Vec<_> = (0..).step_by(2).take(5).collect();
/// assert_eq!(result, vec![0, 2, 4, 6, 8]);
/// ```
///
/// This prints the first ten even natural integers (0 to 18).
#[unstable(feature = "step_by", reason = "recent addition",
issue = "27741")]
pub fn step_by(self, by: A) -> StepBy<A, Self> {
Expand Down Expand Up @@ -319,20 +316,8 @@ impl<A: Step> ops::RangeInclusive<A> {
/// ```
/// #![feature(step_by, inclusive_range_syntax)]
///
/// for i in (0...10).step_by(2) {
/// println!("{}", i);
/// }
/// ```
///
/// This prints:
///
/// ```text
/// 0
/// 2
/// 4
/// 6
/// 8
/// 10
/// let result: Vec<_> = (0...10).step_by(2).collect();
/// assert_eq!(result, vec![0, 2, 4, 6, 8, 10]);
/// ```
#[unstable(feature = "step_by", reason = "recent addition",
issue = "27741")]
Expand Down
Loading