Skip to content

Commit d72167c

Browse files
committed
---
yaml --- r: 274251 b: refs/heads/stable c: a193536 h: refs/heads/master i: 274249: 557fba6 274247: afbdb38
1 parent d5a64f1 commit d72167c

Some content is hidden

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

46 files changed

+882
-801
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: c0221c8897db309a79990367476177b1230bb264
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 74ef5aa45c09695cd3fe53edf6cdef083cca4b5c
32+
refs/heads/stable: a19353643bf9ad38dfa05fbea94c01b795989569
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1512,7 +1512,7 @@ and [`rustc-serialize`](https://crates.io/crates/rustc-serialize) crates.
15121512

15131513
We're not going to spend a lot of time on setting up a project with
15141514
Cargo because it is already covered well in [the Cargo
1515-
section](getting-started.html#hello-cargo) and [Cargo's documentation][14].
1515+
section](../book/hello-cargo.html) and [Cargo's documentation][14].
15161516

15171517
To get started from scratch, run `cargo new --bin city-pop` and make sure your
15181518
`Cargo.toml` looks something like this:

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -604,11 +604,11 @@ This chapter covered the basics that will serve you well through the rest of
604604
this book, and the rest of your time with Rust. Now that you’ve got the tools
605605
down, we'll cover more about the Rust language itself.
606606

607-
You have two options: Dive into a project with ‘[Tutorial: Guessing Game][guessinggame]’, or
607+
You have two options: Dive into a project with ‘[Learn Rust][learnrust]’, or
608608
start from the bottom and work your way up with ‘[Syntax and
609609
Semantics][syntax]’. More experienced systems programmers will probably prefer
610-
Tutorial: Guessing Game’, while those from dynamic backgrounds may enjoy either. Different
610+
Learn Rust’, while those from dynamic backgrounds may enjoy either. Different
611611
people learn differently! Choose whatever’s right for you.
612612

613-
[guessinggame]: guessing-game.html
613+
[learnrust]: learn-rust.html
614614
[syntax]: syntax-and-semantics.html
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
% Learn Rust
2+
3+
Welcome! This chapter has a few tutorials that teach you Rust through building
4+
projects. You’ll get a high-level overview, but we’ll skim over the details.
5+
6+
If you’d prefer a more ‘from the ground up’-style experience, check
7+
out [Syntax and Semantics][ss].
8+
9+
[ss]: syntax-and-semantics.html

branches/stable/src/libcore/cell.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,9 @@ impl<T: ?Sized> RefCell<T> {
414414
///
415415
/// let c = RefCell::new(5);
416416
///
417-
/// let borrowed_five = c.borrow_mut();
417+
/// *c.borrow_mut() = 7;
418+
///
419+
/// assert_eq!(*c.borrow(), 7);
418420
/// ```
419421
///
420422
/// An example of panic:

branches/stable/src/librustc/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ pub mod middle {
108108
pub mod free_region;
109109
pub mod intrinsicck;
110110
pub mod infer;
111+
pub mod implicator;
111112
pub mod lang_items;
112113
pub mod liveness;
113114
pub mod mem_categorization;

branches/stable/src/librustc/middle/cstore.rs

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -267,28 +267,24 @@ impl InlinedItem {
267267

268268
// FIXME: find a better place for this?
269269
pub fn validate_crate_name(sess: Option<&Session>, s: &str, sp: Option<Span>) {
270-
let mut err_count = 0;
271-
{
272-
let mut say = |s: &str| {
273-
match (sp, sess) {
274-
(_, None) => panic!("{}", s),
275-
(Some(sp), Some(sess)) => sess.span_err(sp, s),
276-
(None, Some(sess)) => sess.err(s),
277-
}
278-
err_count += 1;
279-
};
280-
if s.is_empty() {
281-
say("crate name must not be empty");
282-
}
283-
for c in s.chars() {
284-
if c.is_alphanumeric() { continue }
285-
if c == '_' { continue }
286-
say(&format!("invalid character `{}` in crate name: `{}`", c, s));
270+
let say = |s: &str| {
271+
match (sp, sess) {
272+
(_, None) => panic!("{}", s),
273+
(Some(sp), Some(sess)) => sess.span_err(sp, s),
274+
(None, Some(sess)) => sess.err(s),
287275
}
276+
};
277+
if s.is_empty() {
278+
say("crate name must not be empty");
288279
}
289-
290-
if err_count > 0 {
291-
sess.unwrap().abort_if_errors();
280+
for c in s.chars() {
281+
if c.is_alphanumeric() { continue }
282+
if c == '_' { continue }
283+
say(&format!("invalid character `{}` in crate name: `{}`", c, s));
284+
}
285+
match sess {
286+
Some(sess) => sess.abort_if_errors(),
287+
None => {}
292288
}
293289
}
294290

0 commit comments

Comments
 (0)