Skip to content

Commit 88055dc

Browse files
author
Paul Faria
committed
---
yaml --- r: 210801 b: refs/heads/try c: 785cbe3 h: refs/heads/master i: 210799: cfa9d06 v: v3
1 parent 725fc6e commit 88055dc

Some content is hidden

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

41 files changed

+659
-589
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 3e561f05c00cd180ec02db4ccab2840a4aba93d2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: ba0e1cd8147d452c356aacb29fb87568ca26f111
5-
refs/heads/try: c3562110d0160a60297b2b3fc26948672a4cb4e3
5+
refs/heads/try: 785cbe3ac9ae6f79055f87edbbb3128c0db2253b
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/src/doc/reference.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3529,9 +3529,7 @@ The actual implementation for each vtable entry can vary on an object-by-object
35293529
basis.
35303530

35313531
Note that for a trait object to be instantiated, the trait must be
3532-
_object-safe_. Object safety rules are defined in [RFC 255].
3533-
3534-
[RFC 255]: https://github.com/rust-lang/rfcs/blob/master/text/0255-object-safety.md
3532+
_object-safe_. Object safety rules are defined in [RFC 255][rfc255].
35353533

35363534
Given a pointer-typed expression `E` of type `&T` or `Box<T>`, where `T`
35373535
implements trait `R`, casting `E` to the corresponding pointer type `&R` or

branches/try/src/doc/trpl/concurrency.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ and more cores, yet many programmers aren't prepared to fully utilize them.
66

77
Rust's memory safety features also apply to its concurrency story too. Even
88
concurrent Rust programs must be memory safe, having no data races. Rust's type
9-
system is up to the task, and gives you powerful ways to reason about
9+
system is up to the thread, and gives you powerful ways to reason about
1010
concurrent code at compile time.
1111

1212
Before we talk about the concurrency features that come with Rust, it's important

branches/try/src/doc/trpl/iterators.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ loop is just a handy way to write this `loop`/`match`/`break` construct.
4242
`for` loops aren't the only thing that uses iterators, however. Writing your
4343
own iterator involves implementing the `Iterator` trait. While doing that is
4444
outside of the scope of this guide, Rust provides a number of useful iterators
45-
to accomplish various tasks. Before we talk about those, we should talk about a
45+
to accomplish various threads. Before we talk about those, we should talk about a
4646
Rust anti-pattern. And that's using ranges like this.
4747

4848
Yes, we just talked about how ranges are cool. But ranges are also very

branches/try/src/doc/trpl/mutability.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ let y = &mut x;
3535

3636
`y` is an immutable binding to a mutable reference, which means that you can’t
3737
bind `y` to something else (`y = &mut z`), but you can mutate the thing that’s
38-
bound to `y` (`*y = 5`). A subtle distinction.
38+
bound to `y`. (`*y = 5`) A subtle distinction.
3939

4040
Of course, if you need both:
4141

branches/try/src/doc/trpl/patterns.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ match x {
6666
}
6767
```
6868

69-
This prints `something else`.
69+
This prints `something else`
7070

7171
# Bindings
7272

@@ -152,7 +152,7 @@ match x {
152152
}
153153
```
154154

155-
This prints `Got an int!`.
155+
This prints `Got an int!`
156156

157157
# ref and ref mut
158158

branches/try/src/doc/trpl/the-stack-and-the-heap.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ Next, `foo()` calls `bar()` with `x` and `z`:
430430
| 2<sup>30</sup> | | 20 |
431431
| (2<sup>30</sup>) - 1 | | 5 |
432432
| ... | ... | ... |
433-
| 10 | e | 4 |
433+
| 10 | e | 9 |
434434
| 9 | d | (2<sup>30</sup>) - 1 |
435435
| 8 | c | 5 |
436436
| 7 | b | 4 |
@@ -455,7 +455,7 @@ At the end of `bar()`, it calls `baz()`:
455455
| ... | ... | ... |
456456
| 12 | g | 100 |
457457
| 11 | f | 4 |
458-
| 10 | e | 4 |
458+
| 10 | e | 9 |
459459
| 9 | d | (2<sup>30</sup>) - 1 |
460460
| 8 | c | 5 |
461461
| 7 | b | 4 |
@@ -477,7 +477,7 @@ After `baz()` is over, we get rid of `f` and `g`:
477477
| 2<sup>30</sup> | | 20 |
478478
| (2<sup>30</sup>) - 1 | | 5 |
479479
| ... | ... | ... |
480-
| 10 | e | 4 |
480+
| 10 | e | 9 |
481481
| 9 | d | (2<sup>30</sup>) - 1 |
482482
| 8 | c | 5 |
483483
| 7 | b | 4 |

branches/try/src/doc/trpl/while-loops.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Rust also has a `while` loop. It looks like this:
44

