Skip to content

Commit b5f1a0d

Browse files
committed
---
yaml --- r: 233932 b: refs/heads/beta c: c6b0fcc h: refs/heads/master v: v3
1 parent e5a7e35 commit b5f1a0d

File tree

174 files changed

+5086
-14581
lines changed

Some content is hidden

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

174 files changed

+5086
-14581
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: 0762f58c1143b4ff0ae5d0cdda9cdd8249512e77
26+
refs/heads/beta: c6b0fccac822abe319a1f10d67c1271702098475
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: 370fe2786109360f7c35b8ba552b83b773dd71d6
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/mk/crates.mk

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ TARGET_CRATES := libc std flate arena term \
5656
alloc_system
5757
RUSTC_CRATES := rustc rustc_typeck rustc_borrowck rustc_resolve rustc_driver \
5858
rustc_trans rustc_back rustc_llvm rustc_privacy rustc_lint \
59-
rustc_data_structures rustc_front rustc_platform_intrinsics
59+
rustc_data_structures rustc_platform_intrinsics
6060
HOST_CRATES := syntax $(RUSTC_CRATES) rustdoc fmt_macros
6161
TOOLS := compiletest rustdoc rustc rustbook error-index-generator
6262

@@ -71,24 +71,23 @@ DEPS_graphviz := std
7171
DEPS_syntax := std term serialize log fmt_macros arena libc rustc_bitflags
7272
DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_borrowck \
7373
rustc_typeck rustc_resolve log syntax serialize rustc_llvm \
74-
rustc_trans rustc_privacy rustc_lint rustc_front
74+
rustc_trans rustc_privacy rustc_lint
7575

7676
DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back \
77-
log syntax serialize rustc_llvm rustc_front rustc_platform_intrinsics
78-
DEPS_rustc_typeck := rustc syntax rustc_front rustc_platform_intrinsics
79-
DEPS_rustc_borrowck := rustc rustc_front log graphviz syntax
80-
DEPS_rustc_resolve := rustc rustc_front log syntax
81-
DEPS_rustc_privacy := rustc rustc_front log syntax
77+
log syntax serialize rustc_llvm rustc_platform_intrinsics
78+
DEPS_rustc_typeck := rustc syntax rustc_platform_intrinsics
79+
DEPS_rustc_borrowck := rustc log graphviz syntax
80+
DEPS_rustc_resolve := rustc log syntax
81+
DEPS_rustc_privacy := rustc log syntax
8282
DEPS_rustc_lint := rustc log syntax
8383
DEPS_rustc := syntax flate arena serialize getopts rbml \
8484
log graphviz rustc_llvm rustc_back rustc_data_structures
8585
DEPS_rustc_llvm := native:rustllvm libc std rustc_bitflags
8686
DEPS_rustc_platform_intrinsics := rustc rustc_llvm
87-
DEPS_rustc_back := std syntax rustc_llvm rustc_front flate log libc
88-
DEPS_rustc_front := std syntax log serialize
87+
DEPS_rustc_back := std syntax rustc_llvm flate log libc
8988
DEPS_rustc_data_structures := std log serialize
9089
DEPS_rustdoc := rustc rustc_driver native:hoedown serialize getopts \
91-
test rustc_lint rustc_front
90+
test rustc_lint
9291
DEPS_rustc_bitflags := core
9392
DEPS_flate := std native:miniz
9493
DEPS_arena := std

branches/beta/mk/docs.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ ifdef CFG_DISABLE_DOCS
191191
endif
192192

193193
docs: $(DOC_TARGETS)
194-
doc: docs
195194
compiler-docs: $(COMPILER_DOC_TARGETS)
196195

197196
trpl: doc/book/index.html