55
```{rust}
6-
let mut x = 5; // mut x: i32
6+
let mut x = 5; // mut x: u32
77
let mut done = false; // mut done: bool
88
99
while !done {

branches/try/src/librustc/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@
3030
#![feature(box_syntax)]
3131
#![feature(collections)]
3232
#![feature(core)]
33-
#![feature(duration)]
34-
#![feature(duration_span)]
3533
#![feature(fs_canonicalize)]
3634
#![feature(hash)]
3735
#![feature(into_cow)]

branches/try/src/librustc/metadata/loader.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,8 @@ fn get_metadata_section(is_osx: bool, filename: &Path) -> Result<MetadataBlob, S
720720
let dur = Duration::span(|| {
721721
ret = Some(get_metadata_section_imp(is_osx, filename));
722722
});
723-
info!("reading {:?} => {}", filename.file_name().unwrap(), dur);
723+
info!("reading {:?} => {}ms", filename.file_name().unwrap(),
724+
dur.num_milliseconds());
724725
return ret.unwrap();;
725726
}
726727

branches/try/src/librustc/util/common.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ pub fn time<T, U, F>(do_it: bool, what: &str, u: U, f: F) -> T where
5555
};
5656
let rv = rv.unwrap();
5757

58-
println!("{}time: {} \t{}", repeat(" ").take(old).collect::<String>(),
59-
dur, what);
58+
println!("{}time: {}.{:03} \t{}", repeat(" ").take(old).collect::<String>(),
59+
dur.num_seconds(), dur.num_milliseconds() % 1000, what);
6060
DEPTH.with(|slot| slot.set(old));
6161

6262
rv

branches/try/src/librustc_resolve/diagnostics.rs

Lines changed: 6 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -49,88 +49,6 @@ about what constitutes an Item declaration and what does not:
4949
http://doc.rust-lang.org/reference.html#statements
5050
"##,
5151

52-
E0251: r##"
53-
Two items of the same name cannot be imported without rebinding one of the
54-
items under a new local name.
55-
56-
An example of this error:
57-
58-
```
59-
use foo::baz;
60-
use bar::*; // error, do `use foo::baz as quux` instead on the previous line
61-
62-
fn main() {}
63-
64-
mod foo {
65-
pub struct baz;
66-
}
67-
68-
mod bar {
69-
pub mod baz {}
70-
}
71-
```
72-
"##,
73-
74-
E0252: r##"
75-
Two items of the same name cannot be imported without rebinding one of the
76-
items under a new local name.
77-
78-
An example of this error:
79-
80-
```
81-
use foo::baz;
82-
use bar::baz; // error, do `use bar::baz as quux` instead
83-
84-
fn main() {}
85-
86-
mod foo {
87-
pub struct baz;
88-
}
89-
90-
mod bar {
91-
pub mod baz {}
92-
}
93-
```
94-
"##,
95-
96-
E0255: r##"
97-
You can't import a value whose name is the same as another value defined in the
98-
module.
99-
100-
An example of this error:
101-
102-
```
103-
use bar::foo; // error, do `use bar::foo as baz` instead
104-
105-
fn foo() {}
106-
107-
mod bar {
108-
pub fn foo() {}
109-
}
110-
111-
fn main() {}
112-
```
113-
"##,
114-
115-
E0256: r##"
116-
You can't import a type or module when the name of the item being imported is
117-
the same as another type or submodule defined in the module.
118-
119-
An example of this error:
120-
121-
```
122-
use foo::Bar; // error
123-
124-
type Bar = u32;
125-
126-
mod foo {
127-
pub mod Bar { }
128-
}
129-
130-
fn main() {}
131-
```
132-
"##,
133-
13452
E0259: r##"
13553
The name chosen for an external crate conflicts with another external crate that
13654
has been imported into the current module.
@@ -204,10 +122,14 @@ http://doc.rust-lang.org/reference.html#types
204122
register_diagnostics! {
205123
E0157,
206124
E0153,
125+
E0251, // a named type or value has already been imported in this module
126+
E0252, // a named type or value has already been imported in this module
207127
E0253, // not directly importable
208128
E0254, // import conflicts with imported crate in this module
209-
E0257,
210-
E0258,
129+
E0255, // import conflicts with value in this module
130+
E0256, // import conflicts with type in this module
131+
E0257, // inherent implementations are only allowed on types defined in the current module
132+
E0258, // import conflicts with existing submodule
211133
E0364, // item is private
212134
E0365 // item is private
213135
}

branches/try/src/librustc_typeck/check/mod.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3082,8 +3082,8 @@ fn check_expr_with_unifier<'a, 'tcx, F>(fcx: &FnCtxt<'a, 'tcx>,
30823082
let mut checked = false;
30833083
opt_place.as_ref().map(|place| match place.node {
30843084
ast::ExprPath(None, ref path) => {
3085-
// FIXME(pcwalton): For now we hardcode the only permissible
3086-
// place: the exchange heap.
3085+
// FIXME(pcwalton): For now we hardcode the two permissible
3086+
// places: the exchange heap and the managed heap.
30873087
let definition = lookup_full_def(tcx, path.span, place.id);
30883088
let def_id = definition.def_id();
30893089
let referent_ty = fcx.expr_ty(&**subexpr);
@@ -3097,7 +3097,7 @@ fn check_expr_with_unifier<'a, 'tcx, F>(fcx: &FnCtxt<'a, 'tcx>,
30973097

30983098
if !checked {
30993099
span_err!(tcx.sess, expr.span, E0066,
3100-
"only the exchange heap is currently supported");
3100+
"only the managed heap and exchange heap are currently supported");
31013101
fcx.write_ty(id, tcx.types.err);
31023102
}
31033103
}
@@ -3317,8 +3317,7 @@ fn check_expr_with_unifier<'a, 'tcx, F>(fcx: &FnCtxt<'a, 'tcx>,
33173317
if let Err(_) = fcx.mk_eqty(false, infer::Misc(expr.span),
33183318
result_type, ty::mk_nil(fcx.tcx())) {
33193319
span_err!(tcx.sess, expr.span, E0069,
3320-
"`return;` in a function whose return type is \
3321-
not `()`");
3320+
"`return;` in function returning non-nil");
33223321
},
33233322
Some(ref e) => {
33243323
check_expr_coercable_to_type(fcx, &**e, result_type);

0 commit comments

Comments
 (0)