branches/beta/src/compiletest/runtest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ fn run_pretty_test(config: &Config, props: &TestProps, testfile: &Path) {
268268
// FIXME (#9639): This needs to handle non-utf8 paths
269269
let mut args = vec!("-".to_owned(),
270270
"-Zunstable-options".to_owned(),
271-
"--unpretty".to_owned(),
271+
"--pretty".to_owned(),
272272
pretty_type,
273273
format!("--target={}", config.target),
274274
"-L".to_owned(),

branches/beta/src/doc/trpl/lifetimes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ If we wanted an `&mut` reference, we’d do this:
108108

109109
If you compare `&mut i32` to `&'a mut i32`, they’re the same, it’s just that
110110
the lifetime `'a` has snuck in between the `&` and the `mut i32`. We read `&mut
111-
i32` as ‘a mutable reference to an `i32`’ and `&'a mut i32` as ‘a mutable
111+
i32` as ‘a mutable reference to an i32’ and `&'a mut i32` as ‘a mutable
112112
reference to an `i32` with the lifetime `'a`’.
113113

114114
# In `struct`s

branches/beta/src/doc/trpl/structs.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
% Structs
22

3-
`struct`s are a way of creating more complex data types. For example, if we were
3+
Structs are a way of creating more complex data types. For example, if we were
44
doing calculations involving coordinates in 2D space, we would need both an `x`
55
and a `y` value:
66

@@ -9,7 +9,7 @@ let origin_x = 0;
99
let origin_y = 0;
1010
```
1111

12-
A `struct` lets us combine these two into a single, unified datatype:
12+
A struct lets us combine these two into a single, unified datatype:
1313

1414
```rust
1515
struct Point {
@@ -28,14 +28,14 @@ There’s a lot going on here, so let’s break it down. We declare a `struct` w
2828
the `struct` keyword, and then with a name. By convention, `struct`s begin with
2929
a capital letter and are camel cased: `PointInSpace`, not `Point_In_Space`.
3030

31-
We can create an instance of our `struct` via `let`, as usual, but we use a `key:
31+
We can create an instance of our struct via `let`, as usual, but we use a `key:
3232
value` style syntax to set each field. The order doesn’t need to be the same as
3333
in the original declaration.
3434

3535
Finally, because fields have names, we can access the field through dot
3636
notation: `origin.x`.
3737

38-
The values in `struct`s are immutable by default, like other bindings in Rust.
38+
The values in structs are immutable by default, like other bindings in Rust.
3939
Use `mut` to make them mutable:
4040

4141
```rust
@@ -91,7 +91,7 @@ fn main() {
9191
# Update syntax
9292

9393
A `struct` can include `..` to indicate that you want to use a copy of some
94-
other `struct` for some of the values. For example:
94+
other struct for some of the values. For example:
9595

9696
```rust
9797
struct Point3d {
@@ -121,7 +121,7 @@ let point = Point3d { z: 1, x: 2, .. origin };
121121
# Tuple structs
122122

123123
Rust has another data type that’s like a hybrid between a [tuple][tuple] and a
124-
`struct`, called a ‘tuple struct’. Tuple structs have a name, but
124+
struct, called a ‘tuple struct’. Tuple structs have a name, but
125125
their fields don’t:
126126

127127
```rust
@@ -140,7 +140,7 @@ let black = Color(0, 0, 0);
140140
let origin = Point(0, 0, 0);
141141
```
142142

143-
It is almost always better to use a `struct` than a tuple struct. We would write
143+
It is almost always better to use a struct than a tuple struct. We would write
144144
`Color` and `Point` like this instead:
145145

146146
```rust
@@ -158,7 +158,7 @@ struct Point {
158158
```
159159

160160
Now, we have actual names, rather than positions. Good names are important,
161-
and with a `struct`, we have actual names.
161+
and with a struct, we have actual names.
162162

163163
There _is_ one case when a tuple struct is very useful, though, and that’s a
164164
tuple struct with only one element. We call this the ‘newtype’ pattern, because
@@ -180,13 +180,13 @@ destructuring `let`, just as with regular tuples. In this case, the
180180

181181
# Unit-like structs
182182

183-
You can define a `struct` with no members at all:
183+
You can define a struct with no members at all:
184184

185185
```rust
186186
struct Electron;
187187
```
188188

189-
Such a `struct` is called ‘unit-like’ because it resembles the empty
189+
Such a struct is called ‘unit-like’ because it resembles the empty
190190
tuple, `()`, sometimes called ‘unit’. Like a tuple struct, it defines a
191191
new type.
192192

@@ -195,6 +195,6 @@ marker type), but in combination with other features, it can become
195195
useful. For instance, a library may ask you to create a structure that
196196
implements a certain [trait][trait] to handle events. If you don’t have
197197
any data you need to store in the structure, you can just create a
198-
unit-like `struct`.
198+
unit-like struct.
199199

200200
[trait]: traits.html

branches/beta/src/librustc/front/map/blocks.rs renamed to branches/beta/src/librustc/ast_map/blocks.rs

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,12 @@
2323
2424
pub use self::Code::*;
2525

26-
use front::map::{self, Node};
26+
use ast_map::{self, Node};
2727
use syntax::abi;
28-
use rustc_front::hir::{Block, FnDecl};
29-
use syntax::ast::{NodeId, Ident};
30-
use rustc_front::hir as ast;
28+
use syntax::ast::{Block, FnDecl, NodeId};
29+
use syntax::ast;
3130
use syntax::codemap::Span;
32-
use rustc_front::visit::FnKind;
31+
use syntax::visit::FnKind;
3332

3433
/// An FnLikeNode is a Node that is like a fn, in that it has a decl
3534
/// and a body (as well as a NodeId, a span, etc).
@@ -41,7 +40,7 @@ use rustc_front::visit::FnKind;
4140
///
4241
/// To construct one, use the `Code::from_node` function.
4342
#[derive(Copy, Clone)]
44-
pub struct FnLikeNode<'a> { node: map::Node<'a> }
43+
pub struct FnLikeNode<'a> { node: ast_map::Node<'a> }
4544

4645
/// MaybeFnLike wraps a method that indicates if an object
4746
/// corresponds to some FnLikeNode.
@@ -87,7 +86,7 @@ pub enum Code<'a> {
8786
}
8887

8988
impl<'a> Code<'a> {
90-
pub fn id(&self) -> NodeId {
89+
pub fn id(&self) -> ast::NodeId {
9190
match *self {
9291
FnLikeCode(node) => node.id(),
9392
BlockCode(block) => block.id,
@@ -96,7 +95,7 @@ impl<'a> Code<'a> {
9695

9796
/// Attempts to construct a Code from presumed FnLike or Block node input.
9897
pub fn from_node(node: Node) -> Option<Code> {
99-
if let map::NodeBlock(block) = node {
98+
if let ast_map::NodeBlock(block) = node {
10099
Some(BlockCode(block))
101100
} else {
102101
FnLikeNode::from_node(node).map(|fn_like| FnLikeCode(fn_like))
@@ -107,15 +106,15 @@ impl<'a> Code<'a> {
107106
/// These are all the components one can extract from a fn item for
108107
/// use when implementing FnLikeNode operations.
109108
struct ItemFnParts<'a> {
110-
ident: Ident,
109+
ident: ast::Ident,
111110
decl: &'a ast::FnDecl,
112111
unsafety: ast::Unsafety,
113112
constness: ast::Constness,
114113
abi: abi::Abi,
115114
vis: ast::Visibility,
116115
generics: &'a ast::Generics,
117116
body: &'a Block,
118-
id: NodeId,
117+
id: ast::NodeId,
119118
span: Span
120119
}
121120

@@ -138,10 +137,10 @@ impl<'a> FnLikeNode<'a> {
138137
/// Attempts to construct a FnLikeNode from presumed FnLike node input.
139138
pub fn from_node(node: Node) -> Option<FnLikeNode> {
140139
let fn_like = match node {
141-
map::NodeItem(item) => item.is_fn_like(),
142-
map::NodeTraitItem(tm) => tm.is_fn_like(),
143-
map::NodeImplItem(_) => true,
144-
map::NodeExpr(e) => e.is_fn_like(),
140+
ast_map::NodeItem(item) => item.is_fn_like(),
141+
ast_map::NodeTraitItem(tm) => tm.is_fn_like(),
142+
ast_map::NodeImplItem(_) => true,
143+
ast_map::NodeExpr(e) => e.is_fn_like(),
145144
_ => false
146145
};
147146
if fn_like {
@@ -203,7 +202,7 @@ impl<'a> FnLikeNode<'a> {
203202
fn handle<A, I, M, C>(self, item_fn: I, method: M, closure: C) -> A where
204203
I: FnOnce(ItemFnParts<'a>) -> A,
205204
M: FnOnce(NodeId,
206-
Ident,
205+
ast::Ident,
207206
&'a ast::MethodSig,
208207
Option<ast::Visibility>,
209208
&'a ast::Block,
@@ -212,7 +211,7 @@ impl<'a> FnLikeNode<'a> {
212211
C: FnOnce(ClosureParts<'a>) -> A,
213212
{
214213
match self.node {
215-
map::NodeItem(i) => match i.node {
214+
ast_map::NodeItem(i) => match i.node {
216215
ast::ItemFn(ref decl, unsafety, constness, abi, ref generics, ref block) =>
217216
item_fn(ItemFnParts {
218217
id: i.id,
@@ -228,13 +227,13 @@ impl<'a> FnLikeNode<'a> {
228227
}),
229228
_ => panic!("item FnLikeNode that is not fn-like"),
230229
},
231-
map::NodeTraitItem(ti) => match ti.node {
230+
ast_map::NodeTraitItem(ti) => match ti.node {
232231
ast::MethodTraitItem(ref sig, Some(ref body)) => {
233232
method(ti.id, ti.ident, sig, None, body, ti.span)
234233
}
235234
_ => panic!("trait method FnLikeNode that is not fn-like"),
236235
},
237-
map::NodeImplItem(ii) => {
236+
ast_map::NodeImplItem(ii) => {
238237
match ii.node {
239238
ast::MethodImplItem(ref sig, ref body) => {
240239
method(ii.id, ii.ident, sig, Some(ii.vis), body, ii.span)
@@ -244,7 +243,7 @@ impl<'a> FnLikeNode<'a> {
244243
}
245244
}
246245
}
247-
map::NodeExpr(e) => match e.node {
246+
ast_map::NodeExpr(e) => match e.node {
248247
ast::ExprClosure(_, ref decl, ref block) =>
249248
closure(ClosureParts::new(&**decl, &**block, e.id, e.span)),
250249
_ => panic!("expr FnLikeNode that is not fn-like"),

0 commit comments

Comments
 (0)